Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiCommonSvc
src
ChronoStatSvc.h
Go to the documentation of this file.
1
#ifndef GAUDISVC_CHRONOSTATSVC_H__
2
#define GAUDISVC_CHRONOSTATSVC_H__
3
// ============================================================================
4
// include files
5
// ============================================================================
6
// STD & STL
7
// ============================================================================
8
#include <string>
9
#include <map>
10
#include <functional>
11
#include <fstream>
12
// ============================================================================
13
// GaudiKernel
14
// ============================================================================
15
#include "
GaudiKernel/Kernel.h
"
16
#include "
GaudiKernel/Service.h
"
17
#include "
GaudiKernel/IChronoStatSvc.h
"
18
#include "
GaudiKernel/IIncidentListener.h
"
19
// ============================================================================
21
// ============================================================================
22
class
ISvcLocator
;
23
class
IMessageSvc
;
24
// ============================================================================
33
class
ChronoStatSvc
:
public
extends2
<Service, IChronoStatSvc,
34
IIncidentListener> {
35
public
:
36
// ============================================================================
38
typedef
std::map<IChronoStatSvc::ChronoTag,ChronoEntity>
ChronoMap
;
39
typedef
std::map<IChronoStatSvc::StatTag,StatEntity>
StatMap
;
40
// ============================================================================
41
public
:
42
// ============================================================================
44
virtual
StatusCode
initialize
();
46
virtual
StatusCode
finalize
();
47
// ============================================================================
48
public
:
49
// ============================================================================
53
virtual
ChronoEntity
*
chronoStart
54
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
55
// ============================================================================
59
virtual
const
ChronoEntity
*
chronoStop
60
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
61
// ============================================================================
65
virtual
IChronoStatSvc::ChronoTime
chronoDelta
66
(
const
IChronoStatSvc::ChronoTag
& chronoTag,
67
IChronoStatSvc::ChronoType
theType );
68
// ============================================================================
72
virtual
void
chronoPrint
73
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
74
// ============================================================================
78
virtual
ChronoStatus
chronoStatus
79
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
80
// ============================================================================
85
virtual
void
stat
86
(
const
IChronoStatSvc::StatTag
& statTag ,
87
const
IChronoStatSvc::StatFlag
& statFlag ) ;
88
// ============================================================================
93
virtual
void
statPrint
94
(
const
IChronoStatSvc::ChronoTag
& statTag) ;
95
// ============================================================================
101
virtual
const
ChronoEntity
*
chrono
102
(
const
IChronoStatSvc::ChronoTag
& t )
const
;
103
// ============================================================================
109
virtual
const
StatEntity
*
stat
110
(
const
IChronoStatSvc::StatTag
& t )
const
;
111
// ============================================================================
116
ChronoStatSvc
(
const
std::string&
name
,
ISvcLocator
* svcloc );
118
virtual
~ChronoStatSvc
();
119
// ============================================================================
120
121
public
:
122
void
handle
(
const
Incident
& incident);
123
124
125
protected
:
126
// ============================================================================
127
// print the "Stat" part of the ChronoStatSvc
128
void
printStats
() ;
129
// ============================================================================
130
private
:
131
// ============================================================================
132
// default constructor is disabled
133
ChronoStatSvc
() ;
134
// copy constructor is disabled
135
ChronoStatSvc
(
const
ChronoStatSvc
& ) ;
136
// assignement operator constructor is disabled
137
ChronoStatSvc
&
operator=
(
const
ChronoStatSvc
& ) ;
138
// ============================================================================
140
void
saveStats
();
141
// ============================================================================
142
private
:
143
// ============================================================================
145
ChronoMap
m_chronoEntities
;
147
int
m_intChronoPrintLevel
;
148
MSG::Level
m_chronoPrintLevel
;
150
bool
m_chronoTableFlag
;
152
bool
m_chronoCoutFlag
;
154
bool
m_chronoOrderFlag
;
156
bool
m_printUserTime
;
158
bool
m_printSystemTime
;
160
bool
m_printEllapsedTime
;
161
162
// property
163
long
m_numberOfSkippedEventsForMemStat
;
164
166
StatMap
m_statEntities
;
167
169
int
m_intStatPrintLevel
;
170
MSG::Level
m_statPrintLevel
;
172
bool
m_statTableFlag
;
174
bool
m_statCoutFlag
;
176
bool
m_statOrderFlag
;
178
180
StringProperty
m_statsOutFileName
;
181
182
// the header row
183
std::string
m_header
;
184
// format for regular statistical printout rows
185
std::string
m_format1
;
186
// format for "efficiency" statistical printout rows
187
std::string
m_format2
;
188
// flag to use the special "efficiency" format
189
bool
m_useEffFormat
;
190
191
typedef
std::map<ChronoTag, std::vector<IChronoSvc::ChronoTime> >
TimeMap
;
192
TimeMap
m_perEvtTime
;
193
std::string
m_perEventFile
;
194
std::ofstream
m_ofd
;
195
196
// ============================================================================
197
};
198
// ============================================================================
199
// The END
200
// ============================================================================
201
#endif // GAUDISVC_CHRONOSTATSVC_H
202
// ============================================================================
203
204
Generated at Wed Jun 4 2014 14:48:56 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004