Gaudi Framework, version v20r4

Generated: 8 Jan 2009

AuditorSvc.h

Go to the documentation of this file.
00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiSvc/src/AuditorSvc/AuditorSvc.h,v 1.10 2008/10/27 19:22:21 marcocle Exp $
00002 #ifndef AuditorSvc_AuditorSvc_H
00003 #define AuditorSvc_AuditorSvc_H
00004 
00005 // Include Files
00006 #include "GaudiKernel/Service.h"
00007 #include "GaudiKernel/IAuditorSvc.h"
00008 #include <list>
00009 #include <vector>
00010 
00011 class INamedInterface;
00012 
00013 //------------------------------------------------------------------
00014 //
00015 // ClassName:   AuditorSvc
00016 //
00017 // Description: This service manages Auditors.
00018 //              Auditors can be inserted in the system to audit the Algorithms is
00019 //              in their functions.
00020 //------------------------------------------------------------------
00021 class AuditorSvc : public Service, virtual public IAuditorSvc {
00022 
00023 public:
00024 
00025 // Typedefs
00026   typedef std::list<IAuditor*>     ListAudits;
00027   typedef std::vector<std::string> VectorName;
00028 
00029 // Inherited Service overrides:
00030 //
00031   // Initialise the service.
00032   virtual StatusCode initialize();
00033 
00034   // Finalise the service.
00035   virtual StatusCode finalize();
00036 
00037   // Query the interfaces.
00038   //   Input: riid, Requested interface ID
00039   //          ppvInterface, Pointer to requested interface
00040   //   Return: StatusCode indicating SUCCESS or FAILURE.
00041   // N.B. Don't forget to release the interface after use!!!
00042   virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
00043 
00044 // IAuditorSvc interfaces overwrite
00045 //
00047 
00048   virtual void before(StandardEventType, INamedInterface*);
00049   virtual void before(StandardEventType, const std::string&);
00050 
00051   virtual void before(CustomEventTypeRef, INamedInterface*);
00052   virtual void before(CustomEventTypeRef, const std::string&);
00053 
00054   virtual void after(StandardEventType, INamedInterface*, const StatusCode&);
00055   virtual void after(StandardEventType, const std::string&, const StatusCode&);
00056 
00057   virtual void after(CustomEventTypeRef, INamedInterface*, const StatusCode&);
00058   virtual void after(CustomEventTypeRef, const std::string&, const StatusCode&);
00059 
00060   // inform Auditors that the initialize() is about to be called
00061   virtual void beforeInitialize(INamedInterface* ini);
00062   // inform Auditors that the initialize() has been called
00063   virtual void afterInitialize(INamedInterface* ini);
00064 
00065   // inform Auditors that the reinitialize() is about to be called
00066   virtual void beforeReinitialize(INamedInterface* ini);
00067   // inform Auditors that the reinitialize() has been called
00068   virtual void afterReinitialize(INamedInterface* ini);
00069 
00070   // inform Auditors that the execute() is about to be called
00071   virtual void beforeExecute(INamedInterface* ini);
00072   // inform Auditors that the execute() has been called
00073   virtual void afterExecute(INamedInterface* ini, const StatusCode& );
00074 
00075   // inform Auditors that the beginRun() is about to be called
00076   virtual void beforeBeginRun(INamedInterface* ini);
00077   // inform Auditors that the beginRun() has been called
00078   virtual void afterBeginRun(INamedInterface* ini);
00079 
00080   // inform Auditors that the endRun() is about to be called
00081   virtual void beforeEndRun(INamedInterface* ini);
00082   // inform Auditors that the endRun() has been called
00083   virtual void afterEndRun(INamedInterface* ini);
00084 
00085   // inform Auditors that the finalize() is about to be called
00086   virtual void beforeFinalize(INamedInterface* ini);
00087   // inform Auditors that the finalize() has been called
00088   virtual void afterFinalize(INamedInterface* ini);
00089 
00090   virtual bool isEnabled() const ;
00091 
00092   virtual StatusCode sysInitialize();
00093   virtual StatusCode sysFinalize();
00094 
00095   // management functionality: retrieve an Auditor
00096   virtual IAuditor* getAuditor( const std::string& name );
00097 
00098   // Standard Constructor.
00099   //   Input:  name   String with service name
00100   //   Input:  svc    Pointer to service locator interface
00101   AuditorSvc( const std::string& name, ISvcLocator* svc );
00102 
00103   // Destructor.
00104   virtual ~AuditorSvc();
00105 
00106 private:
00107   // management helper
00108   IAuditor* newAuditor_( MsgStream&, const std::string& );
00109   IAuditor* findAuditor_( const std::string& );
00110   StatusCode syncAuditors_();
00111 
00112   // List of auditor names
00113   VectorName   m_audNameList;
00114 
00115   // Manager list of Auditors
00116   ListAudits   m_pAudList;
00117 
00118   // To disable alltogether the auditors
00119   bool m_isEnabled;
00120 };
00121 
00122 #endif

Generated at Thu Jan 8 17:44:23 2009 for Gaudi Framework, version v20r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004