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
5
//FIXME only forward declarations???
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
FWCore/ServiceRegistry/interface/ActivityRegistry.h
"
8
#include "
FWCore/ServiceRegistry/interface/PathContext.h
"
9
10
#include <vector>
11
#include <string>
12
13
// Unit test for ProfilerService
14
namespace
test
{
15
class
TestProfilerService;
16
struct
CheckPaths;
17
}
18
24
class
ProfilerService
{
25
// For tests
26
friend
class
test::TestProfilerService;
27
friend
struct
test::CheckPaths;
28
29
public
:
30
32
ProfilerService
(
edm::ParameterSet
const
&
pset
,
33
edm::ActivityRegistry
& activity);
34
36
~
ProfilerService
();
37
38
39
// ---- Public Interface -----
40
41
43
bool
startInstrumentation();
44
46
bool
stopInstrumentation();
47
49
bool
forceStopInstrumentation();
50
51
// pause instrumentation (if active)
52
bool
pauseInstrumentation();
53
54
// resume instrumentation (if paused)
55
bool
resumeInstrumentation();
56
58
void
dumpStat()
const
;
59
61
bool
doEvent
()
const
{
return
m_doEvent;}
62
64
bool
active
()
const
{
return
m_active>0;}
65
66
67
// ---- Service Interface: to be called only by the Framework ----
68
69
void
preSourceI
(
edm::StreamID
) {
70
fullEvent();
71
}
72
73
void
beginEventI
(
edm::StreamContext
const
& stream) {
74
beginEvent();
75
}
76
77
void
endEventI
(
edm::StreamContext
const
& stream) {
78
endEvent();
79
}
80
void
beginPathI
(
edm::StreamContext
const
& stream,
edm::PathContext
const
&
path
) {
81
beginPath(path.
pathName
());
82
}
83
void
endPathI
(
edm::StreamContext
const
& stream,
edm::PathContext
const
&
path
,
edm::HLTPathStatus
const
&) {
84
endPath(path.
pathName
());
85
}
86
87
private
:
88
89
void
fullEvent();
90
91
void
beginEvent();
92
void
endEvent();
93
94
void
beginPath(
std::string
const
&
path
);
95
void
endPath(
std::string
const
& path);
96
97
void
newEvent();
98
99
// configurable
100
int
m_firstEvent
;
101
int
m_lastEvent
;
102
int
m_dumpInterval
;
103
std::vector<std::string>
m_paths
;
104
std::vector<std::string>
m_excludedPaths
;
105
bool
m_allPaths
;
106
107
// internal state
108
int
m_evtCount
;
109
int
m_counts
;
110
bool
m_doEvent
;
111
int
m_active
;
112
bool
m_paused
;
113
std::string
m_activePath
;
114
115
};
116
117
#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:64
ProfilerService::m_doEvent
bool m_doEvent
Definition:
ProfilerService.h:110
edm::HLTPathStatus
Definition:
HLTPathStatus.h:34
callgraph.path
path
Definition:
callgraph.py:39
ProfilerService::m_excludedPaths
std::vector< std::string > m_excludedPaths
Definition:
ProfilerService.h:104
ProfilerService::endPathI
void endPathI(edm::StreamContext const &stream, edm::PathContext const &path, edm::HLTPathStatus const &)
Definition:
ProfilerService.h:83
ProfilerService::m_firstEvent
int m_firstEvent
Definition:
ProfilerService.h:100
ProfilerService::m_paths
std::vector< std::string > m_paths
Definition:
ProfilerService.h:103
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:113
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
ProfilerService::m_active
int m_active
Definition:
ProfilerService.h:111
ParameterSet.h
edm::PathContext
Definition:
PathContext.h:24
ProfilerService::preSourceI
void preSourceI(edm::StreamID)
Definition:
ProfilerService.h:69
ProfilerService::m_dumpInterval
int m_dumpInterval
Definition:
ProfilerService.h:102
ProfilerService
Definition:
ProfilerService.h:24
ProfilerService::m_lastEvent
int m_lastEvent
Definition:
ProfilerService.h:101
ProfilerService::endEventI
void endEventI(edm::StreamContext const &stream)
Definition:
ProfilerService.h:77
PathContext.h
ProfilerService::m_evtCount
int m_evtCount
Definition:
ProfilerService.h:108
ActivityRegistry.h
ProfilerService::beginPathI
void beginPathI(edm::StreamContext const &stream, edm::PathContext const &path)
Definition:
ProfilerService.h:80
ProfilerService::m_allPaths
bool m_allPaths
Definition:
ProfilerService.h:105
edm::ParameterSet
Definition:
ParameterSet.h:36
ProfilerService::m_paused
bool m_paused
Definition:
ProfilerService.h:112
ProfilerService::m_counts
int m_counts
Definition:
ProfilerService.h:109
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:61
ProfilerService::beginEventI
void beginEventI(edm::StreamContext const &stream)
Definition:
ProfilerService.h:73
Generated for CMSSW Reference Manual by
1.8.11