The Gaudi Framework  master (37c0b60a)
CommonAuditor.cpp
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 #include "CommonAuditor.h"
13 
14 void CommonAuditor::before( StandardEventType evt, INamedInterface* caller ) {
15  if ( caller ) before( toStr( evt ), caller->name() );
16 }
17 void CommonAuditor::before( StandardEventType evt, const std::string& caller ) { before( toStr( evt ), caller ); }
18 void CommonAuditor::before( CustomEventTypeRef evt, INamedInterface* caller ) {
19  if ( caller ) before( evt, caller->name() );
20 }
21 void CommonAuditor::before( CustomEventTypeRef evt, const std::string& caller ) {
22  if ( i_auditEventType( evt ) ) i_before( evt, caller );
23 }
24 
25 void CommonAuditor::after( StandardEventType evt, INamedInterface* caller, const StatusCode& sc ) {
26  if ( caller ) after( toStr( evt ), caller->name(), sc );
27 }
28 void CommonAuditor::after( StandardEventType evt, const std::string& caller, const StatusCode& sc ) {
29  after( toStr( evt ), caller, sc );
30 }
31 void CommonAuditor::after( CustomEventTypeRef evt, INamedInterface* caller, const StatusCode& sc ) {
32  if ( caller ) after( evt, caller->name(), sc );
33 }
34 void CommonAuditor::after( CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc ) {
35  if ( i_auditEventType( evt ) ) i_after( evt, caller, sc );
36 }
IOTest.evt
evt
Definition: IOTest.py:107
std::string
STL class.
CommonAuditor::before
void before(StandardEventType evt, const std::string &caller) override
Definition: CommonAuditor.cpp:17
CommonAuditor::i_before
virtual void i_before(CustomEventTypeRef evt, std::string_view caller)=0
catch all "before" method, implemented in the derived class
GaudiException.h
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
CommonAuditor::after
void after(StandardEventType evt, const std::string &caller, const StatusCode &sc) override
Definition: CommonAuditor.cpp:28
StatusCode
Definition: StatusCode.h:65
CommonAuditor::i_auditEventType
bool i_auditEventType(std::string_view evt)
Check if we are requested to audit the passed event type.
Definition: CommonAuditor.h:52
INamedInterface
Definition: INamedInterface.h:25
CommonAuditor::i_after
virtual void i_after(CustomEventTypeRef evt, std::string_view caller, const StatusCode &sc)=0
catch all "after" method, implemented in the derived class
CommonAuditor.h