| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# NameAuditor.h

Go to the documentation of this file.

    00001 #ifndef ATLASAUDITOR_NAMEAUDITOR_H
    00002 #define ATLASAUDITOR_NAMEAUDITOR_H
    00003
    00004 #include "GaudiKernel/Auditor.h"
    00005 #include "GaudiKernel/Property.h"
    00006
    00007 class INamedInterface;
    00008
    00014 class NameAuditor:public  Auditor {
    00015 private:
    00016   enum Action { BEFORE, AFTER };
    00017
    00018 public:
    00019   NameAuditor(const std::string& name, ISvcLocator* pSvcLocator);
    00020   virtual ~NameAuditor();
    00021
    00023
    00024   virtual void before(StandardEventType evt, const std::string& caller);
    00025
    00026   virtual void before(StandardEventType evt, INamedInterface* caller) {
    00027     if (caller) before(evt, caller->name());
    00028   }
    00029   virtual void before(CustomEventTypeRef evt, const std::string& caller) {
    00030     i_doAudit(evt, caller, BEFORE);
    00031   }
    00032   virtual void before(CustomEventTypeRef evt, INamedInterface* caller) {
    00033     if (caller) before(evt, caller->name());
    00034   }
    00036
    00038
    00039   virtual void after(StandardEventType evt, const std::string& caller, const StatusCode& sc);
    00040
    00041   virtual void after(StandardEventType evt, INamedInterface* caller, const StatusCode& sc) {
    00042     if (caller) after(evt, caller->name(), sc);
    00043   }
    00044   virtual void after(CustomEventTypeRef evt, const std::string& caller, const StatusCode&) {
    00045     i_doAudit(evt, caller, AFTER);
    00046   }
    00047   virtual void after(CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc) {
    00048     if (caller) after(evt, caller->name(), sc);
    00049   }
    00051
    00052 private:
    00054   void i_doAudit(const std::string& evt, const std::string& caller, Action action);
    00055
    00056 private:
    00057   StringArrayProperty m_types;
    00058
    00059 };
    00060
    00061 #endif