BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibTreeCnvSvc.h
Go to the documentation of this file.
1#ifndef CalibTreeCnvSvc_h
2#define CalibTreeCnvSvc_h
3
4#include <string>
5
7#include "GaudiKernel/ConversionSvc.h"
8#include "GaudiKernel/Service.h"
9
10//The function of the CalibTreeCnvSvc is to read the trees' buffers from
11//CalibMYSQLCnvSvc and use the defined converters to intepret the buffers
12//than register the calibdata to TCDS.
13//It's a different way from the CalibRootCnv
14
15/// Forward and external declarations
16template <class TYPE> class SvcFactory;
17
18class IDetDataSvc;
19class IOpaqueAddress;
20
21namespace CalibData {
22 class CalibBase;
23 class CalibBase1;
24}
25
26///---------------------------------------------------------------------------
27/** @class CalibTreeCnvSvc
28
29 A conversion service for GLAST calibration bulk data in ROOT format.
30
31 @author J. Bogart
32 @date July 2004
33*///--------------------------------------------------------------------------
34
35class CalibTreeCnvSvc : public ConversionSvc, virtual public ICalibTreeSvc
36{
37 /// Only factories can access protected constructors
38 friend class SvcFactory<CalibTreeCnvSvc>;
39
40public:
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
std::string getrootfile()
virtual StatusCode finalize()
virtual StatusCode initialize()
CalibTreeCnvSvc(const std::string &name, ISvcLocator *svc)
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *pObject)
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
virtual ~CalibTreeCnvSvc()
Forward and external declarations.