| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

CommonAuditor.h
Go to the documentation of this file.
1 #include "GaudiKernel/Auditor.h"
2
5 class CommonAuditor: public Auditor {
6 public:
10 CommonAuditor(const std::string& name, ISvcLocator *svcloc);
12 virtual ~CommonAuditor() = default;
13
17
18 virtual void before(StandardEventType evt, const std::string& caller);
19 virtual void before(StandardEventType evt, INamedInterface* caller);
20 virtual void before(CustomEventTypeRef evt, const std::string& caller);
21 virtual void before(CustomEventTypeRef evt, INamedInterface* caller);
23
27
28 virtual void after(StandardEventType evt, const std::string& caller, const StatusCode& sc);
29 virtual void after(StandardEventType evt, INamedInterface* caller, const StatusCode& sc);
30 virtual void after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc);
31 virtual void after(CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc);
33
34 protected:
35
37 virtual void i_before(CustomEventTypeRef evt, const std::string& caller) = 0;
39 virtual void i_after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc) = 0;
40
42 inline bool i_auditEventType(const std::string& evt) {
43 // Note: there is no way to extract from a Property type the type returned by
44 // value().
45 const std::vector<std::string> &v = m_types.value();
46 // we need to return true is the list is empty or when the list does't
47 // start by "none" and the list contain the event we got.
48 return v.empty() || (
49 (v[0] != "none") &&
50 (find(v.begin(), v.end(), evt) != v.end())
51 );
52 }
53
54 StringArrayProperty m_types;
55
57 void i_updateCustomTypes(Property &);
58 StringArrayProperty m_customTypes;
59 };
std::vector::empty
T empty(T...args)
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
CommonAuditor
Base class with common functionalities shared by few auditor implementations.
Definition: CommonAuditor.h:5
CommonAuditor::before
virtual void before(StandardEventType evt, const std::string &caller)
Definition: CommonAuditor.cpp:19
std::vector::end
T end(T...args)
merge_files.sc
int sc
Definition: merge_files.py:167
std::string
STL class.
SimpleProperty< std::vector< std::string > >
CommonAuditor::i_auditEventType
bool i_auditEventType(const std::string &evt)
Check if we are requested to audit the passed event type.
Definition: CommonAuditor.h:42
CommonAuditor::i_updateCustomTypes
void i_updateCustomTypes(Property &)
Update handler for the obsolete property CustomEventTypes.
Definition: CommonAuditor.cpp:10
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
read_lhcb_event_file.evt
tuple evt
Definition: read_lhcb_event_file.py:14
CommonAuditor::m_customTypes
StringArrayProperty m_customTypes
Definition: CommonAuditor.h:58
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
INamedInterface
IInterface compliant class extending IInterface with the name() method.
Definition: INamedInterface.h:15
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
std::vector< std::string >
std::vector::begin
T begin(T...args)
Auditor::name
const std::string & name() const override
Definition: Auditor.cpp:202
CommonAuditor::CommonAuditor
CommonAuditor(const std::string &name, ISvcLocator *svcloc)
Constructor.
Definition: CommonAuditor.cpp:3
CommonAuditor::after
virtual void after(StandardEventType evt, const std::string &caller, const StatusCode &sc)
Definition: CommonAuditor.cpp:36
CommonAuditor::i_before
virtual void i_before(CustomEventTypeRef evt, const std::string &caller)=0
catch all "before" method, implemented in the derived class
CommonAuditor::m_types
StringArrayProperty m_types
Definition: CommonAuditor.h:54
Auditor.h
CommonAuditor::i_after
virtual void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc)=0
catch all "after" method, implemented in the derived class
CommonAuditor::~CommonAuditor
virtual ~CommonAuditor()=default
Destructor.
Auditor
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35