| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IAuditor.h
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/IAuditor.h,v 1.11 2008/10/27 19:22:20 marcocle Exp $
2 #ifndef GAUDI_IAUDITOR_H
3 #define GAUDI_IAUDITOR_H
4
5 // Include files
6 #include "GaudiKernel/INamedInterface.h"
7 #include <string>
8
18 class GAUDI_API IAuditor: virtual public INamedInterface {
19 public:
21 DeclareInterfaceID(IAuditor,3,0);
22
24 enum StandardEventType {
25 Initialize,
26 ReInitialize,
27 Execute,
28 BeginRun,
29 EndRun,
30 Finalize,
31 Start,
32 Stop,
33 ReStart
34 };
35
39 typedef std::string CustomEventType;
41 typedef const CustomEventType& CustomEventTypeRef;
42
44 virtual void before(StandardEventType, INamedInterface*) = 0;
46 virtual void before(StandardEventType, const std::string&) = 0;
47
49 virtual void before(CustomEventTypeRef, INamedInterface*) = 0;
51 virtual void before(CustomEventTypeRef, const std::string&) = 0;
52
54 virtual void after(StandardEventType, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
56 virtual void after(StandardEventType, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
57
59 virtual void after(CustomEventTypeRef, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
61 virtual void after(CustomEventTypeRef, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
62
64 virtual bool isEnabled() const = 0;
65
66 // ------- Obsolete interface ------
68 virtual void beforeInitialize(INamedInterface* ) = 0;
70 virtual void afterInitialize(INamedInterface* ) = 0;
71
73 virtual void beforeReinitialize(INamedInterface* ) = 0;
75 virtual void afterReinitialize(INamedInterface* ) = 0;
76
78 virtual void beforeExecute(INamedInterface* ) = 0;
80 virtual void afterExecute(INamedInterface*, const StatusCode& ) = 0;
81
83 virtual void beforeBeginRun(INamedInterface* ) = 0;
85 virtual void afterBeginRun(INamedInterface* ) = 0;
86
88 virtual void beforeEndRun(INamedInterface* ) = 0;
90 virtual void afterEndRun(INamedInterface* ) = 0;
91
93 virtual void beforeFinalize(INamedInterface* ) = 0;
95 virtual void afterFinalize(INamedInterface* ) = 0;
96
98 virtual StatusCode sysInitialize( ) = 0;
99
101 virtual StatusCode sysFinalize( ) = 0;
102
103 };
104
106 inline const char* toStr(IAuditor::StandardEventType e) {
107 switch (e) {
108 case IAuditor::Initialize : return "Initialize";
109 case IAuditor::ReInitialize : return "ReInitialize";
110 case IAuditor::Execute : return "Execute";
111 case IAuditor::BeginRun : return "BeginRun";
112 case IAuditor::EndRun : return "EndRun";
113 case IAuditor::Finalize : return "Finalize";
114 case IAuditor::Start : return "Start";
115 case IAuditor::Stop : return "Stop";
116 case IAuditor::ReStart : return "ReStart";
117 }
118 return NULL; // cannot be reached, but make the compiler happy
119 }
120
121 inline std::ostream & operator << (std::ostream & s, IAuditor::StandardEventType e) {
122 return s << toStr(e);
123 }
124
125
126 #endif // GAUDIKERNEL_IAUDITOR_H
127