ATLAS Offline Software
IPerfMonSvc.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // IPerfMonSvc.h
8 // Header file for class IPerfMonSvc
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef PERFMONKERNEL_IPERFMONSVC_H
12 #define PERFMONKERNEL_IPERFMONSVC_H 1
13 
19 // STL includes
20 #include <utility> // std::pair
21 #include <string>
22 #include <vector>
23 
24 // FrameWork includes
25 #include "GaudiKernel/IMonitorSvc.h"
26 #include "GaudiKernel/INamedInterface.h"
27 #include "GaudiKernel/StatEntity.h"
28 
29 // PerfMonKernel includes
31 
32 // forward declaration
33 namespace AIDA { class IBaseHistogram; }
34 namespace PerfMon { struct Component; }
35 namespace PerfMon { struct IoContainer; }
36 
37 class IPerfMonSvc : virtual public IMonitorSvc
38 {
40  // Public methods:
42  public:
43 
46  virtual ~IPerfMonSvc();
47 
49  // Const methods:
51 
54  { return m_monState; }
55 
57  const std::string& monStateName() const
58  { return PerfMon::Steps[m_monState]; }
59 
61  std::vector<std::string>
63  { return this->components(PerfMon::Steps[step]); }
64 
66  virtual
67  std::vector<std::string>
68  components(const std::string& stepName) const = 0;
69 
71  virtual
72  std::vector<std::string>
73  io_components() const = 0;
74 
77  const PerfMon::Component*
79  const std::string& compName) const
80  { return this->component(PerfMon::Steps[step], compName); }
81 
84  virtual
85  const PerfMon::Component*
86  component(const std::string& stepName,
87  const std::string& compName) const = 0;
88 
90  virtual
92  io_component(const std::string& compName) const = 0;
93 
95  virtual
96  void
97  domain(const std::string& compName, std::string& domain) const = 0;
98 
100  // Non-const methods:
102 
103  static const InterfaceID& interfaceID();
104 
111  virtual void declareInfo( const std::string& name,
112  const bool& var,
113  const std::string& desc,
114  const IInterface* owner ) = 0;
115  virtual void declareInfo( const std::string& name,
116  const int& var,
117  const std::string& desc,
118  const IInterface* owner ) = 0;
119  virtual void declareInfo( const std::string& name,
120  const long& var,
121  const std::string& desc,
122  const IInterface* owner ) = 0;
123  virtual void declareInfo( const std::string& name,
124  const double& var,
125  const std::string& desc,
126  const IInterface* owner ) = 0;
127  virtual void declareInfo( const std::string& name,
128  const std::string& var,
129  const std::string& desc,
130  const IInterface* owner ) = 0;
131  virtual void declareInfo( const std::string& name,
132  const std::pair<double,double>& var,
133  const std::string& desc,
134  const IInterface* owner ) = 0;
135  virtual void declareInfo( const std::string& name,
136  const AIDA::IBaseHistogram* var,
137  const std::string& desc,
138  const IInterface* owner ) = 0;
139  virtual void declareInfo( const std::string& name,
140  const std::string& format,
141  const void * var, int size,
142  const std::string& desc,
143  const IInterface* owner ) = 0;
144  virtual void declareInfo(const std::string& name,
145  const StatEntity& var,
146  const std::string& desc,
147  const IInterface* owner) = 0;
148 
153  virtual void undeclareInfo( const std::string& name,
154  const IInterface* owner ) = 0;
158  virtual void undeclareAll( const IInterface* owner ) = 0;
159 
164  virtual std::set<std::string>* getInfos(const IInterface* owner = 0) = 0;
165 
169  virtual void startAud( const std::string& stepName,
170  const std::string& compName = "PerfMonSlice" ) = 0;
171 
175  virtual void stopAud( const std::string& stepName,
176  const std::string& compName = "PerfMonSlice" ) = 0;
177 
179  // Protected methods:
181  protected:
182 
185  { m_monState = step; }
186 
188  // Private methods:
190  private:
191 
194 };
195 
196 
198 // Inline methods:
200 inline const InterfaceID& IPerfMonSvc::interfaceID()
201 {
202  static const InterfaceID IID_IPerfMonSvc("IPerfMonSvc", 1, 0);
203  return IID_IPerfMonSvc;
204 }
205 
206 #endif //> PERFMONKERNEL_IPERFMONSVC_H
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
IPerfMonSvc::setMonState
void setMonState(PerfMon::State::Type step)
set the current state of the Gaudi's FSM
Definition: IPerfMonSvc.h:184
PerfMonDefs.h
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
AddEmptyComponent.compName
compName
Definition: AddEmptyComponent.py:32
IPerfMonSvc::~IPerfMonSvc
virtual ~IPerfMonSvc()
Destructor:
Definition: IPerfMonSvc.cxx:25
IPerfMonSvc::component
const PerfMon::Component * component(PerfMon::State::Type step, const std::string &compName) const
retrieve the monitored value for the component compName and for the step step (ini,...
Definition: IPerfMonSvc.h:78
IPerfMonSvc::io_component
virtual const PerfMon::IoContainer * io_component(const std::string &compName) const =0
retrieve the I/O monitored value for the I/O component compName
vtune_athena.format
format
Definition: vtune_athena.py:14
IPerfMonSvc::undeclareInfo
virtual void undeclareInfo(const std::string &name, const IInterface *owner)=0
Undeclare monitoring information.
PerfMon::State::Type
Type
Definition: PerfMonDefs.h:28
AIDA
Definition: IPerfMonSvc.h:33
IPerfMonSvc::m_monState
PerfMon::State::Type m_monState
current state of the Gaudi's FSM
Definition: IPerfMonSvc.h:193
IPerfMonSvc::startAud
virtual void startAud(const std::string &stepName, const std::string &compName="PerfMonSlice")=0
Start collecting monitoring data for a given component, for a given step of the Gaudi FSM.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
IPerfMonSvc::domain
virtual void domain(const std::string &compName, std::string &domain) const =0
retrieve the domain name for a given component compName
PerfMon
a simple malloc wrapper that keeps track of the amount of memory allocated on the heap.
Definition: CallGraphAuditor.cxx:24
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const int &var, const std::string &desc, const IInterface *owner)=0
CaloCondBlobAlgs_fillNoiseFromASCII.desc
desc
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:54
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const std::string &var, const std::string &desc, const IInterface *owner)=0
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const AIDA::IBaseHistogram *var, const std::string &desc, const IInterface *owner)=0
IPerfMonSvc::component
virtual const PerfMon::Component * component(const std::string &stepName, const std::string &compName) const =0
retrieve the monitored value for the component compName and for the step stepName (ini,...
PerfMon::Component
Definition: DataModel.h:73
IPerfMonSvc::monStateName
const std::string & monStateName() const
Retrieve the name of the current state of Gaudi's FSM.
Definition: IPerfMonSvc.h:57
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const StatEntity &var, const std::string &desc, const IInterface *owner)=0
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const long &var, const std::string &desc, const IInterface *owner)=0
IPerfMonSvc::io_components
virtual std::vector< std::string > io_components() const =0
return the list of io-components' names
IPerfMonSvc
Definition: IPerfMonSvc.h:38
IPerfMonSvc::undeclareAll
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.
PerfMon::IoContainer
Definition: DataModel.h:67
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const std::pair< double, double > &var, const std::string &desc, const IInterface *owner)=0
lwtDev::Component
Component
Definition: NNLayerConfig.h:25
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const double &var, const std::string &desc, const IInterface *owner)=0
LArCellBinning.step
step
Definition: LArCellBinning.py:158
IPerfMonSvc::stopAud
virtual void stopAud(const std::string &stepName, const std::string &compName="PerfMonSlice")=0
Stop collecting monitoring data for a given component, for a given step of the Gaudi FSM.
IPerfMonSvc::getInfos
virtual std::set< std::string > * getInfos(const IInterface *owner=0)=0
Get the names for all declared monitoring informations for a given owener.
IPerfMonSvc::components
virtual std::vector< std::string > components(const std::string &stepName) const =0
return the list of components' names for a given step
IPerfMonSvc::monState
PerfMon::State::Type monState() const
Retrieve the current state of Gaudi's finite state machine.
Definition: IPerfMonSvc.h:53
IPerfMonSvc::components
std::vector< std::string > components(PerfMon::State::Type step) const
return the list of components' names for a given step
Definition: IPerfMonSvc.h:62
IPerfMonSvc::interfaceID
static const InterfaceID & interfaceID()
Definition: IPerfMonSvc.h:200
IPerfMonSvc::declareInfo
virtual void declareInfo(const std::string &name, const std::string &format, const void *var, int size, const std::string &desc, const IInterface *owner)=0