ATLAS Offline Software
PerfMonMTAuditor.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Framework includes
6 #include "GaudiKernel/INamedInterface.h"
7 #include "GaudiKernel/MsgStream.h"
8 
9 // PerfMonKernel includes
11 
12 // PerfMonComps includes
13 #include "PerfMonMTAuditor.h"
14 
15 
16 /*
17  * Constructor
18  */
20  ISvcLocator* pSvcLocator ) :
21  Auditor ( name, pSvcLocator ),
22  m_perfMonMTSvc ( "PerfMonMTSvc", name )
23 {
24 
25 }
26 
27 /*
28  * Initialize the Auditor
29  */
31 {
32 
33  if ( !m_perfMonMTSvc.retrieve().isSuccess() ) {
34  return StatusCode::FAILURE;
35  }
36 
37  return StatusCode::SUCCESS;
38 }
39 
40 /*
41  * Implementation of base class methods
42  */
43 void PerfMonMTAuditor::before( StandardEventType etype, INamedInterface* component ) {
44  return m_perfMonMTSvc->startAud( toStr(etype) , component->name() );
45 }
46 
47 void PerfMonMTAuditor::before( StandardEventType etype, const std::string& compName ) {
48  return m_perfMonMTSvc->startAud( toStr(etype) , compName );
49 }
50 
51 void PerfMonMTAuditor::before( CustomEventTypeRef etype, INamedInterface* component ) {
52  return m_perfMonMTSvc->startAud( etype , component->name() );
53 }
54 
55 void PerfMonMTAuditor::before( CustomEventTypeRef etype, const std::string& compName ) {
56  return m_perfMonMTSvc->startAud( etype , compName );
57 }
58 
59 void PerfMonMTAuditor::after( StandardEventType etype, INamedInterface* component, const StatusCode& ) {
60  return m_perfMonMTSvc->stopAud( toStr(etype), component->name() );
61 }
62 
63 void PerfMonMTAuditor::after( StandardEventType etype, const std::string& compName, const StatusCode& ) {
64  return m_perfMonMTSvc->stopAud( toStr(etype), compName );
65 }
66 
67 void PerfMonMTAuditor::after( CustomEventTypeRef etype, INamedInterface* component, const StatusCode& ) {
68  return m_perfMonMTSvc->stopAud( etype, component->name() );
69 }
70 
71 void PerfMonMTAuditor::after( CustomEventTypeRef etype, const std::string& compName , const StatusCode& ) {
72  return m_perfMonMTSvc->stopAud( etype, compName );
73 }
AddEmptyComponent.compName
compName
Definition: AddEmptyComponent.py:32
PerfMonMTAuditor::before
void before(StandardEventType, INamedInterface *) override
Implement inherited methods from Auditor.
Definition: PerfMonMTAuditor.cxx:43
Ringer::toStr
const char * toStr(SegmentationType e)
Transform enumeration types to string.
PerfMonMTAuditor::after
void after(StandardEventType, INamedInterface *, const StatusCode &) override
Definition: PerfMonMTAuditor.cxx:59
IPerfMonMTSvc.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
PerfMonMTAuditor.h
PerfMonMTAuditor::m_perfMonMTSvc
ServiceHandle< IPerfMonMTSvc > m_perfMonMTSvc
Handle to PerfMonMTSvc.
Definition: PerfMonMTAuditor.h:50
PerfMonMTAuditor::PerfMonMTAuditor
PerfMonMTAuditor(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: PerfMonMTAuditor.cxx:19
PerfMonMTAuditor::initialize
virtual StatusCode initialize() override
Gaudi hooks.
Definition: PerfMonMTAuditor.cxx:30