| # Gaudi Framework, version v21r9 |

Home |  | Generated: 3 May 2010

# 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
    00105 inline std::ostream & operator << (std::ostream & s, IAuditor::StandardEventType e) {
    00106   switch (e) {
    00107     case IAuditor::Initialize   : return s << "Initialize";
    00108     case IAuditor::ReInitialize : return s << "ReInitialize";
    00109     case IAuditor::Execute      : return s << "Execute";
    00110     case IAuditor::BeginRun     : return s << "BeginRun";
    00111     case IAuditor::EndRun       : return s << "EndRun";
    00112     case IAuditor::Finalize     : return s << "Finalize";
    00113     case IAuditor::Start        : return s << "Start";
    00114     case IAuditor::Stop         : return s << "Stop";
    00115     case IAuditor::ReStart      : return s << "ReStart";
    00116   }
    00117   return s; // cannot be reached, but make the compiler happy
    00118 }
    00119 #endif // GAUDIKERNEL_IAUDITOR_H
    00120