#include <Scheduler.h>
◆ Scheduler() [1/2]
Definition at line 11 of file Scheduler.cxx.
13, m_running(false)
14, m_log(0)
15{
16 assert( s_instance==0);
17 s_instance = this;
18}
Referenced by instance().
◆ ~Scheduler() [1/2]
Scheduler::~Scheduler |
( |
| ) |
|
◆ Scheduler() [2/2]
◆ ~Scheduler() [2/2]
Scheduler::~Scheduler |
( |
| ) |
|
◆ clear() [1/2]
void Scheduler::clear |
( |
| ) |
|
Definition at line 24 of file Scheduler.cxx.
25{
26 while( ! empty() ) {
28 delete (*f).second;
30 }
31 m_time = 0;
32}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
Referenced by ~Scheduler().
◆ clear() [2/2]
void Scheduler::clear |
( |
| ) |
|
◆ elapsed_time() [1/2]
GPStime Scheduler::elapsed_time |
( |
| ) |
const |
|
inline |
◆ elapsed_time() [2/2]
GPStime Scheduler::elapsed_time |
( |
| ) |
const |
|
inline |
◆ endLogging() [1/2]
void Scheduler::endLogging |
( |
| ) |
|
◆ endLogging() [2/2]
void Scheduler::endLogging |
( |
| ) |
|
◆ instance() [1/2]
◆ instance() [2/2]
◆ printOn() [1/2]
void Scheduler::printOn |
( |
std::ostream & |
out | ) |
const |
Definition at line 66 of file Scheduler.cxx.
67{
68 out <<
"\nScheduler stack: current time = " <<
elapsed_time() << std::endl;
69 out << "\ttime\tclass name\n";
70 for( const_iterator it= begin(); it !=end(); ++it){
71 std::pair<double, ScheduledEvent*> entry = *it;
72 out << "\t" << entry.first << '\t' << entry.second->name() << std::endl ;
73 }
74 out << std::endl;
75
76}
GPStime elapsed_time() const
◆ printOn() [2/2]
void Scheduler::printOn |
( |
std::ostream & |
out | ) |
const |
◆ running() [1/2]
bool Scheduler::running |
( |
| ) |
|
|
inline |
◆ running() [2/2]
bool Scheduler::running |
( |
| ) |
|
|
inline |
◆ schedule() [1/2]
◆ schedule() [2/2]
◆ setLog() [1/2]
void Scheduler::setLog |
( |
std::ostream & |
out | ) |
|
Definition at line 78 of file Scheduler.cxx.
79{
80 m_log = &out;
81 out <<
"\nSchedule event: current time = " <<
elapsed_time() << std::endl;
82 out << "\ttime\tEvent\n";
83
84}
◆ setLog() [2/2]
void Scheduler::setLog |
( |
std::ostream & |
out | ) |
|
◆ start() [1/2]
void Scheduler::start |
( |
| ) |
|
Definition at line 40 of file Scheduler.cxx.
41{
42 m_running = true;
43
44 while( !empty() && m_running ) {
45
46
47 std::pair<double, ScheduledEvent*> entry = *begin();
48
49
50 m_time = entry.first;
51 erase(begin());
52
53
54 if( m_log ) {
55 (*m_log) << "\t" << entry.first << '\t' << entry.second->name() << std::endl ;
56 }
57 entry.second->execute();
58 delete entry.second;
59 }
60}
◆ start() [2/2]
void Scheduler::start |
( |
| ) |
|
◆ stop() [1/2]
◆ stop() [2/2]
The documentation for this class was generated from the following files: