Gaudi Framework, version v23r5
Home
Generated: Wed Nov 28 2012
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
GaudiMonitor
src
HistorySvc.h
Go to the documentation of this file.
1
// $Id: HistorySvc.h,v 1.8 2008/06/04 12:35:15 marcocle Exp $
2
3
#ifndef GAUDISVC_FASTHISTORYSVC_H
4
#define GAUDISVC_FASTHISTORYSVC_H
5
6
#include "
GaudiKernel/IHistorySvc.h
"
7
8
#ifndef GAUDIKERNEL_SERVICE_H
9
#include "
GaudiKernel/Service.h
"
10
#endif
11
#ifndef KERNEL_STATUSCODES_H
12
#include "
GaudiKernel/StatusCode.h
"
13
#endif
14
15
#include "
GaudiKernel/Algorithm.h
"
16
#include "
GaudiKernel/AlgTool.h
"
17
#include "
GaudiKernel/IIncidentListener.h
"
18
#include "
GaudiKernel/IVersHistoryObj.h
"
19
20
#include <
vector
>
21
#include <
string
>
22
#include <
set
>
23
#include <
map
>
24
#include <
fstream
>
25
#include "
GaudiKernel/ClassID.h
"
26
#include "
GaudiKernel/MsgStream.h
"
27
28
class
StoreGateSvc;
29
class
IAlgContextSvc
;
30
class
IIncidentSvc
;
31
class
HistoryObj
;
32
class
DataHistory
;
33
class
AlgorithmHistory
;
34
class
ServiceHistory
;
35
struct
DHH
;
36
37
// Forward declarations
38
template
<
class
TYPE>
class
SvcFactory
;
39
46
class
HistorySvc
:
public
extends2
<Service, IHistorySvc, IIncidentListener> {
47
public
:
48
49
virtual
StatusCode
initialize
();
50
virtual
StatusCode
reinitialize
();
51
virtual
StatusCode
finalize
();
52
virtual
StatusCode
stop
();
53
54
virtual
StatusCode
captureState
();
55
56
virtual
StatusCode
registerJob
();
57
virtual
StatusCode
listProperties
()
const
;
58
virtual
JobHistory
*
getJobHistory
()
const
;
59
60
virtual
StatusCode
registerSvc
(
const
IService
&);
61
virtual
StatusCode
listProperties
(
const
IService
&)
const
;
62
virtual
ServiceHistory
*
getServiceHistory
(
const
IService
&)
const
;
63
virtual
void
getServiceHistory
(
std::set<ServiceHistory*>
&)
const
;
64
65
virtual
StatusCode
registerAlg
(
const
Algorithm
&);
66
virtual
StatusCode
listProperties
(
const
Algorithm
&)
const
;
67
virtual
AlgorithmHistory
*
getAlgHistory
(
const
Algorithm
&)
const
;
68
virtual
void
getAlgHistory
(
std::set<AlgorithmHistory*>
&)
const
;
69
70
virtual
StatusCode
registerAlgTool
(
const
IAlgTool
&);
71
virtual
StatusCode
listProperties
(
const
IAlgTool
&)
const
;
72
virtual
AlgToolHistory
*
getAlgToolHistory
(
const
IAlgTool
&)
const
;
73
virtual
void
getAlgToolHistory
(
std::set<AlgToolHistory*>
&)
const
;
74
75
virtual
DataHistory
*
createDataHistoryObj
(
const
CLID
&
id
,
76
const
std::string
& key,
77
const
std::string
& store);
78
virtual
StatusCode
registerDataHistory
(
const
CLID
&
id
,
79
const
std::string
& key,
80
const
std::string
& store);
81
virtual
DataHistory
*
getDataHistory
(
const
CLID
&
id
,
const
std::string
& key,
82
const
std::string
& store)
const
;
83
virtual
int
getDataHistory
(
const
CLID
&
id
,
const
std::string
& key,
84
const
std::string
& storeName,
85
std::list<DataHistory*>
& dhlist)
const
;
86
87
HistorySvc
(
const
std::string
&
name
,
ISvcLocator
* svc );
88
89
virtual
void
handle
(
const
Incident
& inc);
90
91
// Destructor.
92
virtual
~HistorySvc
();
93
94
private
:
95
96
// typedef std::map<const CLID, std::map<const std::string, DataHistory*> >
97
// DataHistMap;
98
99
typedef
IVersHistoryObj::PropertyList
PropertyList
;
100
101
typedef
std::multimap<DHH,DataHistory*>
DataHistMap
;
102
typedef
DataHistMap::iterator
DHMitr
;
103
typedef
DataHistMap::const_iterator
DHMCitr
;
104
105
void
clearState
();
106
107
// Allow SvcFactory to instantiate the service.
108
friend
class
SvcFactory
<
HistorySvc
>;
109
110
bool
m_isInitialized
;
111
bool
m_dump
;
112
bool
m_activate
;
113
114
IAlgContextSvc
*
p_algCtxSvc
;
115
116
std::set<const Algorithm*>
m_algs
;
117
std::map<const Algorithm*, AlgorithmHistory*>
m_algmap
;
118
119
std::set<const IAlgTool*>
m_ialgtools
;
120
std::set<const AlgTool*>
m_algtools
;
121
std::map<const AlgTool*, AlgToolHistory*>
m_algtoolmap
;
122
123
std::set<const IService*>
m_svcs
;
124
std::map<const IService*, ServiceHistory*>
m_svcmap
;
125
126
std::multimap<DHH, DataHistory*>
m_datMap
;
127
128
// std::set<DataHistory*, DataHistory::DataHistoryOrder> m_datMap;
129
130
JobHistory
*
m_jobHistory
;
131
132
std::string
m_outputFile
;
133
134
void
dumpProperties
(
std::ofstream
&)
const
;
135
void
dumpProperties
(
const
IService
&,
std::ofstream
&)
const
;
136
void
dumpProperties
(
const
Algorithm
&,
std::ofstream
&)
const
;
137
void
dumpProperties
(
const
IAlgTool
&,
std::ofstream
&)
const
;
138
139
void
dumpState
(
std::ofstream
&)
const
;
140
void
dumpState
(
const
INamedInterface
*,
std::ofstream
&)
const
;
141
142
std::string
dumpProp
(
const
Property
*,
const
bool
isXML=
false
,
143
int
indent=0)
const
;
144
145
IAlgorithm
*
getCurrentIAlg
()
const
;
146
147
IIncidentSvc
*
m_incidentSvc
;
148
SmartIF<IToolSvc>
m_toolSvc
;
149
150
mutable
MsgStream
m_log
;
151
bool
m_outputFileTypeXML
;
152
153
};
154
155
#endif
Generated at Wed Nov 28 2012 12:17:16 for Gaudi Framework, version v23r5 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004