Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AuditorSvc.h
Go to the documentation of this file.
1 #ifndef AuditorSvc_AuditorSvc_H
2 #define AuditorSvc_AuditorSvc_H
3 
4 // Include Files
6 #include "GaudiKernel/Service.h"
7 #include <list>
8 #include <vector>
9 
10 //------------------------------------------------------------------
11 //
12 // ClassName: AuditorSvc
13 //
14 // Description: This service manages Auditors.
15 // Auditors can be inserted in the system to audit the Algorithms is
16 // in their functions.
17 //------------------------------------------------------------------
18 class AuditorSvc : public extends<Service, IAuditorSvc> {
19 public:
20  // Inherited Service overrides:
21  //
22  // Initialize the service.
23  StatusCode initialize() override;
24 
25  // Finalize the service.
26  StatusCode finalize() override;
27 
28  // IAuditorSvc interfaces overwrite
29  //
31 
32  void before( StandardEventType, INamedInterface* ) override;
33  void before( StandardEventType, const std::string& ) override;
34 
35  void before( CustomEventTypeRef, INamedInterface* ) override;
36  void before( CustomEventTypeRef, const std::string& ) override;
37 
38  void after( StandardEventType, INamedInterface*, const StatusCode& ) override;
39  void after( StandardEventType, const std::string&, const StatusCode& ) override;
40 
41  void after( CustomEventTypeRef, INamedInterface*, const StatusCode& ) override;
42  void after( CustomEventTypeRef, const std::string&, const StatusCode& ) override;
43 
44  // inform Auditors that the initialize() is about to be called
45  void beforeInitialize( INamedInterface* ini ) override;
46  // inform Auditors that the initialize() has been called
47  void afterInitialize( INamedInterface* ini ) override;
48 
49  // inform Auditors that the reinitialize() is about to be called
50  void beforeReinitialize( INamedInterface* ini ) override;
51  // inform Auditors that the reinitialize() has been called
52  void afterReinitialize( INamedInterface* ini ) override;
53 
54  // inform Auditors that the execute() is about to be called
55  void beforeExecute( INamedInterface* ini ) override;
56  // inform Auditors that the execute() has been called
57  void afterExecute( INamedInterface* ini, const StatusCode& ) override;
58 
59  // inform Auditors that the beginRun() is about to be called
60  void beforeBeginRun( INamedInterface* ini ) override;
61  // inform Auditors that the beginRun() has been called
62  void afterBeginRun( INamedInterface* ini ) override;
63 
64  // inform Auditors that the endRun() is about to be called
65  void beforeEndRun( INamedInterface* ini ) override;
66  // inform Auditors that the endRun() has been called
67  void afterEndRun( INamedInterface* ini ) override;
68 
69  // inform Auditors that the finalize() is about to be called
70  void beforeFinalize( INamedInterface* ini ) override;
71  // inform Auditors that the finalize() has been called
72  void afterFinalize( INamedInterface* ini ) override;
73 
74  bool isEnabled() const override;
75 
76  StatusCode sysInitialize() override;
77  StatusCode sysFinalize() override;
78 
79  // management functionality: retrieve an Auditor
80  IAuditor* getAuditor( const std::string& name ) override;
81 
82  using extends::extends;
83 
84 private:
85  // management helper
89 
90  Gaudi::Property<std::vector<std::string>> m_audNameList{this, "Auditors", {}, "list of auditors names"};
91  Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "enable/disable alltogether the auditors"};
92 
93  // Manager list of Auditors
95 };
96 
97 #endif
void beforeBeginRun(INamedInterface *ini) override
StatusCode initialize() override
Definition: AuditorSvc.cpp:80
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
Implementation of property with value of concrete type.
Definition: Property.h:352
Gaudi::Property< bool > m_isEnabled
Definition: AuditorSvc.h:91
void after(StandardEventType, INamedInterface *, const StatusCode &) override
Definition: AuditorSvc.cpp:132
void afterReinitialize(INamedInterface *ini) override
StatusCode sysFinalize() override
Definition: AuditorSvc.cpp:191
void afterExecute(INamedInterface *ini, const StatusCode &) override
Definition: AuditorSvc.cpp:174
void beforeEndRun(INamedInterface *ini) override
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:94
void before(StandardEventType, INamedInterface *) override
The following methods are meant to be implemented by the child class...
Definition: AuditorSvc.cpp:103
STL class.
void beforeExecute(INamedInterface *ini) override
StatusCode sysInitialize() override
Definition: AuditorSvc.cpp:190
void beforeReinitialize(INamedInterface *ini) override
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
void beforeInitialize(INamedInterface *ini) override
void afterInitialize(INamedInterface *ini) override
void afterEndRun(INamedInterface *ini) override
void afterBeginRun(INamedInterface *ini) override
SmartIF< IAuditor > findAuditor_(const std::string &)
Definition: AuditorSvc.cpp:41
IInterface compliant class extending IInterface with the name() method.
void beforeFinalize(INamedInterface *ini) override
STL class.
StatusCode finalize() override
Definition: AuditorSvc.cpp:91
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
IAuditor * getAuditor(const std::string &name) override
Definition: AuditorSvc.cpp:193
SmartIF< IAuditor > newAuditor_(MsgStream &, const std::string &)
Definition: AuditorSvc.cpp:22
void afterFinalize(INamedInterface *ini) override
StatusCode syncAuditors_()
Definition: AuditorSvc.cpp:49
The IAuditor is the interface implmented by the AlgAuditor base class.
Definition: IAuditor.h:18
Gaudi::Property< std::vector< std::string > > m_audNameList
Definition: AuditorSvc.h:90
bool isEnabled() const override
Definition: AuditorSvc.cpp:188