BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/CalibTreeCnv/CalibTreeCnv/CalibTreeCnvSvc.h
Go to the documentation of this file.
1#ifndef CalibTreeCnvSvc_h
2#define CalibTreeCnvSvc_h
3
4#include <string>
5
6#include "CalibDataSvc/ICalibTreeSvc.h"
7#include "GaudiKernel/ConversionSvc.h"
8
9//The function of the CalibTreeCnvSvc is to read the trees' buffers from
10//CalibMYSQLCnvSvc and use the defined converters to intepret the buffers
11//than register the calibdata to TCDS.
12//It's a different way from the CalibRootCnv
13
14/// Forward and external declarations
15template <class TYPE> class SvcFactory;
16
17class IDetDataSvc;
18class IOpaqueAddress;
19
20namespace CalibData {
21 class CalibBase;
22 class CalibBase1;
23}
24
25///---------------------------------------------------------------------------
26/** @class CalibTreeCnvSvc
27
28 A conversion service for GLAST calibration bulk data in ROOT format.
29
30 @author J. Bogart
31 @date July 2004
32*///--------------------------------------------------------------------------
33
34class CalibTreeCnvSvc : public ConversionSvc, virtual public ICalibTreeSvc
35{
36 /// Only factories can access protected constructors
37 friend class SvcFactory<CalibTreeCnvSvc>;
38
39 protected:
40
41 CalibTreeCnvSvc(const std::string& name, ISvcLocator* svc );
42 virtual ~CalibTreeCnvSvc() {}
43
44 public:
45
46 // Reimplemented from IInterface
47
48 virtual StatusCode queryInterface( const InterfaceID& riid,
49 void** ppvInterface);
50
51 // Reimplemented from ICalibTreeSvc
52 /*virtual StatusCode writeToRoot(const std::string& outputFile,
53 const std::string& tdsPath);
54 virtual StatusCode writeToRoot(const std::string& outputFile,
55 CalibData::CalibBase1 *calib);
56*/
57
58 virtual StatusCode updateObj ( IOpaqueAddress* pAddress,
59 DataObject* pObject );
60
61 public:
62
63 // Overloaded from ConversionSvc
64
65 virtual StatusCode initialize();
66 virtual StatusCode finalize();
67
68 /**
69 * Create a ROOT address using explicit arguments to identify a single object
70 * @param svc_type the service type
71 * @param CLID the CLID of the ROOT Element for which an address is created
72 * @param par an array of three strings containing the format version,
73 * calibration type name and the flavor, in this order
74 * @param ip has a single element, the serial number of the MySQL row
75 * which corresponds to this element
76 * @param refpAddress the new address created
77 * @return a StatusCode giving the status of the address creation
78 */
79 // virtual StatusCode createAddress(unsigned char svc_type,
80 virtual StatusCode createAddress(long svc_type,
81 const CLID& clid,
82 const std::string* par,
83 const unsigned long* ip,
84 IOpaqueAddress*& refpAddress);
85 std::string getrootfile()
86 { return m_rootfile[0];}
87
88 /*
89 There are a pile of functions implemented in the Gaudi
90 base class ConversionSvc which we can just let be, such
91 as createObj, fillObjRefs,...
92
93 The base implementation looks up the appropriate converter
94 and invokes it, usually just what we want to do.
95 */
96 private:
97
98 // With current functionality, there really is no need to keep
99 // this as a member. It's only used during initialize()
100 /// Handle to the IConversionSvc interface of the DetectorPersistencySvc
101 IConversionSvc* m_detPersSvc;
102
103 /// Handle to IDataProviderSvc interface of CalibDataSvc
104 IDataProviderSvc* m_detDataSvc;
105 std::string m_rootfile[4];
106};
107#endif
virtual StatusCode initialize()
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *pObject)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
CalibTreeCnvSvc(const std::string &name, ISvcLocator *svc)
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
virtual StatusCode finalize()