File indexing completed on 2025-07-05 08:54:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDI_IAUDITOR_H
0012 #define GAUDI_IAUDITOR_H
0013
0014
0015 #include <GaudiKernel/INamedInterface.h>
0016 #include <array>
0017 #include <string>
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 class GAUDI_API IAuditor : virtual public INamedInterface {
0029 public:
0030
0031 DeclareInterfaceID( IAuditor, 3, 0 );
0032
0033
0034 enum StandardEventType { Initialize, ReInitialize, Execute, Finalize, Start, Stop, ReStart };
0035
0036 friend const char* toStr( IAuditor::StandardEventType e ) {
0037 constexpr std::array<const char*, IAuditor::StandardEventType::ReStart + 1> s_tbl = {
0038 { "Initialize", "ReInitialize", "Execute", "Finalize", "Start", "Stop", "ReStart" } };
0039 return e <= IAuditor::StandardEventType::ReStart ? s_tbl[e] : nullptr;
0040 }
0041 friend std::ostream& operator<<( std::ostream& s, IAuditor::StandardEventType e ) { return s << toStr( e ); }
0042
0043
0044
0045
0046 typedef std::string CustomEventType;
0047
0048 typedef const CustomEventType& CustomEventTypeRef;
0049
0050
0051 virtual void before( StandardEventType, INamedInterface* ) = 0;
0052
0053 virtual void before( StandardEventType, const std::string& ) = 0;
0054
0055
0056 virtual void before( CustomEventTypeRef, INamedInterface* ) = 0;
0057
0058 virtual void before( CustomEventTypeRef, const std::string& ) = 0;
0059
0060
0061 virtual void after( StandardEventType, INamedInterface*, const StatusCode& sc = StatusCode::SUCCESS ) = 0;
0062
0063 virtual void after( StandardEventType, const std::string&, const StatusCode& sc = StatusCode::SUCCESS ) = 0;
0064
0065
0066 virtual void after( CustomEventTypeRef, INamedInterface*, const StatusCode& sc = StatusCode::SUCCESS ) = 0;
0067
0068 virtual void after( CustomEventTypeRef, const std::string&, const StatusCode& sc = StatusCode::SUCCESS ) = 0;
0069
0070
0071 virtual bool isEnabled() const = 0;
0072
0073
0074
0075 virtual void beforeInitialize( INamedInterface* ) = 0;
0076
0077 virtual void afterInitialize( INamedInterface* ) = 0;
0078
0079
0080 virtual void beforeReinitialize( INamedInterface* ) = 0;
0081
0082 virtual void afterReinitialize( INamedInterface* ) = 0;
0083
0084
0085 virtual void beforeExecute( INamedInterface* ) = 0;
0086
0087 virtual void afterExecute( INamedInterface*, const StatusCode& ) = 0;
0088
0089
0090 virtual void beforeFinalize( INamedInterface* ) = 0;
0091
0092 virtual void afterFinalize( INamedInterface* ) = 0;
0093
0094
0095 virtual StatusCode sysInitialize() = 0;
0096
0097
0098 virtual StatusCode sysFinalize() = 0;
0099 };
0100
0101 #endif