The Gaudi Framework  v33r0 (d5ea422b)
NameAuditor.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 // NameAuditor:
12 // An auditor that prints the name of each algorithm method before
13 // and after it is called///
14 
15 #include "NameAuditor.h"
16 
17 #include "GaudiKernel/MsgStream.h"
18 
20 
21 void NameAuditor::i_before( CustomEventTypeRef evt, const std::string& caller ) {
22  info() << "About to Enter " << caller << " with auditor trigger " << evt << endmsg;
23 }
24 
25 void NameAuditor::i_after( CustomEventTypeRef evt, const std::string& caller, const StatusCode& ) {
26  info() << "Just Exited " << caller << " with auditor trigger " << evt << endmsg;
27 }
void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc) override
Print a message on "after".
Definition: NameAuditor.cpp:25
STL namespace.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
STL class.
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Prints the name of each algorithm before entering the algorithm and after leaving it.
Definition: NameAuditor.h:21
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202