Commits

bi...@4525493e-7705-40b1-a816-d608a930855b  committed c1c48b9

extended IPerfMonSvc interface: iterate over components and their monitored data

  • Participants
  • Parent commits c687361

Comments (0)

Files changed (3)

+2009-08-30  Sebastien Binet  <binet@farnsworth>
+
+	* tagging PerfMonKernel-00-09-00
+	* extended IPerfMonSvc interface
+	* M PerfMonKernel/IPerfMonSvc.h
+
 2008-06-26  Sebastien Binet  <binet@lblbox>
 
 	* tagging PerfMonKernel-00-08-00

File PerfMonKernel/IPerfMonSvc.h

 // Author: S.Binet<binet@cern.ch>
 /////////////////////////////////////////////////////////////////// 
 #ifndef PERFMONKERNEL_IPERFMONSVC_H 
-#define PERFMONKERNEL_IPERFMONSVC_H 
+#define PERFMONKERNEL_IPERFMONSVC_H 1
 
 /** @class IPerfMonSvc
  *  This is the interface to the main service scheduling a performance 
 // forward declaration
 namespace AIDA { class IBaseHistogram; }
 namespace PerfMon { class ScopedMonitor; }
+namespace PerfMon { class Component; }
+namespace PerfMon { class IoContainer; }
 
 class IPerfMonSvc : virtual public IMonitorSvc
 { 
   const std::string& monStateName() const 
   { return PerfMon::Steps[m_monState]; }
 
+  /// @brief return the list of components' names for a given step
+  std::vector<std::string>
+  components(PerfMon::State::Type step) const
+  { return this->components(PerfMon::Steps[step]); }
+
+  /// @brief return the list of components' names for a given step
+  virtual
+  std::vector<std::string>
+  components(const std::string& stepName) const = 0;
+
+  /// retrieve the monitored value for the component `compName` and 
+  /// for the step `step` (ini,evt,fin,cbk,...)
+  const PerfMon::Component*
+  component(PerfMon::State::Type step,
+	    const std::string& compName) const
+  { return this->component(PerfMon::Steps[step], compName); }
+
+  /// retrieve the monitored value for the component `compName` and 
+  /// for the step `stepName` (ini,evt,fin,cbk,...)
+  virtual
+  const PerfMon::Component*
+  component(const std::string& stepName,
+	    const std::string& compName) const = 0;
+
+  /// retrieve the I/O monitored value for the I/O component `compName`
+  virtual
+  const PerfMon::IoContainer*
+  io_component(const std::string& compName) const = 0;
+
   /////////////////////////////////////////////////////////////////// 
   // Non-const methods: 
   /////////////////////////////////////////////////////////////////// 

File PerfMonKernel/PerfMonDefs.h

       evt,
       fin,
       cbk,
+      io,
 
       // keep last !
       Size
     //"run", 
     "evt", 
     "fin",
-    "cbk"
+    "cbk",
+    "io"
     }
   };