All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NameAuditor.cpp
Go to the documentation of this file.
1 // NameAuditor:
2 // An auditor that prints the name of each algorithm method before
3 // and after it is called///
4 
5 #include "NameAuditor.h"
6 
8 
10 
11 NameAuditor::NameAuditor(const std::string& name, ISvcLocator* pSvcLocator):
12  CommonAuditor(name, pSvcLocator) {
13 }
14 
15 void NameAuditor::i_before(CustomEventTypeRef evt, const std::string& caller)
16 {
17  MsgStream log( msgSvc(), name() );
18  log << MSG::INFO << "About to Enter " << caller << " with auditor trigger "
19  << evt << endmsg;
20 }
21 
22 void NameAuditor::i_after(CustomEventTypeRef evt, const std::string& caller, const StatusCode&)
23 {
24  MsgStream log( msgSvc(), name() );
25  log << MSG::INFO << "Just Exited " << caller << " with auditor trigger "
26  << evt << endmsg;
27 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
virtual void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc)
Print a message on "after".
Definition: NameAuditor.cpp:22
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual const std::string & name() const
Retrieve the name of the instance.
Definition: Auditor.cpp:218
virtual void i_before(CustomEventTypeRef evt, const std::string &caller)
Print a message on "before".
Definition: NameAuditor.cpp:15
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Auditor.cpp:226
Base class with common functionalities shared by few auditor implementations.
Definition: CommonAuditor.h:5
const CustomEventType & CustomEventTypeRef
Used in function calls for optimization purposes.
Definition: IAuditor.h:41
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:35
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std
AIDA -> ROTO converter.
Definition: GaudiAlgs.py:73
Prints the name of each algorithm before entering the algorithm and after leaving it...
Definition: NameAuditor.h:11
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243