ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PerformanceMonitoring
PerfMonGPerfTools
src
ProfilerService.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef PERFMONGPERFTOOLS_PROFILERSERVICE_H
8
#define PERFMONGPERFTOOLS_PROFILERSERVICE_H
9
10
// STL include(s):
11
#include <string>
12
13
// Gaudi/Athena include(s):
14
#include "GaudiKernel/ServiceHandle.h"
15
#include "GaudiKernel/IIncidentListener.h"
16
#include "GaudiKernel/IIncidentSvc.h"
17
#include "
AthenaBaseComps/AthService.h
"
18
19
// Local include(s):
20
#include "
PerfMonGPerfTools/IProfilerSvc.h
"
21
22
namespace
GPT
{
23
33
class
ProfilerService
:
public
extends<AthService,
34
IProfilerSvc,
35
IIncidentListener> {
36
37
public
:
39
ProfilerService
(
const
std::string& name, ISvcLocator* svcloc );
41
virtual
~ProfilerService
();
42
44
virtual
StatusCode
initialize
()
override
;
46
virtual
StatusCode
finalize
()
override
;
47
49
virtual
StatusCode
startCPUProfiling
(
const
std::string& filename )
override
;
51
virtual
StatusCode
stopCPUProfiling
()
override
;
53
virtual
bool
isCPUProfilingRunning
()
const override
;
54
56
virtual
void
handle
(
const
Incident& inc )
override
;
57
58
private
:
60
ServiceHandle< IIncidentSvc >
m_incidentSvc
;
61
63
bool
m_controlledProfiling
;
65
int
m_initEvent
;
67
std::string
m_profFileName
;
68
70
bool
m_running
;
72
std::string
m_fileName
;
73
75
int
m_processedEvents
;
76
77
};
// class IProfilerSvc
78
79
}
// namespace GPT
80
81
#endif
// PERFMONGPERFTOOLS_PROFILERSERVICE_H
AthService.h
IProfilerSvc.h
GPT::ProfilerService::~ProfilerService
virtual ~ProfilerService()
Destructor.
Definition
ProfilerService.cxx:41
GPT::ProfilerService::m_running
bool m_running
Is the CPU profiling running at the moment?
Definition
ProfilerService.h:70
GPT::ProfilerService::stopCPUProfiling
virtual StatusCode stopCPUProfiling() override
Stop the GPT profiling.
Definition
ProfilerService.cxx:127
GPT::ProfilerService::finalize
virtual StatusCode finalize() override
Standard Gaudi finalization function.
Definition
ProfilerService.cxx:81
GPT::ProfilerService::isCPUProfilingRunning
virtual bool isCPUProfilingRunning() const override
Is the GPT profiling running at the moment?
Definition
ProfilerService.cxx:155
GPT::ProfilerService::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle to the incident service.
Definition
ProfilerService.h:60
GPT::ProfilerService::m_initEvent
int m_initEvent
Property: Event in which non-controlled profiling should start.
Definition
ProfilerService.h:65
GPT::ProfilerService::m_fileName
std::string m_fileName
Name of the current profile file.
Definition
ProfilerService.h:72
GPT::ProfilerService::ProfilerService
ProfilerService(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi service constructor.
Definition
ProfilerService.cxx:27
GPT::ProfilerService::startCPUProfiling
virtual StatusCode startCPUProfiling(const std::string &filename) override
Start GPT profiling.
Definition
ProfilerService.cxx:99
GPT::ProfilerService::handle
virtual void handle(const Incident &inc) override
Function handling incoming incidents.
Definition
ProfilerService.cxx:167
GPT::ProfilerService::m_processedEvents
int m_processedEvents
Number of events processed so far.
Definition
ProfilerService.h:75
GPT::ProfilerService::m_controlledProfiling
bool m_controlledProfiling
Property: Is profiling controlled from the outside?
Definition
ProfilerService.h:63
GPT::ProfilerService::initialize
virtual StatusCode initialize() override
Standard Gaudi initialization function.
Definition
ProfilerService.cxx:49
GPT::ProfilerService::m_profFileName
std::string m_profFileName
Property: Profile file name in non-controlled profiling.
Definition
ProfilerService.h:67
ServiceHandle< IIncidentSvc >
GPT
Definition
IProfilerSvc.h:16
Generated on
for ATLAS Offline Software by
1.17.0