| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

# CommonAuditor.h

Go to the documentation of this file.

    00001 #include "GaudiKernel/Auditor.h"
    00002
    00005 class CommonAuditor: public Auditor {
    00006 public:
    00010   CommonAuditor(const std::string& name, ISvcLocator *svcloc);
    00012   virtual ~CommonAuditor();
    00013
    00017
    00018   virtual void before(StandardEventType evt, const std::string& caller);
    00019   virtual void before(StandardEventType evt, INamedInterface* caller);
    00020   virtual void before(CustomEventTypeRef evt, const std::string& caller);
    00021   virtual void before(CustomEventTypeRef evt, INamedInterface* caller);
    00023
    00027
    00028   virtual void after(StandardEventType evt, const std::string& caller, const StatusCode& sc);
    00029   virtual void after(StandardEventType evt, INamedInterface* caller, const StatusCode& sc);
    00030   virtual void after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc);
    00031   virtual void after(CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc);
    00033
    00034 protected:
    00035
    00037   virtual void i_before(CustomEventTypeRef evt, const std::string& caller) = 0;
    00039   virtual void i_after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc) = 0;
    00040
    00042   inline bool i_auditEventType(const std::string& evt) {
    00043     // Note: there is no way to extract from a Property type the type returned by
    00044     // value().
    00045     const std::vector<std::string> &v = m_types.value();
    00046     // we need to return true is the list is empty or when the list does't
    00047     // start by "none" and the list contain the event we got.
    00048     return (v.size() == 0) || (
    00049              (v[0] != "none") &&
    00050              (find(v.begin(), v.end(), evt) != v.end())
    00051            );
    00052   }
    00053
    00054   StringArrayProperty m_types;
    00055
    00057   void i_updateCustomTypes(Property &);
    00058   StringArrayProperty m_customTypes;
    00059 };

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