EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbTimerManager.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairDbTimerManager.h
1 
2 #ifndef FAIRDBTIMERMANAGER
3 #define FAIRDBTIMERMANAGER
4 
5 
6 #include <string>
7 #include <list>
8 
9 using std::string;
10 using std::list;
11 
13 class FairDbTimer;
14 
16 {
17 
18  public:
19 
20 // Constructors and destructors.
22  virtual ~FairDbTimerManager();
23 
24 // State testing member functions
25 
26 // State changing member functions
27  void Enable(Bool_t flag=kTRUE,
28  Bool_t enableSubWatch = kFALSE) {
29  fEnabled = flag;
30  fSubWatchEnabled = enableSubWatch;
31  }
32  void RecBegin(string tableName, UInt_t rowSize);
33  void RecEnd(UInt_t numRows);
34  void RecFillAgg(Int_t aggNo);
35  void RecMainQuery();
36  void StartSubWatch(UInt_t subWatch);
37 
38 // Global timer manager used for all queries to the DB.
39 
41 
42  private:
43 
45  FairDbTimer* Pop();
46  FairDbTimer* Push();
47 
48 // Data members
49 
50  Bool_t fEnabled; // Enable/disable
52  // SubWatch Enable/disable (not used now).
53  list<FairDbTimer*> fTimers; // Push-down stack of timers.
54 
55  ClassDef(FairDbTimerManager,0) // Simple query timer
56 
57 };
58 
59 
60 #endif // FAIRDBTIMERMANAGER
61