CMS 3D CMS Logo

stor::DQMGroup Class Reference

#include <EventFilter/StorageManager/interface/DQMInstance.h>

List of all members.

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_


Detailed Description

Definition at line 39 of file DQMInstance.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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]

Definition at line 51 of file DQMInstance.h.

References lastServed_.

00051 { return(lastServed_);}

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]

Definition at line 45 of file DQMInstance.h.

References nUpdates_.

00045 { return(nUpdates_);}

int stor::DQMGroup::getReadyTime (  )  [inline]

Definition at line 46 of file DQMInstance.h.

References readyTime_.

00046 { return(readyTime_);}

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 }

bool DQMGroup::isReady ( int  currentTime  ) 

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 }

void stor::DQMGroup::setLastEvent ( int  lastEvent  )  [inline]

Definition at line 48 of file DQMInstance.h.

References lastEvent_.

Referenced by stor::DQMInstance::updateObject().

00048 { lastEvent_=lastEvent;}

void stor::DQMGroup::setLastServed (  )  [inline]

Definition at line 56 of file DQMInstance.h.

References lastServed_.

00056 { lastServed_->Set();}

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_);}


Member Data Documentation

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]

Definition at line 64 of file DQMInstance.h.

Referenced by getLastEvent(), and setLastEvent().

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]

Definition at line 62 of file DQMInstance.h.

Referenced by getNUpdates(), and incrementUpdates().

int stor::DQMGroup::readyTime_ [protected]

Definition at line 63 of file DQMInstance.h.

Referenced by getReadyTime(), and isReady().

bool stor::DQMGroup::wasServedSinceUpdate_ [protected]

Definition at line 65 of file DQMInstance.h.

Referenced by incrementUpdates(), setServedSinceUpdate(), and wasServedSinceUpdate().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:52:50 2009 for CMSSW by  doxygen 1.5.4