BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/RawDataCnvBase/RawDataCnvBase/RawDataCnvSvc.h
Go to the documentation of this file.
1#ifndef RawDataCnvSvc_H
2#define RawDataCnvSvc_H
3
4#include <map>
5#include "GaudiKernel/ConversionSvc.h"
6#include "RawDataCnvBase/IRawDataCnvSvc.h"
7
8template <class TYPE> class SvcFactory;
9
10class IOpaqueAddress;
11
12/**class RawDataCnvSvc
13 * Conversion Service which coordinates all of converters.
14 *
15 * When a component requests an item not yet available on the TDS,
16 * the RawDataCnvSvc is called to find the appropriate converter to gain
17 * access to the data and put it on the TDS.
18 *
19 * Based on GLAST's EfbCnvSvc
20 *
21 */
22
23class RawDataCnvSvc : public ConversionSvc, virtual public IRawDataCnvSvc {
24
25 friend class SvcFactory<RawDataCnvSvc>;
26
27 /// Map with leaf entries containing TDS paths
28 typedef std::map<std::string, Leaf*> LeafMap;
29 LeafMap m_leaves;
30
31public:
32
33 virtual StatusCode initialize();
34
35 virtual StatusCode finalize();
36
37 /// Associates a path on TDS with a particular converter
38 virtual StatusCode declareObject(const IRawDataCnvSvc::Leaf& leaf);
39
40 /// Override inherited queryInterface due to enhanced interface
41 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
42
43 // Address creation.
44 virtual StatusCode createAddress( long svc_type,
45 const CLID& clid,
46 const std::string* par,
47 const unsigned long* ip,
48 IOpaqueAddress*& refpAddress);
49 virtual StatusCode createAddress(long storageType,
50 const CLID& clid,
51 const std::string&,
52 IOpaqueAddress*& refpAddress);
53
54protected:
55 virtual StatusCode addConverters () = 0;
56
57 StatusCode updateServiceState(IOpaqueAddress* pAddress);
58
59 RawDataCnvSvc(const std::string& name, ISvcLocator* svc, long storageTyp);
60
61 virtual ~RawDataCnvSvc() { };
62};
63
64
65#endif // RawDataCnvSvc_H
66
virtual StatusCode createAddress(long storageType, const CLID &clid, const std::string &, IOpaqueAddress *&refpAddress)
StatusCode updateServiceState(IOpaqueAddress *pAddress)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Override inherited queryInterface due to enhanced interface.
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
virtual StatusCode declareObject(const IRawDataCnvSvc::Leaf &leaf)
Associates a path on TDS with a particular converter.
virtual StatusCode finalize()
virtual StatusCode addConverters()=0
virtual StatusCode initialize()
RawDataCnvSvc(const std::string &name, ISvcLocator *svc, long storageTyp)