| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 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
RootCnvSvc.h
Go to the documentation of this file.
1 // $Id: RootCnvSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
2 //====================================================================
3 // RootCnvSvc definition
4 //--------------------------------------------------------------------
5 //
6 // Author : M.Frank
7 //====================================================================
8 #ifndef GAUDIROOTCNV_GAUDIROOTCNVSVC_H
9 #define GAUDIROOTCNV_GAUDIROOTCNVSVC_H
10 // $Header: /afs/cern.ch/project/cvs/reps/lhcb/Online/RootCnv/src/RootCnvSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
11
12 // Framework include files
13 #include "GaudiKernel/ConversionSvc.h"
14 #include "GaudiKernel/DataObject.h"
15 #include "GaudiKernel/ClassID.h"
16
17 // C++ include files
18 #include <set>
19
20 // Forward declarations
21 class IDataManagerSvc;
22 class IIncidentSvc;
23 class TClass;
24
25 // ROOT include files
26 #include "TROOT.h"
27 #include "TClass.h"
28 #include "TTree.h"
29 #include "TBranch.h"
30
31 //#include "RootCnv/RootPerfMonSvc.h"
32
33 /*
34 * Gaudi namespace declaration
35 */
36 namespace Gaudi {
37
38 // Forward declarations
39 class IIODataManager;
40 class IDataConnection;
41 class RootDataConnection;
42 class RootConnectionSetup;
43
54 class GAUDI_API RootCnvSvc : public ConversionSvc {
55 protected:
56
58 Gaudi::IIODataManager* m_ioMgr;
60 IIncidentSvc* m_incidentSvc;
62 Gaudi::RootDataConnection* m_current;
64 TClass* m_classRefs;
66 TClass* m_classDO;
68 RootConnectionSetup* m_setup;
70 std::string m_currSection;
71
73 bool m_incidentEnabled;
75 std::string m_shareFiles;
77 std::string m_recordName;
79 std::string m_ioPerfStats;
81 std::string m_compression;
82
84 int m_autoFlush;
86 int m_basketSize;
88 int m_bufferSize;
90 int m_splitLevel;
91
93 std::set<std::string> m_badFiles;
94
96 MsgStream* m_log;
97
99 TClass* getClass(DataObject* pObject);
101 MsgStream& log() const { return *m_log; }
102
103 public:
104
106 RootCnvSvc(const std::string& name, ISvcLocator* svc);
107
109 virtual ~RootCnvSvc();
110
112 virtual StatusCode updateServiceState(IOpaqueAddress* /* pAddress */)
113 { return StatusCode::SUCCESS; }
114
120 StatusCode error(const std::string& msg);
121
128 StatusCode connectDatabase(const std::string& dataset, int mode, RootDataConnection** con);
129
131 virtual StatusCode initialize();
132
134 virtual StatusCode finalize();
135
137 virtual IConverter* createConverter(long typ,
138 const CLID& wanted,
139 const ICnvFactory* fac);
140
142 virtual void loadConverter(DataObject* pObj);
143
150 virtual StatusCode connectOutput(const std::string& outputFile,
151 const std::string& openMode);
152
158 virtual StatusCode connectOutput(const std::string& outputFile);
159
170 virtual StatusCode commitOutput(const std::string& outputFile,
171 bool do_commit);
172
178 virtual StatusCode disconnect(const std::string& dbName);
179
191 virtual StatusCode createAddress( long svc_type,
192 const CLID& clid,
193 const std::string* par,
194 const unsigned long* ip,
195 IOpaqueAddress*& refpAddress);
196
206 virtual StatusCode createAddress( long svc_type,
207 const CLID& clid,
208 const std::string& refAddress,
209 IOpaqueAddress*& refpAddress) {
210 return this->ConversionSvc::createAddress(svc_type,clid,refAddress,refpAddress);
211 }
212
219 virtual StatusCode createNullRep(const std::string& path);
220
227 virtual StatusCode createNullRef(const std::string& path);
228
236 virtual StatusCode i__createRep(DataObject* pObj, IOpaqueAddress*& refpAddr);
237
238
246 virtual StatusCode i__fillRepRefs(IOpaqueAddress* pAddr,DataObject* pObj);
247
255 virtual StatusCode i__createObj(IOpaqueAddress* pAddr, DataObject*& refpObj);
256
264 virtual StatusCode i__fillObjRefs(IOpaqueAddress* pAddr, DataObject* pObj);
265 };
266 }
267
268 #endif // GAUDIROOTCNV_GAUDIROOTCNVSVC_H