ATLAS Offline Software
VTuneProfilerService.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef VTUNE_PROFILERSERVICE_H
6 #define VTUNE_PROFILERSERVICE_H
7 
8 // STD include(s):
9 #include <atomic>
10 #include <memory>
11 #include <vector>
12 #include <string>
13 
14 // Gaudi/Athena include(s):
15 #include "GaudiKernel/ServiceHandle.h"
16 #include "GaudiKernel/IIncidentListener.h"
17 #include "GaudiKernel/IIncidentSvc.h"
19 
20 // Local include(s):
21 #include "VTuneProfileRunner.h"
23 
24 // Fwd declerations
25 class IAuditorSvc;
26 
28  public virtual IVTuneProfilerSvc,
29  public virtual IIncidentListener {
30 
31  public:
32 
34  VTuneProfilerService( const std::string& name, ISvcLocator* svcloc );
35 
37  virtual StatusCode queryInterface( const InterfaceID& riid,
38  void** ppvIF ) override;
39 
41  virtual StatusCode initialize() override;
42 
44  virtual StatusCode resumeProfiling() override;
45 
47  virtual StatusCode pauseProfiling() override;
48 
50  virtual bool isProfilingRunning() const override;
51 
53  virtual void handle( const Incident& inc ) override;
54 
55  private:
56 
58  StatusCode makeAuditor (const std::string& audName, IAuditorSvc* audSvc);
59 
62 
65 
68 
70  std::vector<std::string> m_algs;
71 
73  std::unique_ptr< VTuneProfileRunner > m_runner;
74 
76  std::atomic<int> m_processedEvents;
77 
79 
80 }; // class IVTuneProfilerSvc
81 
82 #endif // VTUNE_PROFILERSERVICE.H
VTuneProfilerService::isProfilingRunning
virtual bool isProfilingRunning() const override
Is the profiling running at the moment?
Definition: VTuneProfilerService.cxx:143
VTuneProfileRunner.h
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
VTuneProfilerService::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle to the incident service.
Definition: VTuneProfilerService.h:61
VTuneProfilerService::pauseProfiling
virtual StatusCode pauseProfiling() override
Pause profiling.
Definition: VTuneProfilerService.cxx:122
VTuneProfilerService::m_processedEvents
std::atomic< int > m_processedEvents
Number of events processed so far.
Definition: VTuneProfilerService.h:76
VTuneProfilerService::resumeProfiling
virtual StatusCode resumeProfiling() override
Resume profiling.
Definition: VTuneProfilerService.cxx:101
VTuneProfilerService::m_resumeEvent
int m_resumeEvent
Property: Event in which profiling should start.
Definition: VTuneProfilerService.h:64
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
VTuneProfilerService::m_mutex
std::mutex m_mutex
Definition: VTuneProfilerService.h:78
VTuneProfilerService
Definition: VTuneProfilerService.h:29
VTuneProfilerService::VTuneProfilerService
VTuneProfilerService(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi service constructor.
Definition: VTuneProfilerService.cxx:21
VTuneProfilerService::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF) override
Function declaring the interface(s) implemented by the service.
Definition: VTuneProfilerService.cxx:39
VTuneProfilerService::handle
virtual void handle(const Incident &inc) override
Function handling incoming incidents.
Definition: VTuneProfilerService.cxx:152
VTuneProfilerService::m_pauseEvent
int m_pauseEvent
Property: Event in which profiling should pause.
Definition: VTuneProfilerService.h:67
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VTuneProfilerService::initialize
virtual StatusCode initialize() override
Standard Gaudi initialization function.
Definition: VTuneProfilerService.cxx:59
VTuneProfilerService::makeAuditor
StatusCode makeAuditor(const std::string &audName, IAuditorSvc *audSvc)
Helper method to create auditors.
Definition: VTuneProfilerService.cxx:217
VTuneProfilerService::m_runner
std::unique_ptr< VTuneProfileRunner > m_runner
Unique ptr to the VTuneProfileRunner.
Definition: VTuneProfilerService.h:73
AthService.h
VTuneProfilerService::m_algs
std::vector< std::string > m_algs
Property: List of algorithms to profile.
Definition: VTuneProfilerService.h:70
IVTuneProfilerSvc
Definition: IVTuneProfilerSvc.h:11
IVTuneProfilerSvc.h
ServiceHandle< IIncidentSvc >