| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# 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
    00012 class NameAuditor:public  Auditor {
    00013 private:
    00014   enum Action { BEFORE, AFTER };
    00015
    00016 public:
    00017   NameAuditor(const std::string& name, ISvcLocator* pSvcLocator);
    00018   virtual ~NameAuditor();
    00019
    00021
    00022   virtual void before(StandardEventType evt, const std::string& caller);
    00023
    00024   virtual void before(StandardEventType evt, INamedInterface* caller) {
    00025     if (caller) before(evt, caller->name());
    00026   }
    00027   virtual void before(CustomEventTypeRef evt, const std::string& caller) {
    00028     i_doAudit(evt, caller, BEFORE);
    00029   }
    00030   virtual void before(CustomEventTypeRef evt, INamedInterface* caller) {
    00031     if (caller) before(evt, caller->name());
    00032   }
    00034
    00036
    00037   virtual void after(StandardEventType evt, const std::string& caller, const StatusCode& sc);
    00038
    00039   virtual void after(StandardEventType evt, INamedInterface* caller, const StatusCode& sc) {
    00040     if (caller) after(evt, caller->name(), sc);
    00041   }
    00042   virtual void after(CustomEventTypeRef evt, const std::string& caller, const StatusCode&) {
    00043     i_doAudit(evt, caller, AFTER);
    00044   }
    00045   virtual void after(CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc) {
    00046     if (caller) after(evt, caller->name(), sc);
    00047   }
    00049
    00050 private:
    00052   void i_doAudit(const std::string& evt, const std::string& caller, Action action);
    00053
    00054 private:
    00055   StringArrayProperty m_types;
    00056
    00057 };
    00058
    00059 #endif