// $Id: IDbiTimerManager.hxx,v 1.1 2011/01/18 05:49:20 finch Exp $
#ifndef DBITIMERMANAGER
#define DBITIMERMANAGER
////////////////////////////////////////////////////////////////////////
/// \class COMET::IDbiTimerManager
///
/// \brief Concept: Manager of a set of simple timers.
///
/// Purpose: To find out why this is all soooo sssllloooowwww!
///
////////////////////////////////////////////////////////////////////////
#include
#include
using std::string;
using std::list;
namespace COMET {
class IDbiTableMetaData;
class IDbiTimer;
}
namespace COMET {
class IDbiTimerManager
{
public:
// Constructors and destructors.
IDbiTimerManager();
virtual ~IDbiTimerManager();
// State testing member functions
// State changing member functions
void Enable(Bool_t flag=kTRUE,
Bool_t enableSubWatch = kFALSE) { fEnabled = flag;
fSubWatchEnabled = enableSubWatch;}
void RecBegin(string tableName, UInt_t rowSize);
void RecEnd(UInt_t numRows);
void RecFillAgg(Int_t aggNo);
void RecMainQuery();
void StartSubWatch(UInt_t subWatch);
// Global timer manager used for all queries to the DBI.
static IDbiTimerManager gTimerManager;
private:
IDbiTimer* GetCurrent();
IDbiTimer* Pop();
IDbiTimer* Push();
// Data members
Bool_t fEnabled; // Enable/disable
Bool_t fSubWatchEnabled;
// SubWatch Enable/disable (not used now).
list fTimers; // Push-down stack of timers.
ClassDef(IDbiTimerManager,0) // Simple query timer
};
};
#endif // DBITIMERMANAGER