ATLAS Offline Software
Loading...
Searching...
No Matches
VTuneProfilerService.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
25class IAuditorSvc;
26
27class VTuneProfilerService : public extends<AthService,
28 IVTuneProfilerSvc,
29 IIncidentListener> {
30
31 public:
32
34 VTuneProfilerService( const std::string& name, ISvcLocator* svcloc );
35
37 virtual StatusCode initialize() override;
38
40 virtual StatusCode resumeProfiling() override;
41
43 virtual StatusCode pauseProfiling() override;
44
46 virtual bool isProfilingRunning() const override;
47
49 virtual void handle( const Incident& inc ) override;
50
51 private:
52
55
58
61
63 std::vector<std::string> m_algs;
64
66 std::unique_ptr< VTuneProfileRunner > m_runner;
67
69 std::atomic<int> m_processedEvents;
70
71 std::mutex m_mutex;
72
73}; // class IVTuneProfilerSvc
74
75#endif // VTUNE_PROFILERSERVICE.H
VTuneProfilerService(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi service constructor.
std::unique_ptr< VTuneProfileRunner > m_runner
Unique ptr to the VTuneProfileRunner.
int m_pauseEvent
Property: Event in which profiling should pause.
std::vector< std::string > m_algs
Property: List of algorithms to profile.
std::atomic< int > m_processedEvents
Number of events processed so far.
int m_resumeEvent
Property: Event in which profiling should start.
virtual bool isProfilingRunning() const override
Is the profiling running at the moment?
virtual void handle(const Incident &inc) override
Function handling incoming incidents.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle to the incident service.
virtual StatusCode resumeProfiling() override
Resume profiling.
virtual StatusCode pauseProfiling() override
Pause profiling.
virtual StatusCode initialize() override
Standard Gaudi initialization function.