| The Gaudi Framework v27r1

- 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 declareProperty("EventTypes", m_types,
5 "List of event types to audit ([]=all, ['none']=none)");
6 declareProperty("CustomEventTypes", m_customTypes,
7 "OBSOLETE, use EventTypes instead")->declareUpdateHandler(&CommonAuditor::i_updateCustomTypes, this);
8 }
9
10 void CommonAuditor::i_updateCustomTypes(Property &) {
11 warning() << "Property CustomEventTypes is deprecated, use EventTypes instead" << endmsg;
12 m_types.setValue(m_customTypes.value());
13 }
14
15 void CommonAuditor::before(StandardEventType evt, INamedInterface* caller)
16 {
17 if (caller) before(toStr(evt), caller->name());
18 }
19 void CommonAuditor::before(StandardEventType evt, const std::string& caller)
20 {
21 before(toStr(evt), caller);
22 }
23 void CommonAuditor::before(CustomEventTypeRef evt, INamedInterface* caller)
24 {
25 if (caller) before(evt, caller->name());
26 }
27 void CommonAuditor::before(CustomEventTypeRef evt, const std::string& caller)
28 {
29 if (i_auditEventType(evt)) i_before(evt, caller);
30 }
31
32 void CommonAuditor::after(StandardEventType evt, INamedInterface* caller, const StatusCode& sc)
33 {
34 if (caller) after(toStr(evt), caller->name(), sc);
35 }
36 void CommonAuditor::after(StandardEventType evt, const std::string& caller, const StatusCode& sc)
37 {
38 after(toStr(evt), caller, sc);
39 }
40 void CommonAuditor::after(CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc)
41 {
42 if (caller) after(evt, caller->name(), sc);
43 }
44 void CommonAuditor::after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc)
45 {
46 if (i_auditEventType(evt)) i_after(evt, caller, sc);
47 }
toStr
const char * toStr(IAuditor::StandardEventType e)
Simple mapping function from IAuditor::StandardEventType to string.
Definition: IAuditor.h:106
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:28
Property::declareUpdateHandler
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:72
CommonAuditor::before
virtual void before(StandardEventType evt, const std::string &caller)
Definition: CommonAuditor.cpp:19
PropertyWithVerifier::setValue
bool setValue(const TYPE &value) override
implementation of PropertyWithValue::setValue
Definition: Property.h:406
merge_files.sc
int sc
Definition: merge_files.py:167
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
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:42
Auditor::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Auditor.h:232
CommonAuditor::i_updateCustomTypes
void i_updateCustomTypes(Property &)
Update handler for the obsolete property CustomEventTypes.
Definition: CommonAuditor.cpp:10
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
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
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
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:244
Auditor
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35