ATLAS Offline Software
TrigCostAuditor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGCOSTMONITOR_TRIGCOSTAUDITOR_H
6 #define TRIGCOSTMONITOR_TRIGCOSTAUDITOR_H 1
7 
8 #include "Gaudi/Auditor.h"
9 #include "GaudiKernel/ServiceHandle.h"
10 
12 
13 #include "ITrigCostSvc.h"
14 
21 class TrigCostAuditor : virtual public Gaudi::Auditor, public AthMessaging {
22 
23  using AthMessaging::msg;
24 
25  public:
26 
32  TrigCostAuditor( const std::string& name, ISvcLocator* svcloc );
33 
38  virtual StatusCode initialize() override;
39 
44  virtual StatusCode finalize() override;
45 
46 
53  virtual void before(const std::string& event, const std::string& caller,
54  const EventContext& ctx) override;
55 
63  virtual void after(const std::string& event, const std::string& caller,
64  const EventContext& ctx, const StatusCode& sc) override;
65 
66 private:
67 
74  void callService(const std::string& caller, ITrigCostSvc::AuditType type, const EventContext& ctx);
75 
76  ServiceHandle<ITrigCostSvc> m_trigCostSvcHandle { this, "TrigCostSvc", "TrigCostSvc",
77  "The trigger cost service to pass audit information to" };
78 
79 };
80 
81 #endif // TRIGCOSTMONITOR_TRIGCOSTAUDITOR_H
TrigCostAuditor::after
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.
Definition: TrigCostAuditor.cxx:45
TrigCostAuditor
Gaudi Auditor implementation to hook algorithm executions and notify the Trigger Cost Service.
Definition: TrigCostAuditor.h:21
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TrigCostAuditor::initialize
virtual StatusCode initialize() override
Initialise auditor.
Definition: TrigCostAuditor.cxx:20
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ITrigCostSvc.h
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TrigCostAuditor::m_trigCostSvcHandle
ServiceHandle< ITrigCostSvc > m_trigCostSvcHandle
Definition: TrigCostAuditor.h:76
TrigCostAuditor::before
virtual void before(const std::string &event, const std::string &caller, const EventContext &ctx) override
Audit before an algorithm standard event type is called.
Definition: TrigCostAuditor.cxx:35
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TrigCostAuditor::TrigCostAuditor
TrigCostAuditor(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi Auditor constructor.
Definition: TrigCostAuditor.cxx:11
AthMessaging.h
ITrigCostSvc::AuditType
AuditType
Disambiguation enum for the start or the end of an algorithm's execution.
Definition: ITrigCostSvc.h:36
TrigCostAuditor::callService
void callService(const std::string &caller, ITrigCostSvc::AuditType type, const EventContext &ctx)
Performs internal call to the trigger cost service.
Definition: TrigCostAuditor.cxx:54
TrigCostAuditor::finalize
virtual StatusCode finalize() override
Does nothing.
Definition: TrigCostAuditor.cxx:28
ServiceHandle< ITrigCostSvc >