The Gaudi Framework  master (37c0b60a)
ChronoAuditor.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIAUD_CHRONOAUDITOR_H
12 #define GAUDIAUD_CHRONOAUDITOR_H
13 
14 #include "CommonAuditor.h"
15 
17 
24 class ChronoAuditor : public CommonAuditor {
25 public:
26  using CommonAuditor::CommonAuditor;
27 
28  StatusCode initialize() override;
29 
30 private:
32  void i_before( CustomEventTypeRef evt, std::string_view caller ) override;
33 
35  void i_after( CustomEventTypeRef evt, std::string_view caller, const StatusCode& sc ) override;
36 
38  std::string i_id( CustomEventTypeRef evt, std::string_view caller ) { return std::string{ caller } + ":" + evt; }
39 
42 };
43 
44 #endif
IOTest.evt
evt
Definition: IOTest.py:107
CommonAuditor
Base class with common functionalities shared by few auditor implementations.
Definition: CommonAuditor.h:18
ChronoAuditor::m_chronoSvc
SmartIF< IChronoStatSvc > m_chronoSvc
Definition: ChronoAuditor.h:41
std::string
STL class.
ChronoAuditor::chronoSvc
SmartIF< IChronoStatSvc > & chronoSvc()
Definition: ChronoAuditor.h:40
ChronoAuditor::i_id
std::string i_id(CustomEventTypeRef evt, std::string_view caller)
Compute the id string to be used for the chrono entity.
Definition: ChronoAuditor.h:38
StatusCode
Definition: StatusCode.h:65
SmartIF< IChronoStatSvc >
ChronoAuditor::i_after
void i_after(CustomEventTypeRef evt, std::string_view caller, const StatusCode &sc) override
Default (catch-all) "after" Auditor hook.
Definition: ChronoAuditor.cpp:33
ChronoAuditor::i_before
void i_before(CustomEventTypeRef evt, std::string_view caller) override
Default (catch-all) "before" Auditor hook.
Definition: ChronoAuditor.cpp:29
ChronoAuditor::initialize
StatusCode initialize() override
Definition: ChronoAuditor.cpp:18
IChronoStatSvc.h
ChronoAuditor
Definition: ChronoAuditor.h:24
CommonAuditor.h