Main Page
Namespaces
Classes
Package Documentation
PerfTools
Callgrind
interface
ProfilerService.h
Go to the documentation of this file.
1
#ifndef ProfilerService_H
2
#define ProfilerService_H
3
4
//FIXME only forward declarations???
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/ServiceRegistry/interface/ActivityRegistry.h
"
7
#include "
FWCore/ServiceRegistry/interface/PathContext.h
"
8
9
#include <vector>
10
#include <string>
11
12
// Unit test for ProfilerService
13
namespace
test
{
14
class
TestProfilerService;
15
struct
CheckPaths;
16
}
// namespace test
17
23
class
ProfilerService
{
24
// For tests
25
friend
class
test::TestProfilerService;
26
friend
struct
test::CheckPaths;
27
28
public
:
30
ProfilerService
(
edm::ParameterSet
const
&
pset
,
edm::ActivityRegistry
& activity);
31
33
~
ProfilerService
();
34
35
// ---- Public Interface -----
36
38
bool
startInstrumentation();
39
41
bool
stopInstrumentation();
42
44
bool
forceStopInstrumentation();
45
46
// pause instrumentation (if active)
47
bool
pauseInstrumentation();
48
49
// resume instrumentation (if paused)
50
bool
resumeInstrumentation();
51
53
void
dumpStat()
const
;
54
56
bool
doEvent
()
const
{
return
m_doEvent; }
57
59
bool
active
()
const
{
return
m_active > 0; }
60
61
// ---- Service Interface: to be called only by the Framework ----
62
63
void
preSourceI
(
edm::StreamID
) { fullEvent(); }
64
65
void
beginEventI
(
edm::StreamContext
const
& stream) { beginEvent(); }
66
67
void
endEventI
(
edm::StreamContext
const
& stream) { endEvent(); }
68
void
beginPathI
(
edm::StreamContext
const
& stream,
edm::PathContext
const
&
path
) { beginPath(path.
pathName
()); }
69
void
endPathI
(
edm::StreamContext
const
& stream,
edm::PathContext
const
&
path
,
edm::HLTPathStatus
const
&) {
70
endPath
(path.
pathName
());
71
}
72
73
private
:
74
void
fullEvent();
75
76
void
beginEvent();
77
void
endEvent();
78
79
void
beginPath(
std::string
const
&
path
);
80
void
endPath
(
std::string
const
& path);
81
82
void
newEvent();
83
84
// configurable
85
int
m_firstEvent
;
86
int
m_lastEvent
;
87
int
m_dumpInterval
;
88
std::vector<std::string>
m_paths
;
89
std::vector<std::string>
m_excludedPaths
;
90
bool
m_allPaths
;
91
92
// internal state
93
int
m_evtCount
;
94
int
m_counts
;
95
bool
m_doEvent
;
96
int
m_active
;
97
bool
m_paused
;
98
std::string
m_activePath
;
99
};
100
101
#endif // ProfilerService_H
edm::PathContext::pathName
std::string const & pathName() const
Definition:
PathContext.h:30
ProfilerService::active
bool active() const
true if instrumentation is active
Definition:
ProfilerService.h:59
ProfilerService::m_doEvent
bool m_doEvent
Definition:
ProfilerService.h:95
edm::HLTPathStatus
Definition:
HLTPathStatus.h:33
ProfilerService::m_excludedPaths
std::vector< std::string > m_excludedPaths
Definition:
ProfilerService.h:89
ProfilerService::endPathI
void endPathI(edm::StreamContext const &stream, edm::PathContext const &path, edm::HLTPathStatus const &)
Definition:
ProfilerService.h:69
ProfilerService::m_firstEvent
int m_firstEvent
Definition:
ProfilerService.h:85
ProfilerService::m_paths
std::vector< std::string > m_paths
Definition:
ProfilerService.h:88
ZMuMuCategoriesSequences_cff.endPath
endPath
Definition:
ZMuMuCategoriesSequences_cff.py:316
castor_dqm_sourceclient_file_cfg.path
path
Definition:
castor_dqm_sourceclient_file_cfg.py:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::StreamID
Definition:
StreamID.h:30
test
Definition:
SmallWORMDict.h:13
ProfilerService::m_activePath
std::string m_activePath
Definition:
ProfilerService.h:98
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
ProfilerService::m_active
int m_active
Definition:
ProfilerService.h:96
ParameterSet.h
edm::PathContext
Definition:
PathContext.h:24
ProfilerService::preSourceI
void preSourceI(edm::StreamID)
Definition:
ProfilerService.h:63
ProfilerService::m_dumpInterval
int m_dumpInterval
Definition:
ProfilerService.h:87
ProfilerService
Definition:
ProfilerService.h:23
ProfilerService::m_lastEvent
int m_lastEvent
Definition:
ProfilerService.h:86
ProfilerService::endEventI
void endEventI(edm::StreamContext const &stream)
Definition:
ProfilerService.h:67
PathContext.h
ProfilerService::m_evtCount
int m_evtCount
Definition:
ProfilerService.h:93
ActivityRegistry.h
ProfilerService::beginPathI
void beginPathI(edm::StreamContext const &stream, edm::PathContext const &path)
Definition:
ProfilerService.h:68
ProfilerService::m_allPaths
bool m_allPaths
Definition:
ProfilerService.h:90
edm::ParameterSet
Definition:
ParameterSet.h:36
ProfilerService::m_paused
bool m_paused
Definition:
ProfilerService.h:97
ProfilerService::m_counts
int m_counts
Definition:
ProfilerService.h:94
edm::StreamContext
Definition:
StreamContext.h:31
edm::ActivityRegistry
Definition:
ActivityRegistry.h:132
ProfilerService::doEvent
bool doEvent() const
true if the current event has to be instrumented
Definition:
ProfilerService.h:56
ProfilerService::beginEventI
void beginEventI(edm::StreamContext const &stream)
Definition:
ProfilerService.h:65
Generated for CMSSW Reference Manual by
1.8.11