CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
stor::FragmentMonitorCollection Class Reference

#include <FragmentMonitorCollection.h>

Inheritance diagram for stor::FragmentMonitorCollection:
stor::MonitorCollection

Classes

struct  FragmentStats
 

Public Member Functions

void addDQMEventFragmentSample (const double bytecount)
 
void addEventFragmentSample (const double bytecount)
 
void addFragmentSample (const double bytecount)
 
 FragmentMonitorCollection (const utils::Duration_t &updateInterval)
 
const MonitoredQuantitygetAllFragmentBandwidthMQ () const
 
MonitoredQuantitygetAllFragmentBandwidthMQ ()
 
const MonitoredQuantitygetAllFragmentSizeMQ () const
 
MonitoredQuantitygetAllFragmentSizeMQ ()
 
const MonitoredQuantitygetDQMEventFragmentBandwidthMQ () const
 
MonitoredQuantitygetDQMEventFragmentBandwidthMQ ()
 
const MonitoredQuantitygetDQMEventFragmentSizeMQ () const
 
MonitoredQuantitygetDQMEventFragmentSizeMQ ()
 
const MonitoredQuantitygetEventFragmentBandwidthMQ () const
 
MonitoredQuantitygetEventFragmentBandwidthMQ ()
 
const MonitoredQuantitygetEventFragmentSizeMQ () const
 
MonitoredQuantitygetEventFragmentSizeMQ ()
 
void getStats (FragmentStats &stats) const
 
- Public Member Functions inherited from stor::MonitorCollection
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 ()
 

Private Member Functions

virtual void do_appendInfoSpaceItems (InfoSpaceItems &)
 
virtual void do_calculateStatistics ()
 
virtual void do_reset ()
 
virtual void do_updateInfoSpaceItems ()
 
 FragmentMonitorCollection (FragmentMonitorCollection const &)
 
FragmentMonitorCollectionoperator= (FragmentMonitorCollection const &)
 

Private Attributes

MonitoredQuantity allFragmentBandwidth_
 
MonitoredQuantity allFragmentSizes_
 
MonitoredQuantity dqmEventFragmentBandwidth_
 
MonitoredQuantity dqmEventFragmentSizes_
 
MonitoredQuantity eventFragmentBandwidth_
 
MonitoredQuantity eventFragmentSizes_
 
xdata::Double instantBandwidth_
 
xdata::Double instantRate_
 
xdata::UnsignedInteger32 receivedFrames_
 

Additional Inherited Members

- Public Types inherited from stor::MonitorCollection
typedef std::vector< std::pair
< std::string,
xdata::Serializable * > > 
InfoSpaceItems
 

Detailed Description

A collection of MonitoredQuantities related to fragments

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

Definition at line 23 of file FragmentMonitorCollection.h.

Constructor & Destructor Documentation

stor::FragmentMonitorCollection::FragmentMonitorCollection ( const utils::Duration_t updateInterval)
explicit

Definition at line 14 of file FragmentMonitorCollection.cc.

14  :
15  MonitorCollection(updateInterval),
22  {}
double seconds()
MonitorCollection(const utils::Duration_t &updateInterval)
stor::FragmentMonitorCollection::FragmentMonitorCollection ( FragmentMonitorCollection const &  )
private

Member Function Documentation

void stor::FragmentMonitorCollection::addDQMEventFragmentSample ( const double  bytecount)

Add a DQM event fragment size of bytes

Definition at line 40 of file FragmentMonitorCollection.cc.

References stor::MonitoredQuantity::addSample(), allFragmentSizes_, and dqmEventFragmentSizes_.

Referenced by stor::StorageManager::receiveDQMMessage().

41  {
42  double mbytes = bytecount / 0x100000;
45  }
void addSample(const double &value=1)
void stor::FragmentMonitorCollection::addEventFragmentSample ( const double  bytecount)

Add an event fragment size of bytes

Definition at line 32 of file FragmentMonitorCollection.cc.

References stor::MonitoredQuantity::addSample(), allFragmentSizes_, and eventFragmentSizes_.

Referenced by stor::StorageManager::receiveDataMessage(), and stor::StorageManager::receiveErrorDataMessage().

33  {
34  double mbytes = bytecount / 0x100000;
37  }
void addSample(const double &value=1)
void stor::FragmentMonitorCollection::addFragmentSample ( const double  bytecount)

Add a generic fragment size of bytes

Definition at line 25 of file FragmentMonitorCollection.cc.

References stor::MonitoredQuantity::addSample(), and allFragmentSizes_.

Referenced by stor::StorageManager::receiveEndOfLumiSectionMessage().

26  {
27  double mbytes = bytecount / 0x100000;
29  }
void addSample(const double &value=1)
void stor::FragmentMonitorCollection::do_appendInfoSpaceItems ( InfoSpaceItems infoSpaceItems)
privatevirtual

Reimplemented from stor::MonitorCollection.

Definition at line 99 of file FragmentMonitorCollection.cc.

References instantBandwidth_, instantRate_, and receivedFrames_.

100  {
101  infoSpaceItems.push_back(std::make_pair("receivedFrames", &receivedFrames_));
102  infoSpaceItems.push_back(std::make_pair("instantBandwidth", &instantBandwidth_));
103  infoSpaceItems.push_back(std::make_pair("instantRate", &instantRate_));
104  }
void stor::FragmentMonitorCollection::do_calculateStatistics ( )
privatevirtual

Implements stor::MonitorCollection.

Definition at line 60 of file FragmentMonitorCollection.cc.

References stor::MonitoredQuantity::addSample(), allFragmentBandwidth_, allFragmentSizes_, stor::MonitoredQuantity::calculateStatistics(), dqmEventFragmentBandwidth_, dqmEventFragmentSizes_, eventFragmentBandwidth_, eventFragmentSizes_, stor::MonitoredQuantity::Stats::getLastValueRate(), stor::MonitoredQuantity::Stats::getSampleCount(), and stor::MonitoredQuantity::getStats().

61  {
65 
66  MonitoredQuantity::Stats stats;
68  if (stats.getSampleCount() > 0) {
69  allFragmentBandwidth_.addSample(stats.getLastValueRate());
70  }
72 
74  if (stats.getSampleCount() > 0) {
75  eventFragmentBandwidth_.addSample(stats.getLastValueRate());
76  }
78 
80  if (stats.getSampleCount() > 0) {
81  dqmEventFragmentBandwidth_.addSample(stats.getLastValueRate());
82  }
84  }
void addSample(const double &value=1)
void getStats(Stats &stats) const
void calculateStatistics(const utils::TimePoint_t &currentTime=utils::getCurrentTime())
void stor::FragmentMonitorCollection::do_reset ( )
privatevirtual
void stor::FragmentMonitorCollection::do_updateInfoSpaceItems ( )
privatevirtual

Reimplemented from stor::MonitorCollection.

Definition at line 107 of file FragmentMonitorCollection.cc.

References allFragmentBandwidth_, allFragmentSizes_, stor::MonitoredQuantity::Stats::getSampleCount(), stor::MonitoredQuantity::Stats::getSampleRate(), stor::MonitoredQuantity::getStats(), stor::MonitoredQuantity::Stats::getValueRate(), instantBandwidth_, instantRate_, receivedFrames_, and stor::MonitoredQuantity::RECENT.

108  {
109  MonitoredQuantity::Stats stats;
110 
112  receivedFrames_ = static_cast<xdata::UnsignedInteger32>(stats.getSampleCount());
113  instantRate_ = static_cast<xdata::Double>(stats.getSampleRate(MonitoredQuantity::RECENT));
114 
116  instantBandwidth_ = static_cast<xdata::Double>(stats.getValueRate(MonitoredQuantity::RECENT));
117  }
void getStats(Stats &stats) const
const MonitoredQuantity& stor::FragmentMonitorCollection::getAllFragmentBandwidthMQ ( ) const
inline

Definition at line 89 of file FragmentMonitorCollection.h.

References allFragmentBandwidth_.

Referenced by getStats().

89  {
90  return allFragmentBandwidth_;
91  }
MonitoredQuantity& stor::FragmentMonitorCollection::getAllFragmentBandwidthMQ ( )
inline

Definition at line 92 of file FragmentMonitorCollection.h.

References allFragmentBandwidth_.

92  {
93  return allFragmentBandwidth_;
94  }
const MonitoredQuantity& stor::FragmentMonitorCollection::getAllFragmentSizeMQ ( ) const
inline

Definition at line 68 of file FragmentMonitorCollection.h.

References allFragmentSizes_.

Referenced by getStats(), and stor::StorageManager::receiveRegistryMessage().

68  {
69  return allFragmentSizes_;
70  }
MonitoredQuantity& stor::FragmentMonitorCollection::getAllFragmentSizeMQ ( )
inline

Definition at line 71 of file FragmentMonitorCollection.h.

References allFragmentSizes_.

71  {
72  return allFragmentSizes_;
73  }
const MonitoredQuantity& stor::FragmentMonitorCollection::getDQMEventFragmentBandwidthMQ ( ) const
inline

Definition at line 103 of file FragmentMonitorCollection.h.

References dqmEventFragmentBandwidth_.

Referenced by getStats().

103  {
105  }
MonitoredQuantity& stor::FragmentMonitorCollection::getDQMEventFragmentBandwidthMQ ( )
inline

Definition at line 106 of file FragmentMonitorCollection.h.

References dqmEventFragmentBandwidth_.

106  {
108  }
const MonitoredQuantity& stor::FragmentMonitorCollection::getDQMEventFragmentSizeMQ ( ) const
inline

Definition at line 82 of file FragmentMonitorCollection.h.

References dqmEventFragmentSizes_.

Referenced by getStats().

82  {
84  }
MonitoredQuantity& stor::FragmentMonitorCollection::getDQMEventFragmentSizeMQ ( )
inline

Definition at line 85 of file FragmentMonitorCollection.h.

References dqmEventFragmentSizes_.

85  {
87  }
const MonitoredQuantity& stor::FragmentMonitorCollection::getEventFragmentBandwidthMQ ( ) const
inline

Definition at line 96 of file FragmentMonitorCollection.h.

References eventFragmentBandwidth_.

Referenced by getStats().

96  {
98  }
MonitoredQuantity& stor::FragmentMonitorCollection::getEventFragmentBandwidthMQ ( )
inline

Definition at line 99 of file FragmentMonitorCollection.h.

References eventFragmentBandwidth_.

99  {
101  }
const MonitoredQuantity& stor::FragmentMonitorCollection::getEventFragmentSizeMQ ( ) const
inline

Definition at line 75 of file FragmentMonitorCollection.h.

References eventFragmentSizes_.

Referenced by getStats().

75  {
76  return eventFragmentSizes_;
77  }
MonitoredQuantity& stor::FragmentMonitorCollection::getEventFragmentSizeMQ ( )
inline

Definition at line 78 of file FragmentMonitorCollection.h.

References eventFragmentSizes_.

78  {
79  return eventFragmentSizes_;
80  }
void stor::FragmentMonitorCollection::getStats ( FragmentStats stats) const

Write all our collected statistics into the given Stats struct.

Definition at line 48 of file FragmentMonitorCollection.cc.

References stor::FragmentMonitorCollection::FragmentStats::allFragmentBandwidthStats, stor::FragmentMonitorCollection::FragmentStats::allFragmentSizeStats, stor::FragmentMonitorCollection::FragmentStats::dqmEventFragmentBandwidthStats, stor::FragmentMonitorCollection::FragmentStats::dqmEventFragmentSizeStats, stor::FragmentMonitorCollection::FragmentStats::eventFragmentBandwidthStats, stor::FragmentMonitorCollection::FragmentStats::eventFragmentSizeStats, getAllFragmentBandwidthMQ(), getAllFragmentSizeMQ(), getDQMEventFragmentBandwidthMQ(), getDQMEventFragmentSizeMQ(), getEventFragmentBandwidthMQ(), getEventFragmentSizeMQ(), and stor::MonitoredQuantity::getStats().

Referenced by stor::SMWebPageHelper::addDOMforFragmentMonitor().

49  {
50  getAllFragmentSizeMQ().getStats(stats.allFragmentSizeStats);
51  getEventFragmentSizeMQ().getStats(stats.eventFragmentSizeStats);
52  getDQMEventFragmentSizeMQ().getStats(stats.dqmEventFragmentSizeStats);
53 
54  getAllFragmentBandwidthMQ().getStats(stats.allFragmentBandwidthStats);
55  getEventFragmentBandwidthMQ().getStats(stats.eventFragmentBandwidthStats);
56  getDQMEventFragmentBandwidthMQ().getStats(stats.dqmEventFragmentBandwidthStats);
57  }
const MonitoredQuantity & getAllFragmentSizeMQ() const
const MonitoredQuantity & getDQMEventFragmentSizeMQ() const
void getStats(Stats &stats) const
const MonitoredQuantity & getEventFragmentBandwidthMQ() const
const MonitoredQuantity & getDQMEventFragmentBandwidthMQ() const
const MonitoredQuantity & getEventFragmentSizeMQ() const
const MonitoredQuantity & getAllFragmentBandwidthMQ() const
FragmentMonitorCollection& stor::FragmentMonitorCollection::operator= ( FragmentMonitorCollection const &  )
private

Member Data Documentation

MonitoredQuantity stor::FragmentMonitorCollection::allFragmentBandwidth_
private
MonitoredQuantity stor::FragmentMonitorCollection::allFragmentSizes_
private
MonitoredQuantity stor::FragmentMonitorCollection::dqmEventFragmentBandwidth_
private
MonitoredQuantity stor::FragmentMonitorCollection::dqmEventFragmentSizes_
private
MonitoredQuantity stor::FragmentMonitorCollection::eventFragmentBandwidth_
private
MonitoredQuantity stor::FragmentMonitorCollection::eventFragmentSizes_
private
xdata::Double stor::FragmentMonitorCollection::instantBandwidth_
private
xdata::Double stor::FragmentMonitorCollection::instantRate_
private
xdata::UnsignedInteger32 stor::FragmentMonitorCollection::receivedFrames_
private