CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

stor::MonitorCollection Class Reference

#include <MonitorCollection.h>

Inheritance diagram for stor::MonitorCollection:
smproxy::DataRetrieverMonitorCollection stor::ConsumerMonitorCollection stor::DataSenderMonitorCollection stor::DQMEventMonitorCollection stor::FilesMonitorCollection stor::FragmentMonitorCollection stor::ResourceMonitorCollection stor::RunMonitorCollection stor::StateMachineMonitorCollection stor::StreamsMonitorCollection stor::ThroughputMonitorCollection

List of all members.

Public Types

typedef std::vector< std::pair
< std::string,
xdata::Serializable * > > 
InfoSpaceItems

Public Member Functions

void appendInfoSpaceItems (InfoSpaceItems &)
void calculateStatistics (const utils::TimePoint_t &now)
 MonitorCollection (const utils::Duration_t &updateInterval)
void reset (const utils::TimePoint_t &now)
void updateInfoSpaceItems ()
virtual ~MonitorCollection ()

Protected Member Functions

virtual void do_appendInfoSpaceItems (InfoSpaceItems &)
virtual void do_calculateStatistics ()=0
virtual void do_reset ()=0
virtual void do_updateInfoSpaceItems ()

Private Member Functions

 MonitorCollection (MonitorCollection const &)
MonitorCollectionoperator= (MonitorCollection const &)

Private Attributes

bool infoSpaceUpdateNeeded_
utils::TimePoint_t lastCalculateStatistics_
const utils::Duration_t updateInterval_

Detailed Description

An abstract collection of MonitoredQuantities

Author:
mommsen
Revision:
1.6
Date:
2011/03/07 15:31:32

Definition at line 25 of file MonitorCollection.h.


Member Typedef Documentation

typedef std::vector< std::pair<std::string, xdata::Serializable*> > stor::MonitorCollection::InfoSpaceItems

Definition at line 29 of file MonitorCollection.h.


Constructor & Destructor Documentation

stor::MonitorCollection::MonitorCollection ( const utils::Duration_t updateInterval) [explicit]

Definition at line 10 of file MonitorCollection.cc.

                                                                            :
  updateInterval_(updateInterval),
  lastCalculateStatistics_(boost::posix_time::not_a_date_time),
  infoSpaceUpdateNeeded_(false)
  {}
virtual stor::MonitorCollection::~MonitorCollection ( ) [inline, virtual]

Definition at line 36 of file MonitorCollection.h.

{};
stor::MonitorCollection::MonitorCollection ( MonitorCollection const &  ) [private]

Member Function Documentation

void stor::MonitorCollection::appendInfoSpaceItems ( InfoSpaceItems items)

Append the info space items to be published in the monitoring info space to the InfoSpaceItems

Definition at line 17 of file MonitorCollection.cc.

References do_appendInfoSpaceItems().

Referenced by smproxy::StatisticsReporter::collectInfoSpaceItems(), and stor::StatisticsReporter::collectInfoSpaceItems().

  {
    // do any operations that are common for all child classes
    
    do_appendInfoSpaceItems(items);
  }
void stor::MonitorCollection::calculateStatistics ( const utils::TimePoint_t now)
virtual void stor::MonitorCollection::do_appendInfoSpaceItems ( InfoSpaceItems ) [inline, protected, virtual]
virtual void stor::MonitorCollection::do_calculateStatistics ( ) [protected, pure virtual]
virtual void stor::MonitorCollection::do_reset ( ) [protected, pure virtual]
virtual void stor::MonitorCollection::do_updateInfoSpaceItems ( ) [inline, protected, virtual]
MonitorCollection& stor::MonitorCollection::operator= ( MonitorCollection const &  ) [private]
void stor::MonitorCollection::reset ( const utils::TimePoint_t now)

Resets the monitored quantities

Definition at line 47 of file MonitorCollection.cc.

References do_reset(), infoSpaceUpdateNeeded_, lastCalculateStatistics_, seconds(), and updateInterval_.

Referenced by stor::StatisticsReporter::reset(), and smproxy::StatisticsReporter::reset().

  {
    do_reset();
    
    // Assure that the first update happens early.
    // This is important for long update intervals.
    lastCalculateStatistics_ = now - updateInterval_ + boost::posix_time::seconds(1);
    infoSpaceUpdateNeeded_ = true;
  }
void stor::MonitorCollection::updateInfoSpaceItems ( )

Update all values of the items put into the monitoring info space. The caller has to make sure that the info space where the items reside is locked and properly unlocked after the call.

Definition at line 37 of file MonitorCollection.cc.

References do_updateInfoSpaceItems(), and infoSpaceUpdateNeeded_.

Referenced by stor::StatisticsReporter::actionPerformed(), smproxy::StatisticsReporter::updateInfoSpace(), and stor::StatisticsReporter::updateInfoSpace().


Member Data Documentation

Definition at line 79 of file MonitorCollection.h.

Referenced by calculateStatistics(), reset(), and updateInfoSpaceItems().

Definition at line 78 of file MonitorCollection.h.

Referenced by calculateStatistics(), and reset().