![]() |
ATLAS Offline Software
|
Gaudi Auditor implementation to hook algorithm executions and notify the Trigger Cost Service. More...
#include <TrigCostAuditor.h>
Public Member Functions | |
TrigCostAuditor (const std::string &name, ISvcLocator *svcloc) | |
Standard Gaudi Auditor constructor. More... | |
virtual StatusCode | initialize () override |
Initialise auditor. More... | |
virtual StatusCode | finalize () override |
Does nothing. More... | |
virtual void | before (const std::string &event, const std::string &caller, const EventContext &ctx) override |
Audit before an algorithm standard event type is called. More... | |
virtual void | after (const std::string &event, const std::string &caller, const EventContext &ctx, const StatusCode &sc) override |
Audit after an algorithm standard event type is called. More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
void | callService (const std::string &caller, ITrigCostSvc::AuditType type, const EventContext &ctx) |
Performs internal call to the trigger cost service. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
ServiceHandle< ITrigCostSvc > | m_trigCostSvcHandle |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
Gaudi Auditor implementation to hook algorithm executions and notify the Trigger Cost Service.
Only monitors the Execute event type.
Definition at line 21 of file TrigCostAuditor.h.
TrigCostAuditor::TrigCostAuditor | ( | const std::string & | name, |
ISvcLocator * | svcloc | ||
) |
Standard Gaudi Auditor constructor.
[in] | name | The algorithm object's name |
[in] | svcloc | A pointer to a service location service |
Definition at line 11 of file TrigCostAuditor.cxx.
|
overridevirtual |
Audit after an algorithm standard event type is called.
[in] | evt | The event type. Only Execute is monitored |
[in] | caller | The name of the calling algorithm |
[in] | ctx | Event context |
[in] | sc | StatusCode of algorithm execution |
Definition at line 45 of file TrigCostAuditor.cxx.
|
overridevirtual |
Audit before an algorithm standard event type is called.
[in] | evt | The event type. Only Execute is monitored |
[in] | caller | The name of the calling algorithm |
[in] | ctx | Event context |
Definition at line 35 of file TrigCostAuditor.cxx.
|
private |
Performs internal call to the trigger cost service.
[in] | caller | Name of algorithm being audited |
[in] | type | AuditType::Before or AuditType::After depending on if the start or stop of execution |
[in] | ctx | Event context |
Definition at line 54 of file TrigCostAuditor.cxx.
|
overridevirtual |
|
overridevirtual |
Initialise auditor.
Return handle to Trigger Cost Service
Definition at line 20 of file TrigCostAuditor.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineprivate |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 92 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
|
inlineprivate |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 99 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
lvl | The message level to test against |
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 76 of file TrigCostAuditor.h.