CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MonitorCollection.cc
Go to the documentation of this file.
1 // $Id: MonitorCollection.cc,v 1.10.2.1 2011/03/07 11:33:05 mommsen Exp $
3 
6 
7 
8 namespace stor {
9 
11  updateInterval_(updateInterval),
12  lastCalculateStatistics_(boost::posix_time::not_a_date_time),
13  infoSpaceUpdateNeeded_(false)
14  {}
15 
16 
18  {
19  // do any operations that are common for all child classes
20 
22  }
23 
24 
26  {
27  if ( lastCalculateStatistics_.is_not_a_date_time() ||
29  {
33  }
34  }
35 
36 
38  {
40  {
42  infoSpaceUpdateNeeded_ = false;
43  }
44  }
45 
46 
48  {
49  do_reset();
50 
51  // Assure that the first update happens early.
52  // This is important for long update intervals.
55  }
56 
57 } // namespace stor
58 
double seconds()
virtual void do_calculateStatistics()=0
virtual void do_appendInfoSpaceItems(InfoSpaceItems &)
boost::posix_time::time_duration Duration_t
Definition: Utils.h:41
virtual void do_reset()=0
boost::posix_time::ptime TimePoint_t
Definition: Utils.h:35
void appendInfoSpaceItems(InfoSpaceItems &)
virtual void do_updateInfoSpaceItems()
void reset(const utils::TimePoint_t &now)
void calculateStatistics(const utils::TimePoint_t &now)
utils::TimePoint_t lastCalculateStatistics_
std::vector< std::pair< std::string, xdata::Serializable * > > InfoSpaceItems
MonitorCollection(const utils::Duration_t &updateInterval)
const utils::Duration_t updateInterval_