| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

# IAuditor.h

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/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
    00018 class GAUDI_API IAuditor: virtual public INamedInterface {
    00019 public:
    00021   DeclareInterfaceID(IAuditor,3,0);
    00022
    00024   enum StandardEventType {
    00025     Initialize,
    00026     ReInitialize,
    00027     Execute,
    00028     BeginRun,
    00029     EndRun,
    00030     Finalize,
    00031     Start,
    00032     Stop,
    00033     ReStart
    00034   };
    00035
    00039   typedef std::string CustomEventType;
    00041   typedef const CustomEventType& CustomEventTypeRef;
    00042
    00044   virtual void before(StandardEventType, INamedInterface*) = 0;
    00046   virtual void before(StandardEventType, const std::string&) = 0;
    00047
    00049   virtual void before(CustomEventTypeRef, INamedInterface*) = 0;
    00051   virtual void before(CustomEventTypeRef, const std::string&) = 0;
    00052
    00054   virtual void after(StandardEventType, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00056   virtual void after(StandardEventType, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00057
    00059   virtual void after(CustomEventTypeRef, INamedInterface*, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00061   virtual void after(CustomEventTypeRef, const std::string&, const StatusCode& sc = StatusCode(StatusCode::SUCCESS,true)) = 0;
    00062
    00064   virtual bool isEnabled() const = 0;
    00065
    00066 // ------- Obsolete interface ------
    00068   virtual void beforeInitialize(INamedInterface* ) = 0;
    00070   virtual void afterInitialize(INamedInterface* ) = 0;
    00071
    00073   virtual void beforeReinitialize(INamedInterface* ) = 0;
    00075   virtual void afterReinitialize(INamedInterface* ) = 0;
    00076
    00078   virtual void beforeExecute(INamedInterface* ) = 0;
    00080   virtual void afterExecute(INamedInterface*, const StatusCode& ) = 0;
    00081
    00083   virtual void beforeBeginRun(INamedInterface* ) = 0;
    00085   virtual void afterBeginRun(INamedInterface* ) = 0;
    00086
    00088   virtual void beforeEndRun(INamedInterface* ) = 0;
    00090   virtual void afterEndRun(INamedInterface* ) = 0;
    00091
    00093   virtual void beforeFinalize(INamedInterface* ) = 0;
    00095   virtual void afterFinalize(INamedInterface* ) = 0;
    00096
    00098   virtual StatusCode sysInitialize( ) = 0;
    00099
    00101   virtual StatusCode sysFinalize( ) = 0;
    00102
    00103 };
    00104
    00106 inline const char* toStr(IAuditor::StandardEventType e) {
    00107   switch (e) {
    00108     case IAuditor::Initialize   : return "Initialize";
    00109     case IAuditor::ReInitialize : return "ReInitialize";
    00110     case IAuditor::Execute      : return "Execute";
    00111     case IAuditor::BeginRun     : return "BeginRun";
    00112     case IAuditor::EndRun       : return "EndRun";
    00113     case IAuditor::Finalize     : return "Finalize";
    00114     case IAuditor::Start        : return "Start";
    00115     case IAuditor::Stop         : return "Stop";
    00116     case IAuditor::ReStart      : return "ReStart";
    00117   }
    00118   return NULL; // cannot be reached, but make the compiler happy
    00119 }
    00120
    00121 inline std::ostream & operator << (std::ostream & s, IAuditor::StandardEventType e) {
    00122   return s << toStr(e);
    00123 }
    00124
    00125
    00126 #endif // GAUDIKERNEL_IAUDITOR_H
    00127

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines