| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

AuditorSvc.h
Go to the documentation of this file.
1 #ifndef AuditorSvc_AuditorSvc_H
2 #define AuditorSvc_AuditorSvc_H
3
4 // Include Files
5 #include "GaudiKernel/IAuditorSvc.h"
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 {
20 public:
21 // Inherited Service overrides:
22 //
23 // Initialize the service.
24 StatusCode initialize() override;
25
26 // Finalize the service.
27 StatusCode finalize() override;
28
29 // IAuditorSvc interfaces overwrite
30 //
32
33 void before( StandardEventType, INamedInterface* ) override;
34 void before( StandardEventType, const std::string& ) override;
35
36 void before( CustomEventTypeRef, INamedInterface* ) override;
37 void before( CustomEventTypeRef, const std::string& ) override;
38
39 void after( StandardEventType, INamedInterface*, const StatusCode& ) override;
40 void after( StandardEventType, const std::string&, const StatusCode& ) override;
41
42 void after( CustomEventTypeRef, INamedInterface*, const StatusCode& ) override;
43 void after( CustomEventTypeRef, const std::string&, const StatusCode& ) override;
44
45 // inform Auditors that the initialize() is about to be called
46 void beforeInitialize( INamedInterface* ini ) override;
47 // inform Auditors that the initialize() has been called
48 void afterInitialize( INamedInterface* ini ) override;
49
50 // inform Auditors that the reinitialize() is about to be called
51 void beforeReinitialize( INamedInterface* ini ) override;
52 // inform Auditors that the reinitialize() has been called
53 void afterReinitialize( INamedInterface* ini ) override;
54
55 // inform Auditors that the execute() is about to be called
56 void beforeExecute( INamedInterface* ini ) override;
57 // inform Auditors that the execute() has been called
58 void afterExecute( INamedInterface* ini, const StatusCode& ) override;
59
60 // inform Auditors that the beginRun() is about to be called
61 void beforeBeginRun( INamedInterface* ini ) override;
62 // inform Auditors that the beginRun() has been called
63 void afterBeginRun( INamedInterface* ini ) override;
64
65 // inform Auditors that the endRun() is about to be called
66 void beforeEndRun( INamedInterface* ini ) override;
67 // inform Auditors that the endRun() has been called
68 void afterEndRun( INamedInterface* ini ) override;
69
70 // inform Auditors that the finalize() is about to be called
71 void beforeFinalize( INamedInterface* ini ) override;
72 // inform Auditors that the finalize() has been called
73 void afterFinalize( INamedInterface* ini ) override;
74
75 bool isEnabled() const override;
76
77 StatusCode sysInitialize() override;
78 StatusCode sysFinalize() override;
79
80 // management functionality: retrieve an Auditor
81 IAuditor* getAuditor( const std::string& name ) override;
82
83 using extends::extends;
84
85 // Destructor.
86 ~AuditorSvc() override = default;
87
88 private:
89 // management helper
90 SmartIF<IAuditor> newAuditor_( MsgStream&, const std::string& );
91 SmartIF<IAuditor> findAuditor_( const std::string& );
92 StatusCode syncAuditors_();
93
94 Gaudi::Property<std::vector<std::string>> m_audNameList{this, "Auditors", {}, "list of auditors names"};
95 Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "enable/disable alltogether the auditors"};
96
97 // Manager list of Auditors
98 std::vector<SmartIF<IAuditor>> m_pAudList;
99 };
100
101 #endif
AuditorSvc::beforeBeginRun
void beforeBeginRun(INamedInterface *ini) override
AuditorSvc::initialize
StatusCode initialize() override
Definition: AuditorSvc.cpp:81
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IAuditor >
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
IAuditorSvc.h
AuditorSvc::m_isEnabled
Gaudi::Property< bool > m_isEnabled
Definition: AuditorSvc.h:95
AuditorSvc::after
void after(StandardEventType, INamedInterface *, const StatusCode &) override
Definition: AuditorSvc.cpp:134
AuditorSvc::afterReinitialize
void afterReinitialize(INamedInterface *ini) override
AuditorSvc::sysFinalize
StatusCode sysFinalize() override
Definition: AuditorSvc.cpp:198
AuditorSvc::afterExecute
void afterExecute(INamedInterface *ini, const StatusCode &) override
Definition: AuditorSvc.cpp:176
AuditorSvc::beforeEndRun
void beforeEndRun(INamedInterface *ini) override
AuditorSvc
Definition: AuditorSvc.h:18
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
AuditorSvc::before
void before(StandardEventType, INamedInterface *) override
The following methods are meant to be implemented by the child class...
Definition: AuditorSvc.cpp:105
std::string
STL class.
Service.h
AuditorSvc::beforeExecute
void beforeExecute(INamedInterface *ini) override
AuditorSvc::sysInitialize
StatusCode sysInitialize() override
Definition: AuditorSvc.cpp:195
AuditorSvc::beforeReinitialize
void beforeReinitialize(INamedInterface *ini) override
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AuditorSvc::beforeInitialize
void beforeInitialize(INamedInterface *ini) override
AuditorSvc::afterInitialize
void afterInitialize(INamedInterface *ini) override
AuditorSvc::afterEndRun
void afterEndRun(INamedInterface *ini) override
AuditorSvc::afterBeginRun
void afterBeginRun(INamedInterface *ini) override
AuditorSvc::findAuditor_
SmartIF< IAuditor > findAuditor_(const std::string &)
Definition: AuditorSvc.cpp:41
INamedInterface
IInterface compliant class extending IInterface with the name() method.
Definition: INamedInterface.h:15
AuditorSvc::beforeFinalize
void beforeFinalize(INamedInterface *ini) override
std::vector
STL class.
AuditorSvc::finalize
StatusCode finalize() override
Definition: AuditorSvc.cpp:93
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
AuditorSvc::~AuditorSvc
~AuditorSvc() override=default
AuditorSvc::getAuditor
IAuditor * getAuditor(const std::string &name) override
Definition: AuditorSvc.cpp:203
AuditorSvc::newAuditor_
SmartIF< IAuditor > newAuditor_(MsgStream &, const std::string &)
Definition: AuditorSvc.cpp:22
AuditorSvc::afterFinalize
void afterFinalize(INamedInterface *ini) override
AuditorSvc::syncAuditors_
StatusCode syncAuditors_()
Definition: AuditorSvc.cpp:49
IAuditor
The IAuditor is the interface implmented by the AlgAuditor base class.
Definition: IAuditor.h:18
AuditorSvc::m_audNameList
Gaudi::Property< std::vector< std::string > > m_audNameList
Definition: AuditorSvc.h:94
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191