BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibRootCnvSvc.h
Go to the documentation of this file.
1//$Header: /bes/bes/BossCvs/Calibration/CalibSvc/CalibROOTCnv/CalibROOTCnv/CalibRootCnvSvc.h,v 1.19 2022/03/04 03:49:16 maqm Exp $
2#ifndef CalibRootCnvSvc_h
3//#define CalibRootCnvSvc_h 1
4#define CalibRootCnvSvc_h
5
6#include <string>
7
9#include "GaudiKernel/ConversionSvc.h"
10
11
12// Hi Heather. For the XML conversion service I defined an
13// extra interface to do generic XML things that converters
14// might need. For now there really is just one thing there:
15// a function which reads in the XML file, so that the converters
16// deal with the DOM representation (in-memory, but otherwise
17// isomorphic to the XML description) rather than with the physical
18// file. Putting that kind of functionality in the conversion service
19// is probably a good idea, but it doesn't have to be defined in
20// an abstract interface.
21
22/// Forward and external declarations
23template <class TYPE> class SvcFactory;
24
25class IDetDataSvc;
26class IOpaqueAddress;
27
28namespace CalibData {
29 class CalibBase;
30 class CalibBase1;
31}
32
33///---------------------------------------------------------------------------
34/** @class CalibRootCnvSvc
35
36 A conversion service for GLAST calibration bulk data in ROOT format.
37
38 @author J. Bogart
39 @date July 2004
40 *///--------------------------------------------------------------------------
41class CalibRootCnvSvc : public ConversionSvc, virtual public ICalibRootSvc
42{
43 /// Only factories can access protected constructors
44 //friend class SvcFactory<CalibRootCnvSvc>;
45
46 public:
47
48 CalibRootCnvSvc(const std::string& name, ISvcLocator* svc );
49 virtual ~CalibRootCnvSvc() {}
50
51 public:
52
53 // Reimplemented from IInterface
54
55 /*virtual StatusCode queryInterface( const InterfaceID& riid,
56 void** ppvInterface);
57 */
58 // Reimplemented from ICalibRootSvc
59 virtual StatusCode writeToRoot(const std::string& outputFile,
60 const std::string& tdsPath);
61 virtual StatusCode writeToRoot(const std::string& outputFile,
63 virtual StatusCode updateObj ( IOpaqueAddress* pAddress,
64 DataObject* pObject );
65
66 public:
67
68 // Overloaded from ConversionSvc
69
70 virtual StatusCode initialize();
71 virtual StatusCode finalize();
72
73 /**
74 * Create a ROOT address using explicit arguments to identify a single object
75 * @param svc_type the service type
76 * @param CLID the CLID of the ROOT Element for which an address is created
77 * @param par an array of three strings containing the format version,
78 * calibration type name and the flavor, in this order
79 * @param ip has a single element, the serial number of the MySQL row
80 * which corresponds to this element
81 * @param refpAddress the new address created
82 * @return a StatusCode giving the status of the address creation
83 */
84 // virtual StatusCode createAddress(unsigned char svc_type,
85 virtual StatusCode createAddress(long svc_type,
86 const CLID& clid,
87 const std::string* par,
88 const unsigned long* ip,
89 IOpaqueAddress*& refpAddress);
90 std::string getrootfile()
91 { return m_rootfile[0];}
92 StatusCode decodeDescription(const std::string& oldpath,
93 std::string& realpath );
94
95
96 /*
97 There are a pile of functions implemented in the Gaudi
98 base class ConversionSvc which we can just let be, such
99 as createObj, fillObjRefs,...
100
101 The base implementation looks up the appropriate converter
102 and invokes it, usually just what we want to do.
103 */
104 private:
105
106 // With current functionality, there really is no need to keep
107 // this as a member. It's only used during initialize()
108 /// Handle to the IConversionSvc interface of the DetectorPersistencySvc
109 IConversionSvc* m_detPersSvc;
110
111 /// Handle to IDataProviderSvc interface of CalibDataSvc
112 IDataProviderSvc* m_detDataSvc;
113 std::string m_rootfile[14];
114};
115#endif
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *pObject)
virtual ~CalibRootCnvSvc()
virtual StatusCode finalize()
std::string getrootfile()
virtual StatusCode initialize()
StatusCode decodeDescription(const std::string &oldpath, std::string &realpath)
virtual StatusCode writeToRoot(const std::string &outputFile, const std::string &tdsPath)
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
CalibRootCnvSvc(const std::string &name, ISvcLocator *svc)
Only factories can access protected constructors.
Forward and external declarations.