| The Gaudi Framework v29r1 (5cd95fa2)

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

- File List
- File Members

CommonAuditor.cpp
Go to the documentation of this file.
1 #include "CommonAuditor.h"
2
3 CommonAuditor::CommonAuditor( const std::string& name, ISvcLocator* svcloc ) : Auditor( name, svcloc )
4 {
5 auto deprecated_property = [this]( Gaudi::Details::PropertyBase& p ) {
6 warning() << p.name() << " " << p.documentation() << endmsg;
7 m_types = m_customTypes;
8 };
9 m_customTypes.declareUpdateHandler( deprecated_property );
10 }
11
12 void CommonAuditor::before( StandardEventType evt, INamedInterface* caller )
13 {
14 if ( caller ) before( toStr( evt ), caller->name() );
15 }
16 void CommonAuditor::before( StandardEventType evt, const std::string& caller ) { before( toStr( evt ), caller ); }
17 void CommonAuditor::before( CustomEventTypeRef evt, INamedInterface* caller )
18 {
19 if ( caller ) before( evt, caller->name() );
20 }
21 void CommonAuditor::before( CustomEventTypeRef evt, const std::string& caller )
22 {
23 if ( i_auditEventType( evt ) ) i_before( evt, caller );
24 }
25
26 void CommonAuditor::after( StandardEventType evt, INamedInterface* caller, const StatusCode& sc )
27 {
28 if ( caller ) after( toStr( evt ), caller->name(), sc );
29 }
30 void CommonAuditor::after( StandardEventType evt, const std::string& caller, const StatusCode& sc )
31 {
32 after( toStr( evt ), caller, sc );
33 }
34 void CommonAuditor::after( CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc )
35 {
36 if ( caller ) after( evt, caller->name(), sc );
37 }
38 void CommonAuditor::after( CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc )
39 {
40 if ( i_auditEventType( evt ) ) i_after( evt, caller, sc );
41 }
toStr
const char * toStr(IAuditor::StandardEventType e)
Simple mapping function from IAuditor::StandardEventType to string.
Definition: IAuditor.h:100
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
CommonAuditor::m_types
Gaudi::Property< std::vector< std::string > > m_types
Definition: CommonAuditor.h:55
CommonAuditor::before
void before(StandardEventType evt, const std::string &caller) override
Definition: CommonAuditor.cpp:16
std::string
STL class.
CommonAuditor::i_auditEventType
bool i_auditEventType(const std::string &evt)
Check if we are requested to audit the passed event type.
Definition: CommonAuditor.h:45
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:109
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
INamedInterface
IInterface compliant class extending IInterface with the name() method.
Definition: INamedInterface.h:15
CommonAuditor::m_customTypes
Gaudi::Property< std::vector< std::string > > m_customTypes
Definition: CommonAuditor.h:57
CommonAuditor::CommonAuditor
CommonAuditor(const std::string &name, ISvcLocator *svcloc)
Constructor.
Definition: CommonAuditor.cpp:3
CommonAuditor::i_before
virtual void i_before(CustomEventTypeRef evt, const std::string &caller)=0
catch all "before" method, implemented in the derived class
CommonAuditor::after
void after(StandardEventType evt, const std::string &caller, const StatusCode &sc) override
Definition: CommonAuditor.cpp:30
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.h
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
IOTest.evt
evt
Definition: IOTest.py:96
Auditor
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35