CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMEventMonitorCollection.cc
Go to the documentation of this file.
1 // $Id: DQMEventMonitorCollection.cc,v 1.13 2011/04/04 12:03:30 mommsen Exp $
3 
4 #include <string>
5 #include <sstream>
6 #include <iomanip>
7 
10 
11 namespace stor
12 {
13 
15  MonitorCollection(updateInterval),
16  droppedDQMEventCounts_(updateInterval, boost::posix_time::seconds(300)),
17  dqmEventSizes_(updateInterval, boost::posix_time::seconds(300)),
18  servedDQMEventSizes_(updateInterval, boost::posix_time::seconds(300)),
19  writtenDQMEventSizes_(updateInterval, boost::posix_time::seconds(300)),
20  dqmEventBandwidth_(updateInterval, boost::posix_time::seconds(300)),
21  servedDQMEventBandwidth_(updateInterval, boost::posix_time::seconds(300)),
22  writtenDQMEventBandwidth_(updateInterval, boost::posix_time::seconds(300)),
23  numberOfTopLevelFolders_(updateInterval, boost::posix_time::seconds(300)),
24  numberOfUpdates_(updateInterval, boost::posix_time::seconds(300)),
25  numberOfWrittenTopLevelFolders_(updateInterval, boost::posix_time::seconds(300)),
26  numberOfCompleteUpdates_(updateInterval, boost::posix_time::seconds(300))
27  {}
28 
29 
31  {
33 
37 
41 
45 
47  }
48 
49 
51  {
53 
57 
59  dqmEventSizes_.getStats(stats);
60  if (stats.getSampleCount() > 0) {
62  }
64 
66  if (stats.getSampleCount() > 0) {
68  }
70 
72  if (stats.getSampleCount() > 0) {
74  }
76 
80 
82  }
83 
84 
86  {
88 
92 
96 
100 
102  }
103 
104 
106  {
107  infoSpaceItems.push_back(std::make_pair("dqmFoldersPerEP", &dqmFoldersPerEP_));
108  infoSpaceItems.push_back(std::make_pair("processedDQMEvents", &processedDQMEvents_));
109  infoSpaceItems.push_back(std::make_pair("droppedDQMEvents", &droppedDQMEvents_));
110  infoSpaceItems.push_back(std::make_pair("discardedDQMEvents", &droppedDQMEvents_));
111  infoSpaceItems.push_back(std::make_pair("completeDQMUpdates", &completeDQMUpdates_));
112  }
113 
114 
116  {
118  getStats(stats);
119 
120  dqmFoldersPerEP_ = static_cast<xdata::Double>(
122 
123  processedDQMEvents_ = static_cast<xdata::UnsignedInteger32>(
124  static_cast<unsigned int>(stats.dqmEventSizeStats.getSampleCount(MonitoredQuantity::FULL)));
125 
126  droppedDQMEvents_ = static_cast<xdata::UnsignedInteger32>(
127  static_cast<unsigned int>(stats.droppedDQMEventCountsStats.getValueSum(MonitoredQuantity::FULL)));
128 
129  completeDQMUpdates_ = static_cast<xdata::Double>(
131  }
132 
133 } // namespace stor
134 
virtual void do_appendInfoSpaceItems(InfoSpaceItems &)
double seconds()
void addSample(const double &value=1)
uint64_t getSampleCount(DataSetType t=FULL) const
void getStats(Stats &stats) const
xdata::UnsignedInteger32 droppedDQMEvents_
const MonitoredQuantity & getDroppedDQMEventCountsMQ() const
const MonitoredQuantity & getWrittenDQMEventBandwidthMQ() const
void calculateStatistics(const utils::TimePoint_t &currentTime=utils::getCurrentTime())
boost::posix_time::time_duration Duration_t
Definition: Utils.h:41
DQMEventMonitorCollection(const utils::Duration_t &updateInterval)
const MonitoredQuantity & getNumberOfUpdatesMQ() const
double getValueAverage(DataSetType t=FULL) const
const MonitoredQuantity & getDQMEventSizeMQ() const
const MonitoredQuantity & getNumberOfCompleteUpdatesMQ() const
void getStats(DQMEventStats &stats) const
std::vector< std::pair< std::string, xdata::Serializable * > > InfoSpaceItems
const MonitoredQuantity & getWrittenDQMEventSizeMQ() const
const MonitoredQuantity & getNumberOfTopLevelFoldersMQ() const
const MonitoredQuantity & getServedDQMEventBandwidthMQ() const
const MonitoredQuantity & getServedDQMEventSizeMQ() const
const MonitoredQuantity & getNumberOfWrittenTopLevelFoldersMQ() const
const MonitoredQuantity & getDQMEventBandwidthMQ() const
double getValueSum(DataSetType t=FULL) const
xdata::UnsignedInteger32 processedDQMEvents_