| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# IAuditor.h

Go to the documentation of this file.

    00001 // $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/IAuditor.h,v 1.11 2008/10/27 19:22:20 marcocle Exp $
    00002 #ifndef GAUDI_IAUDITOR_H
    00003 #define GAUDI_IAUDITOR_H
    00004
    00005 // Include files
    00006 #include "GaudiKernel/INamedInterface.h"
    00007 #include <string>
    00008
    00009 // Declaration of the interface ID ( interface id, major version, minor version)
    00010 static const InterfaceID IID_IAuditor(18, 2 , 0);
    00011
    00021 class IAuditor : virtual public INamedInterface {
    00022  public:
    00023
    00025   static const InterfaceID& interfaceID() { return IID_IAuditor; }
    00026
    00028   enum StandardEventType {
    00029     Initialize,
    00030     ReInitialize,
    00031     Execute,
    00032     BeginRun,
    00033     EndRun,
    00034     Finalize,
    00035     Start,
    00036     Stop,
    00037     ReStart
    00038   };
    00039
    00043   typedef std::string CustomEventType;
    00045   typedef const CustomEventType& CustomEventTypeRef;
    00046
    00048   virtual void before(StandardEventType, INamedInterface*) = 0;
    00050   virtual void before(StandardEventType, const std::string&) = 0;
    00051
    00053   virtual void before(CustomEventTypeRef, INamedInterface*) = 0;
    00055   virtual void before(CustomEventTypeRef, const std::string&) = 0;
    00056
    00058   virtual void after(StandardEventType, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00060   virtual void after(StandardEventType, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00061
    00063   virtual void after(CustomEventTypeRef, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00065   virtual void after(CustomEventTypeRef, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00066
    00068   virtual bool isEnabled() const = 0;
    00069
    00070 // ------- Obsolete interface ------
    00072   virtual void beforeInitialize(INamedInterface* ) = 0;
    00074   virtual void afterInitialize(INamedInterface* ) = 0;
    00075
    00077   virtual void beforeReinitialize(INamedInterface* ) = 0;
    00079   virtual void afterReinitialize(INamedInterface* ) = 0;
    00080
    00082   virtual void beforeExecute(INamedInterface* ) = 0;
    00084   virtual void afterExecute(INamedInterface*, const StatusCode& ) = 0;
    00085
    00087   virtual void beforeBeginRun(INamedInterface* ) = 0;
    00089   virtual void afterBeginRun(INamedInterface* ) = 0;
    00090
    00092   virtual void beforeEndRun(INamedInterface* ) = 0;
    00094   virtual void afterEndRun(INamedInterface* ) = 0;
    00095
    00097   virtual void beforeFinalize(INamedInterface* ) = 0;
    00099   virtual void afterFinalize(INamedInterface* ) = 0;
    00100
    00102   virtual StatusCode sysInitialize( ) = 0;
    00103
    00105   virtual StatusCode sysFinalize( ) = 0;
    00106
    00107 };
    00108
    00109 inline std::ostream & operator << (std::ostream & s, IAuditor::StandardEventType e) {
    00110   switch (e) {
    00111     case IAuditor::Initialize   : return s << "Initialize";
    00112     case IAuditor::ReInitialize : return s << "ReInitialize";
    00113     case IAuditor::Execute      : return s << "Execute";
    00114     case IAuditor::BeginRun     : return s << "BeginRun";
    00115     case IAuditor::EndRun       : return s << "EndRun";
    00116     case IAuditor::Finalize     : return s << "Finalize";
    00117     case IAuditor::Start        : return s << "Start";
    00118     case IAuditor::Stop         : return s << "Stop";
    00119     case IAuditor::ReStart      : return s << "ReStart";
    00120   }
    00121   return s; // cannot be reached, but make the compiler happy
    00122 }
    00123 #endif // GAUDIKERNEL_IAUDITOR_H
    00124