Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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"
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 
100 
104 
105  void clearState();
106 
107  // Allow SvcFactory to instantiate the service.
108  friend class SvcFactory<HistorySvc>;
109 
111  bool m_dump;
113 
115 
118 
122 
125 
127 
128 // std::set<DataHistory*, DataHistory::DataHistoryOrder> m_datMap;
129 
131 
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 
149 
150  mutable MsgStream m_log;
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