| # 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
DataSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_DATASVC_H
2 #define GAUDIKERNEL_DATASVC_H
3
4 // Include files
5 #include "GaudiKernel/Service.h"
6 #include "GaudiKernel/DataStoreItem.h"
7 #include "GaudiKernel/IDataManagerSvc.h"
8 #include "GaudiKernel/IDataProviderSvc.h"
9
10 // Forward declarations
11 // Incident service
12 class IIncidentSvc;
13 // Generic address
14 class IOpaqueAddress;
15 // Generic interface to data object class
16 class DataObject;
17 // Data store agent
18 class IDataStoreAgent;
19
20 // Do not clutter global namespace for helpers...
21 namespace DataSvcHelpers {
22 // Map of objects where loading is inhibited
23 class InhibitMap;
24 // Generic registry entry
25 class RegistryEntry;
26 }
27
28
39 class GAUDI_API DataSvc: public extends2<Service, IDataProviderSvc, IDataManagerSvc>
40 {
41 public:
43 typedef std::vector<DataStoreItem> LoadItems;
44
45 protected:
47 CLID m_rootCLID;
49 std::string m_rootName;
51 IConversionSvc* m_dataLoader;
53 IIncidentSvc* m_incidentSvc;
55 LoadItems m_preLoads;
57 bool m_forceLeaves;
59 bool m_enableAccessHdlr;
61 bool m_enableFaultHdlr;
63 DataSvcHelpers::RegistryEntry* m_root;
65 DataSvcHelpers::InhibitMap* m_inhibitMap;
67 std::vector<std::string> m_inhibitPathes;
69 std::string m_accessName;
71 std::string m_faultName;
72 public:
73
75 virtual CLID rootCLID() const;
76
78 virtual std::string rootName() const;
79
81 virtual StatusCode registerAddress( const std::string& fullPath,
82 IOpaqueAddress* pAddress);
83
85 virtual StatusCode registerAddress( DataObject* parentObj,
86 const std::string& objectPath,
87 IOpaqueAddress* pAddress);
88
90 virtual StatusCode registerAddress( IRegistry* parentObj,
91 const std::string& objectPath,
92 IOpaqueAddress* pAddress);
93
95 virtual StatusCode unregisterAddress(const std::string& fullPath);
96
98 virtual StatusCode unregisterAddress( DataObject* pParent,
99 const std::string& objPath);
100
102 virtual StatusCode unregisterAddress( IRegistry* pParent,
103 const std::string& objPath);
104
108 virtual StatusCode objectLeaves( const DataObject* pObject,
109 std::vector<IRegistry*>& refLeaves);
113 virtual StatusCode objectLeaves( const IRegistry* pRegistry,
114 std::vector<IRegistry*>& refLeaves);
115
117 virtual StatusCode objectParent( const DataObject* pObject,
118 IRegistry*& refpParent);
120 virtual StatusCode objectParent( const IRegistry* pRegistry,
121 IRegistry*& refpParent);
122
126 virtual StatusCode clearSubTree( const std::string& sub_tree_path );
127
131 virtual StatusCode clearSubTree( DataObject* pObject );
132
134 virtual StatusCode clearStore();
135
139 virtual StatusCode traverseSubTree( const std::string& sub_tree_path,
140 IDataStoreAgent* pAgent );
141
143 virtual StatusCode traverseSubTree( DataObject* pObject,
144 IDataStoreAgent* pAgent );
145
147 virtual StatusCode traverseTree( IDataStoreAgent* pAgent );
148
151 virtual StatusCode setRoot( const std::string& root_name,
152 DataObject* pRootObj);
153
157 virtual StatusCode i_setRoot( const std::string& root_name,
158 DataObject* pRootObj);
159
162 virtual StatusCode setRoot (const std::string& root_path,
163 IOpaqueAddress* pRootAddr);
164
169 virtual StatusCode i_setRoot (const std::string& root_path,
170 IOpaqueAddress* pRootAddr);
171
175 virtual StatusCode setDataLoader( IConversionSvc* svc );
176
178 virtual StatusCode addPreLoadItem( const DataStoreItem& item );
179
181 virtual StatusCode addPreLoadItem( const std::string& itemPath );
182
184 virtual StatusCode removePreLoadItem( const DataStoreItem& item );
185
187 virtual StatusCode removePreLoadItem( const std::string& itemPath );
188
190 virtual StatusCode resetPreLoad();
191
199 virtual StatusCode preLoad( int depth,
200 int load_depth,
201 DataObject* pObject );
202
204 virtual StatusCode preLoad();
205
207 virtual StatusCode registerObject( const std::string& fullPath,
208 DataObject* pObject );
209
211 virtual StatusCode registerObject( const std::string& parentPath,
212 const std::string& objPath,
213 DataObject* pObject );
214
216 virtual StatusCode registerObject( const std::string& parentPath,
217 int item,
218 DataObject* pObject );
219
221 virtual StatusCode registerObject( DataObject* parentObj,
222 const std::string& objPath,
223 DataObject* pObject );
224
226 virtual StatusCode registerObject( DataObject* parentObj,
227 int item,
228 DataObject* pObject );
229
231 virtual StatusCode unregisterObject(const std::string& fullPath );
232
234 virtual StatusCode unregisterObject(const std::string& parentPath,
235 const std::string& objectPath );
236
238 virtual StatusCode unregisterObject(const std::string& parentPath,
239 int item );
240
242 virtual StatusCode unregisterObject(DataObject* pObject );
243
245 virtual StatusCode unregisterObject(DataObject* pObject,
246 const std::string& objectPath );
247
249 virtual StatusCode unregisterObject(DataObject* pObject,
250 int item );
251
253 virtual StatusCode retrieveObject( IRegistry* pDirectory,
254 const std::string& path,
255 DataObject*& pObject );
256
258 virtual StatusCode retrieveObject( const std::string& fullPath,
259 DataObject*& pObject );
260
262 virtual StatusCode retrieveObject( const std::string& parentPath,
263 const std::string& objPath,
264 DataObject*& pObject );
265
267 virtual StatusCode retrieveObject( const std::string& parentPath,
268 int item,
269 DataObject*& pObject );
270
272 virtual StatusCode retrieveObject( DataObject* parentObj,
273 const std::string& objPath,
274 DataObject*& pObject );
275
277 virtual StatusCode retrieveObject( DataObject* parentObj,
278 int item,
279 DataObject*& pObject );
280
282 virtual StatusCode findObject( const std::string& fullPath,
283 DataObject*& pObject );
284
286 virtual StatusCode findObject( IRegistry* pDirectory,
287 const std::string& path,
288 DataObject*& pObject );
289
291 virtual StatusCode findObject( const std::string& parentPath,
292 const std::string& objPath,
293 DataObject*& pObject );
294
296 virtual StatusCode findObject( const std::string& parentPath,
297 int item,
298 DataObject*& pObject );
299
301 virtual StatusCode findObject( DataObject* parentObj,
302 const std::string& objPath,
303 DataObject*& pObject );
304
306 virtual StatusCode findObject( DataObject* parentObj,
307 int item,
308 DataObject*& pObject );
309
311 virtual StatusCode linkObject( IRegistry* from,
312 const std::string& objPath,
313 DataObject* to );
314
316 virtual StatusCode linkObject( const std::string& fromPath,
317 const std::string& objPath,
318 DataObject* to );
319
321 virtual StatusCode linkObject( DataObject* from,
322 const std::string& objPath,
323 DataObject* to );
324
326 virtual StatusCode linkObject( const std::string& fullPath,
327 DataObject* to );
328
330 virtual StatusCode unlinkObject(IRegistry* from,
331 const std::string& objPath );
332
334 virtual StatusCode unlinkObject(const std::string& fromPath,
335 const std::string& objPath );
336
338 virtual StatusCode unlinkObject(DataObject* fromObj,
339 const std::string& objPath );
340
342 virtual StatusCode unlinkObject(const std::string& fullPath );
343
345 virtual StatusCode updateObject(IRegistry* pDirectory );
346
348 virtual StatusCode updateObject(const std::string& updatePath );
349
351 virtual StatusCode updateObject(DataObject* toUpdate );
352
354 virtual StatusCode updateObject(const std::string& parentPath,
355 const std::string& updatePath );
356
358 virtual StatusCode updateObject(DataObject* pParent,
359 const std::string& updatePath );
360
362 virtual StatusCode initialize();
363
365 virtual StatusCode reinitialize();
366
368 virtual StatusCode finalize();
369
371 DataSvc( const std::string& name, ISvcLocator* svc );
372
374 virtual ~DataSvc();
375
376 private:
378 DataSvc(const DataSvc&);
380 DataSvc& operator= (const DataSvc&);
381
382 protected:
384 bool checkRoot() {
385 return 0 != m_root;
386 }
387
391 virtual IConversionSvc* getDataLoader(IRegistry* pReg);
392
394 virtual DataObject* createDefaultObject() const;
395
399 virtual StatusCode loadObject( IRegistry* pNode );
400
404 virtual StatusCode loadObject( IConversionSvc* pLoader,
405 IRegistry* pNode );
406
408 StatusCode retrieveEntry( DataSvcHelpers::RegistryEntry* pNode,
409 const std::string& path,
410 DataSvcHelpers::RegistryEntry*& pEntry );
417 DataObject* handleDataFault(IRegistry* pReg, const std::string& path="");
418 };
419 #endif // GAUDIKERNEL_DATASVC_H
420