CMS 3D CMS Logo

MyWatcher.h
Go to the documentation of this file.
1 #ifndef MyWATCHER_H
2 #define MyWATCHER_H
3 
4 #include "TStopwatch.h"
5 #include <iostream>
6 #include <sstream>
7 
8 #ifdef EDM_ML_DEBUG
9 class MyWatcher : public TStopwatch {
10  public:
11  MyWatcher(const std::string n=""):name(n),total(0) {}
12  ~MyWatcher(){}
13 
14  std::string start(bool r=true){Start(r); return " [Start]";}
15  std::string continu(){Continue(); return " [Continue]";}
16  std::string reset(){Reset(); return " [Reset]";}
17  std::string stop() {Stop(); return " [Stop]";}
18  std::string lap() {
19  std::stringstream o;
20  double r=RealTime();
21  total+=r;
22  o<<"\n "<<r<<" total:"<<total<<" ["<<name<<"]";
23  Start();
24  return o.str();}
26  double total;
27 };
28 #else
29 class MyWatcher {
30  public:
33 
34  std::string start(bool r=true){return name;}
36  std::string reset(){return name;}
37  std::string stop(){return name;}
38  std::string lap() {return name;}
40 };
41 #endif
42 
43 #endif
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
MyWatcher::stop
std::string stop()
Definition: MyWatcher.h:37
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
MyWatcher::start
std::string start(bool r=true)
Definition: MyWatcher.h:34
MyWatcher::name
std::string name
Definition: MyWatcher.h:39
MyWatcher
Definition: MyWatcher.h:29
MyWatcher::~MyWatcher
~MyWatcher()
Definition: MyWatcher.h:32
MyWatcher::reset
std::string reset()
Definition: MyWatcher.h:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MyWatcher::continu
std::string continu()
Definition: MyWatcher.h:35
HcalObjRepresent::Reset
void Reset(std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1061
MyWatcher::MyWatcher
MyWatcher(const std::string)
Definition: MyWatcher.h:31
alignCSCRings.r
r
Definition: alignCSCRings.py:93
MyWatcher::lap
std::string lap()
Definition: MyWatcher.h:38
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152