The Gaudi Framework  v30r4 (9b837755)
CommonAuditor.cpp
Go to the documentation of this file.
1 #include "CommonAuditor.h"
3 
4 void CommonAuditor::before( StandardEventType evt, INamedInterface* caller )
5 {
6  if ( caller ) before( toStr( evt ), caller->name() );
7 }
8 void CommonAuditor::before( StandardEventType evt, const std::string& caller ) { before( toStr( evt ), caller ); }
9 void CommonAuditor::before( CustomEventTypeRef evt, INamedInterface* caller )
10 {
11  if ( caller ) before( evt, caller->name() );
12 }
13 void CommonAuditor::before( CustomEventTypeRef evt, const std::string& caller )
14 {
15  if ( i_auditEventType( evt ) ) i_before( evt, caller );
16 }
17 
18 void CommonAuditor::after( StandardEventType evt, INamedInterface* caller, const StatusCode& sc )
19 {
20  if ( caller ) after( toStr( evt ), caller->name(), sc );
21 }
22 void CommonAuditor::after( StandardEventType evt, const std::string& caller, const StatusCode& sc )
23 {
24  after( toStr( evt ), caller, sc );
25 }
26 void CommonAuditor::after( CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc )
27 {
28  if ( caller ) after( evt, caller->name(), sc );
29 }
30 void CommonAuditor::after( CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc )
31 {
32  if ( i_auditEventType( evt ) ) i_after( evt, caller, sc );
33 }
const char * toStr(IAuditor::StandardEventType e)
Simple mapping function from IAuditor::StandardEventType to string.
Definition: IAuditor.h:100
void before(StandardEventType evt, const std::string &caller) override
STL class.
bool i_auditEventType(const std::string &evt)
Check if we are requested to audit the passed event type.
Definition: CommonAuditor.h:43
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
IInterface compliant class extending IInterface with the name() method.
virtual void i_before(CustomEventTypeRef evt, const std::string &caller)=0
catch all "before" method, implemented in the derived class
void after(StandardEventType evt, const std::string &caller, const StatusCode &sc) override
virtual void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc)=0
catch all "after" method, implemented in the derived class
virtual const std::string & name() const =0
Retrieve the name of the instance.
evt
Definition: IOTest.py:96