Gaudi Framework, version v24r2
Home
Generated: Wed Dec 4 2013
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
GaudiCommonSvc
src
ChronoStatSvc.h
Go to the documentation of this file.
1
// $Id: ChronoStatSvc.h,v 1.13 2008/05/13 12:37:19 marcocle Exp $
2
// ============================================================================
3
// CVS tag $Name: $, version $Revision: 1.13 $
4
// ============================================================================
5
#ifndef GAUDISVC_CHRONOSTATSVC_H__
6
#define GAUDISVC_CHRONOSTATSVC_H__
7
// ============================================================================
8
// include files
9
// ============================================================================
10
// STD & STL
11
// ============================================================================
12
#include <
string
>
13
#include <
map
>
14
#include <
functional
>
15
#include <
fstream
>
16
// ============================================================================
17
// GaudiKernel
18
// ============================================================================
19
#include "
GaudiKernel/SvcFactory.h
"
20
#include "
GaudiKernel/Kernel.h
"
21
#include "
GaudiKernel/Service.h
"
22
#include "
GaudiKernel/IChronoStatSvc.h
"
23
#include "
GaudiKernel/IIncidentListener.h
"
24
// ============================================================================
26
// ============================================================================
27
class
ISvcLocator
;
28
class
IMessageSvc
;
29
// ============================================================================
38
class
ChronoStatSvc
:
public
extends2
<Service, IChronoStatSvc,
39
IIncidentListener> {
40
public
:
41
// ============================================================================
43
typedef
std::map<IChronoStatSvc::ChronoTag,ChronoEntity>
ChronoMap
;
44
typedef
std::map<IChronoStatSvc::StatTag,StatEntity>
StatMap
;
45
// ============================================================================
46
public
:
47
// ============================================================================
49
virtual
StatusCode
initialize
();
51
virtual
StatusCode
finalize
();
52
// ============================================================================
53
public
:
54
// ============================================================================
58
virtual
ChronoEntity
*
chronoStart
59
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
60
// ============================================================================
64
virtual
const
ChronoEntity
*
chronoStop
65
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
66
// ============================================================================
70
virtual
IChronoStatSvc::ChronoTime
chronoDelta
71
(
const
IChronoStatSvc::ChronoTag
& chronoTag,
72
IChronoStatSvc::ChronoType
theType );
73
// ============================================================================
77
virtual
void
chronoPrint
78
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
79
// ============================================================================
83
virtual
ChronoStatus
chronoStatus
84
(
const
IChronoStatSvc::ChronoTag
& chronoTag );
85
// ============================================================================
90
virtual
void
stat
91
(
const
IChronoStatSvc::StatTag
& statTag ,
92
const
IChronoStatSvc::StatFlag
& statFlag ) ;
93
// ============================================================================
98
virtual
void
statPrint
99
(
const
IChronoStatSvc::ChronoTag
& statTag) ;
100
// ============================================================================
106
virtual
const
ChronoEntity
*
chrono
107
(
const
IChronoStatSvc::ChronoTag
& t )
const
;
108
// ============================================================================
114
virtual
const
StatEntity
*
stat
115
(
const
IChronoStatSvc::StatTag
& t )
const
;
116
// ============================================================================
121
ChronoStatSvc
(
const
std::string
&
name
,
ISvcLocator
* svcloc );
123
virtual
~ChronoStatSvc
();
124
// ============================================================================
125
126
public
:
127
void
handle
(
const
Incident
& incident);
128
129
130
protected
:
131
// ============================================================================
132
// print the "Stat" part of the ChronoStatSvc
133
void
printStats
() ;
134
// ============================================================================
135
private
:
136
// ============================================================================
137
// default constructor is disabled
138
ChronoStatSvc
() ;
139
// copy constructor is disabled
140
ChronoStatSvc
(
const
ChronoStatSvc
& ) ;
141
// assignement operator constructor is disabled
142
ChronoStatSvc
&
operator=
(
const
ChronoStatSvc
& ) ;
143
// ============================================================================
145
void
saveStats
();
146
// ============================================================================
147
private
:
148
// ============================================================================
150
ChronoMap
m_chronoEntities
;
152
int
m_intChronoPrintLevel
;
153
MSG::Level
m_chronoPrintLevel
;
155
bool
m_chronoTableFlag
;
157
bool
m_chronoCoutFlag
;
159
bool
m_chronoOrderFlag
;
161
bool
m_printUserTime
;
163
bool
m_printSystemTime
;
165
bool
m_printEllapsedTime
;
166
167
// property
168
long
m_numberOfSkippedEventsForMemStat
;
169
171
StatMap
m_statEntities
;
172
174
int
m_intStatPrintLevel
;
175
MSG::Level
m_statPrintLevel
;
177
bool
m_statTableFlag
;
179
bool
m_statCoutFlag
;
181
bool
m_statOrderFlag
;
183
185
StringProperty
m_statsOutFileName
;
186
187
// the header row
188
std::string
m_header
;
189
// format for regular statistical printout rows
190
std::string
m_format1
;
191
// format for "efficiency" statistical printout rows
192
std::string
m_format2
;
193
// flag to use the special "efficiency" format
194
bool
m_useEffFormat
;
195
196
typedef
std::map<ChronoTag, std::vector<IChronoSvc::ChronoTime>
>
TimeMap
;
197
TimeMap
m_perEvtTime
;
198
std::string
m_perEventFile
;
199
std::ofstream
m_ofd
;
200
201
// ============================================================================
202
};
203
// ============================================================================
204
// The END
205
// ============================================================================
206
#endif // GAUDISVC_CHRONOSTATSVC_H
207
// ============================================================================
208
209
Generated at Wed Dec 4 2013 14:33:07 for Gaudi Framework, version v24r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004