ChronoAuditor.h
Go to the documentation of this file.
1 #ifndef GAUDIAUD_CHRONOAUDITOR_H
2 #define GAUDIAUD_CHRONOAUDITOR_H
3 
4 #include "CommonAuditor.h"
5 
7 
14 class ChronoAuditor : virtual public CommonAuditor {
15 public:
16  ChronoAuditor(const std::string& name, ISvcLocator* pSvcLocator);
17 
18  ~ChronoAuditor() override = default;
19 
20  StatusCode initialize() override;
21 
22 private:
24  void i_before(CustomEventTypeRef evt, const std::string& caller) override;
25 
27  void i_after(CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc) override;
28 
30  inline std::string i_id(CustomEventTypeRef evt, const std::string& caller) {
31  return caller + ":" + evt;
32  }
33 
36 };
37 
38 #endif
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
SmartIF< IChronoStatSvc > & chronoSvc()
Definition: ChronoAuditor.h:34
Base class with common functionalities shared by few auditor implementations.
Definition: CommonAuditor.h:5
~ChronoAuditor() override=default
STL class.
ChronoAuditor(const std::string &name, ISvcLocator *pSvcLocator)
void i_before(CustomEventTypeRef evt, const std::string &caller) override
Default (catch-all) "before" Auditor hook.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
SmartIF< IChronoStatSvc > m_chronoSvc
Definition: ChronoAuditor.h:35
void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc) override
Default (catch-all) "after" Auditor hook.
Monitors the cpu time usage of each algorithm.
Definition: ChronoAuditor.h:14
StatusCode initialize() override
std::string i_id(CustomEventTypeRef evt, const std::string &caller)
Compute the id string to be used for the chrono entity.
Definition: ChronoAuditor.h:30
const std::string & name() const override
Definition: Auditor.cpp:202
evt
Definition: IOTest.py:85