CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/EventFilter/StorageManager/interface/DQMEventMonitorCollection.h

Go to the documentation of this file.
00001 // $Id: DQMEventMonitorCollection.h,v 1.9 2011/04/04 12:03:30 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_DQMEventMonitorCollection_h
00005 #define EventFilter_StorageManager_DQMEventMonitorCollection_h
00006 
00007 #include "xdata/Double.h"
00008 #include "xdata/UnsignedInteger32.h"
00009 
00010 #include "EventFilter/StorageManager/interface/MonitorCollection.h"
00011 
00012 
00013 namespace stor {
00014 
00023   class DQMEventMonitorCollection : public MonitorCollection
00024   {
00025   private:
00026 
00027     MonitoredQuantity droppedDQMEventCounts_;
00028 
00029     MonitoredQuantity dqmEventSizes_;
00030     MonitoredQuantity servedDQMEventSizes_;
00031     MonitoredQuantity writtenDQMEventSizes_;
00032 
00033     MonitoredQuantity dqmEventBandwidth_;
00034     MonitoredQuantity servedDQMEventBandwidth_;
00035     MonitoredQuantity writtenDQMEventBandwidth_;
00036 
00037     MonitoredQuantity numberOfTopLevelFolders_;
00038     MonitoredQuantity numberOfUpdates_;
00039     MonitoredQuantity numberOfWrittenTopLevelFolders_;
00040 
00041     MonitoredQuantity numberOfCompleteUpdates_;
00042 
00043   public:
00044 
00045     struct DQMEventStats
00046     {
00047       MonitoredQuantity::Stats droppedDQMEventCountsStats;  //number of events
00048       
00049       MonitoredQuantity::Stats dqmEventSizeStats;             //MB
00050       MonitoredQuantity::Stats servedDQMEventSizeStats;       //MB
00051       MonitoredQuantity::Stats writtenDQMEventSizeStats;      //MB
00052       
00053       MonitoredQuantity::Stats dqmEventBandwidthStats;        //MB/s
00054       MonitoredQuantity::Stats servedDQMEventBandwidthStats;  //MB/s
00055       MonitoredQuantity::Stats writtenDQMEventBandwidthStats; //MB/s
00056 
00057       MonitoredQuantity::Stats numberOfTopLevelFoldersStats;  //number of top level folders
00058       MonitoredQuantity::Stats numberOfUpdatesStats;          //number of received updates per DQMKey
00059       MonitoredQuantity::Stats numberOfWrittenTopLevelFoldersStats; //number of top level folders written to disk
00060 
00061       MonitoredQuantity::Stats numberOfCompleteUpdatesStats;  //number of complete updates
00062     };
00063 
00064     explicit DQMEventMonitorCollection(const utils::Duration_t& updateInterval);
00065 
00066     const MonitoredQuantity& getDroppedDQMEventCountsMQ() const {
00067       return droppedDQMEventCounts_;
00068     }
00069     MonitoredQuantity& getDroppedDQMEventCountsMQ() {
00070       return droppedDQMEventCounts_;
00071     }
00072 
00073     const MonitoredQuantity& getDQMEventSizeMQ() const {
00074       return dqmEventSizes_;
00075     }
00076     MonitoredQuantity& getDQMEventSizeMQ() {
00077       return dqmEventSizes_;
00078     }
00079 
00080     const MonitoredQuantity& getServedDQMEventSizeMQ() const {
00081       return servedDQMEventSizes_;
00082     }
00083     MonitoredQuantity& getServedDQMEventSizeMQ() {
00084       return servedDQMEventSizes_;
00085     }
00086 
00087     const MonitoredQuantity& getWrittenDQMEventSizeMQ() const {
00088       return writtenDQMEventSizes_;
00089     }
00090     MonitoredQuantity& getWrittenDQMEventSizeMQ() {
00091       return writtenDQMEventSizes_;
00092     }
00093 
00094     const MonitoredQuantity& getDQMEventBandwidthMQ() const {
00095       return dqmEventBandwidth_;
00096     }
00097     MonitoredQuantity& getDQMEventBandwidthMQ() {
00098       return dqmEventBandwidth_;
00099     }
00100 
00101     const MonitoredQuantity& getServedDQMEventBandwidthMQ() const {
00102       return servedDQMEventBandwidth_;
00103     }
00104     MonitoredQuantity& getServedDQMEventBandwidthMQ() {
00105       return servedDQMEventBandwidth_;
00106     }
00107 
00108     const MonitoredQuantity& getWrittenDQMEventBandwidthMQ() const {
00109       return writtenDQMEventBandwidth_;
00110     }
00111     MonitoredQuantity& getWrittenDQMEventBandwidthMQ() {
00112       return writtenDQMEventBandwidth_;
00113     }
00114 
00115     const MonitoredQuantity& getNumberOfTopLevelFoldersMQ() const {
00116       return numberOfTopLevelFolders_;
00117     }
00118     MonitoredQuantity& getNumberOfTopLevelFoldersMQ() {
00119       return numberOfTopLevelFolders_;
00120     }
00121 
00122     const MonitoredQuantity& getNumberOfUpdatesMQ() const {
00123       return numberOfUpdates_;
00124     }
00125     MonitoredQuantity& getNumberOfUpdatesMQ() {
00126       return numberOfUpdates_;
00127     }
00128 
00129     const MonitoredQuantity& getNumberOfCompleteUpdatesMQ() const {
00130       return numberOfCompleteUpdates_;
00131     }
00132     MonitoredQuantity& getNumberOfCompleteUpdatesMQ() {
00133       return numberOfCompleteUpdates_;
00134     }
00135 
00136     const MonitoredQuantity& getNumberOfWrittenTopLevelFoldersMQ() const {
00137       return numberOfWrittenTopLevelFolders_;
00138     }
00139     MonitoredQuantity& getNumberOfWrittenTopLevelFoldersMQ() {
00140       return numberOfWrittenTopLevelFolders_;
00141     }
00142 
00146     void getStats(DQMEventStats& stats) const;
00147 
00148 
00149   private:
00150 
00151     //Prevent copying of the DQMEventMonitorCollection
00152     DQMEventMonitorCollection(DQMEventMonitorCollection const&);
00153     DQMEventMonitorCollection& operator=(DQMEventMonitorCollection const&);
00154 
00155     virtual void do_calculateStatistics();
00156     virtual void do_reset();
00157     virtual void do_appendInfoSpaceItems(InfoSpaceItems&);
00158     virtual void do_updateInfoSpaceItems();
00159 
00160     xdata::Double dqmFoldersPerEP_;
00161     xdata::UnsignedInteger32 processedDQMEvents_;
00162     xdata::UnsignedInteger32 droppedDQMEvents_;
00163     xdata::Double completeDQMUpdates_;
00164   };
00165   
00166 } // namespace stor
00167 
00168 #endif // EventFilter_StorageManager_DQMEventMonitorCollection_h 
00169 
00170