#include <Utilities/Timing/interface/TimingReport.h>
Public Member Functions | |
bool | active () const |
double | cpusec () const |
Item () | |
double | realsec () const |
double | realticks () const |
void | setObs (MyObserver *io) |
void | start () |
void | stop () |
Item & | switchCPU (bool ion) |
Item & | switchOn (bool ion) |
Public Attributes | |
int | counter |
bool | cpuon |
LinuxCPUTimer | cpuwatch |
MyObserver * | o |
bool | on |
PentiumTimer | stopwatch |
Private Types | |
typedef BaseEvent< std::pair < double, double > > | MyObserver |
Definition at line 26 of file TimingReport.h.
typedef BaseEvent< std::pair<double,double> > TimingReport::Item::MyObserver [private] |
Definition at line 27 of file TimingReport.h.
TimingReport::Item::Item | ( | ) | [inline] |
Definition at line 43 of file TimingReport.h.
References stopwatch.
Referenced by stop().
00043 { return stopwatch.running();}
double TimingReport::Item::cpusec | ( | ) | const |
Definition at line 16 of file TimingReport.cc.
References bias, GenTimer< Time >::bias(), counter, cpuwatch, GenTimer< Time >::lap(), and max.
00016 { 00017 return std::max(0.,cpuwatch.lap().seconds()-counter*(LinuxCPUTimer::bias()+PentiumTimer::bias())); 00018 }
double TimingReport::Item::realsec | ( | ) | const |
Definition at line 8 of file TimingReport.cc.
References bias, counter, max, and stopwatch.
00008 { 00009 return std::max(0.,stopwatch.lap().seconds()-counter*PentiumTimer::bias()); 00010 }
double TimingReport::Item::realticks | ( | ) | const |
Definition at line 12 of file TimingReport.cc.
References bias, counter, max, and stopwatch.
00012 { 00013 return std::max(0.,stopwatch.lap().ticks()-counter*PentiumTimer::bias(false)); 00014 }
void TimingReport::Item::setObs | ( | MyObserver * | io | ) | [inline] |
Definition at line 44 of file TimingReport.h.
References o.
Referenced by R2DTimerObserver::init().
00044 { o=io;}
Definition at line 32 of file TimingReport.h.
References counter, cpuon, cpuwatch, on, GenTimer< Time >::start(), and stopwatch.
Referenced by R2DTimerObserver::start(), and TimeMe::TimeMe().
void TimingReport::Item::stop | ( | ) | [inline] |
Definition at line 33 of file TimingReport.h.
References active(), cpuon, cpuwatch, GenTimer< Time >::lap(), o, on, GenTimer< Time >::stop(), and stopwatch.
Referenced by R2DTimerObserver::stop(), and TimeMe::~TimeMe().
00033 { 00034 if (on) { 00035 stopwatch.stop(); 00036 if (cpuon) cpuwatch.stop(); 00037 if (active()) return; 00038 if (o) (*o)(std::pair<double,double>(stopwatch.lap().seconds(), 00039 cpuwatch.lap().seconds())); 00040 } 00041 }
Definition at line 31 of file TimingReport.h.
References cpuon.
Referenced by R2DTimerObserver::init(), and TimeMe::TimeMe().
00031 {cpuon=ion; return *this;}
Definition at line 51 of file TimingReport.h.
Referenced by cpusec(), TimerStack::push(), realsec(), realticks(), and start().
Definition at line 53 of file TimingReport.h.
Referenced by cpusec(), TimeMe::lap(), start(), and stop().
PentiumTimer TimingReport::Item::stopwatch |
Definition at line 52 of file TimingReport.h.
Referenced by active(), TimeMe::lap(), realsec(), realticks(), start(), and stop().