Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DbiTimerManager.h

Go to the documentation of this file.
00001 // $Id: DbiTimerManager.h,v 1.2 2003/03/25 07:59:32 west Exp $
00002 
00003 #ifndef DBITIMERMANAGER
00004 #define DBITIMERMANAGER
00005 
00007 // DbiTimerManager                                                    //
00008 //                                                                    //
00009 // Package: Dbi (Database Interface).                                 //
00010 //                                                                    //
00011 // N. West 01/2002                                                    //
00012 //                                                                    //
00013 // Concept: Manager of a set of simple timers.                        //
00014 //                                                                    //
00015 // Purpose: To find out why this is all soooo sssllloooowwww!         //
00016 //                                                                    //
00018 
00019 #include <string>
00020 #include <list>
00021 
00022 using std::string;
00023 using std::list;
00024 
00025 class DbiTableMetaData;
00026 class DbiTimer;
00027 
00028 class DbiTimerManager
00029 {
00030 
00031 public:
00032 
00033 // Constructors and destructors.
00034            DbiTimerManager();
00035   virtual ~DbiTimerManager();
00036 
00037 // State testing member functions
00038 
00039 // State changing member functions
00040     void Enable(Bool_t flag=kTRUE,
00041                 Bool_t enableSubWatch = kFALSE) { fEnabled = flag;
00042                                     fSubWatchEnabled = enableSubWatch;}
00043     void RecBegin(string tableName, UInt_t rowSize);
00044     void RecEnd(UInt_t numRows);
00045     void RecFillAgg(Int_t aggNo);
00046     void RecMainQuery();
00047     void StartSubWatch(UInt_t subWatch);
00048 
00049 // Global timer manager used for all queries to the DBI.
00050 
00051 static DbiTimerManager gTimerManager;
00052 
00053 private:  
00054 
00055  DbiTimer* GetCurrent();
00056  DbiTimer* Pop();
00057  DbiTimer* Push();
00058 
00059 // Data members
00060 
00061           Bool_t fEnabled;     // Enable/disable
00062           Bool_t fSubWatchEnabled;     
00063                                // SubWatch Enable/disable (not used now).
00064  list<DbiTimer*> fTimers;      // Push-down stack of timers.
00065 
00066  ClassDef(DbiTimerManager,0)    // Simple query timer
00067 
00068 };
00069 
00070 
00071 #endif // DBITIMERMANAGER
00072 

Generated on Mon Feb 15 11:06:35 2010 for loon by  doxygen 1.3.9.1