#include <EventFilter/StorageManager/interface/DQMInstance.h>
Public Member Functions | |
DQMGroup (int readyTime) | |
TTimeStamp * | getFirstUpdate () |
int | getLastEvent () |
TTimeStamp * | getLastServed () |
TTimeStamp * | getLastUpdate () |
int | getNUpdates () |
int | getReadyTime () |
void | incrementUpdates () |
bool | isReady (int currentTime) |
void | setLastEvent (int lastEvent) |
void | setLastServed () |
void | setServedSinceUpdate () |
bool | wasServedSinceUpdate () |
~DQMGroup () | |
Public Attributes | |
std::map< std::string, DQMFolder * > | dqmFolders_ |
Protected Attributes | |
TTimeStamp * | firstUpdate_ |
int | lastEvent_ |
TTimeStamp * | lastServed_ |
TTimeStamp * | lastUpdate_ |
int | nUpdates_ |
int | readyTime_ |
bool | wasServedSinceUpdate_ |
Definition at line 39 of file DQMInstance.h.
DQMGroup::DQMGroup | ( | int | readyTime | ) |
Definition at line 50 of file DQMInstance.cc.
References firstUpdate_, lastServed_, and lastUpdate_.
00050 : 00051 nUpdates_(0), 00052 readyTime_(readyTime) 00053 { 00054 lastUpdate_ = new TTimeStamp(0,0); 00055 lastServed_ = new TTimeStamp(0,0); 00056 firstUpdate_ = new TTimeStamp(0,0); 00057 firstUpdate_->Set(); 00058 }
DQMGroup::~DQMGroup | ( | ) |
Definition at line 77 of file DQMInstance.cc.
References dqmFolders_, firstUpdate_, lastServed_, lastUpdate_, and NULL.
00078 { 00079 if ( firstUpdate_ != NULL ) { delete(firstUpdate_);} 00080 if ( lastUpdate_ != NULL ) { delete(lastUpdate_);} 00081 if ( lastServed_ != NULL ) { delete(lastServed_);} 00082 for (std::map<std::string, DQMFolder * >::iterator i0 = 00083 dqmFolders_.begin(); i0 != dqmFolders_.end() ; ++i0) 00084 { 00085 DQMFolder * folder = i0->second; 00086 if ( folder != NULL ) { delete(folder); } 00087 } 00088 }
TTimeStamp* stor::DQMGroup::getFirstUpdate | ( | ) | [inline] |
Definition at line 49 of file DQMInstance.h.
References firstUpdate_.
00049 { return(firstUpdate_);}
int stor::DQMGroup::getLastEvent | ( | ) | [inline] |
Definition at line 47 of file DQMInstance.h.
References lastEvent_.
Referenced by stor::DQMServiceManager::manageDQMEventMsg().
00047 { return(lastEvent_);}
TTimeStamp* stor::DQMGroup::getLastServed | ( | ) | [inline] |
TTimeStamp* stor::DQMGroup::getLastUpdate | ( | ) | [inline] |
Definition at line 50 of file DQMInstance.h.
References lastUpdate_.
Referenced by stor::DQMServiceManager::getBestDQMGroupDescriptor(), and stor::DQMServiceManager::manageDQMEventMsg().
00050 { return(lastUpdate_);}
int stor::DQMGroup::getNUpdates | ( | ) | [inline] |
int stor::DQMGroup::getReadyTime | ( | ) | [inline] |
void DQMGroup::incrementUpdates | ( | ) |
Definition at line 60 of file DQMInstance.cc.
References lastUpdate_, nUpdates_, and wasServedSinceUpdate_.
Referenced by stor::DQMInstance::updateObject().
00061 { 00062 nUpdates_++; 00063 wasServedSinceUpdate_ = false; 00064 lastUpdate_->Set(); 00065 }
Definition at line 67 of file DQMInstance.cc.
References lastUpdate_, and readyTime_.
Referenced by stor::DQMServiceManager::getBestDQMGroupDescriptor(), and stor::DQMInstance::isReady().
00068 { 00069 time_t lastUpdateSecs = lastUpdate_->GetSec(); 00070 // 29-Oct-2008, KAB - added a test that lastUpdateSecs is greater 00071 // than zero so that we don't report that a brand-new group is 00072 // ready before any updates have been added. 00073 return( lastUpdateSecs > 0 && 00074 ( currentTime - lastUpdateSecs ) > readyTime_); 00075 }
Definition at line 48 of file DQMInstance.h.
References lastEvent_.
Referenced by stor::DQMInstance::updateObject().
00048 { lastEvent_=lastEvent;}
void stor::DQMGroup::setLastServed | ( | ) | [inline] |
void stor::DQMGroup::setServedSinceUpdate | ( | ) | [inline] |
Definition at line 54 of file DQMInstance.h.
References wasServedSinceUpdate_.
Referenced by stor::DQMServiceManager::manageDQMEventMsg().
00054 { wasServedSinceUpdate_=true;}
bool stor::DQMGroup::wasServedSinceUpdate | ( | ) | [inline] |
Definition at line 53 of file DQMInstance.h.
References wasServedSinceUpdate_.
Referenced by stor::DQMServiceManager::manageDQMEventMsg().
00053 { return(wasServedSinceUpdate_);}
std::map<std::string, DQMFolder *> stor::DQMGroup::dqmFolders_ |
Definition at line 44 of file DQMInstance.h.
Referenced by stor::DQMServiceManager::manageDQMEventMsg(), stor::DQMInstance::updateObject(), stor::DQMInstance::writeFile(), and ~DQMGroup().
TTimeStamp* stor::DQMGroup::firstUpdate_ [protected] |
Definition at line 59 of file DQMInstance.h.
Referenced by DQMGroup(), getFirstUpdate(), and ~DQMGroup().
int stor::DQMGroup::lastEvent_ [protected] |
TTimeStamp* stor::DQMGroup::lastServed_ [protected] |
Definition at line 61 of file DQMInstance.h.
Referenced by DQMGroup(), getLastServed(), setLastServed(), and ~DQMGroup().
TTimeStamp* stor::DQMGroup::lastUpdate_ [protected] |
Definition at line 60 of file DQMInstance.h.
Referenced by DQMGroup(), getLastUpdate(), incrementUpdates(), isReady(), and ~DQMGroup().
int stor::DQMGroup::nUpdates_ [protected] |
int stor::DQMGroup::readyTime_ [protected] |
bool stor::DQMGroup::wasServedSinceUpdate_ [protected] |
Definition at line 65 of file DQMInstance.h.
Referenced by incrementUpdates(), setServedSinceUpdate(), and wasServedSinceUpdate().