BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibXmlCnvSvc.h
Go to the documentation of this file.
1//$Header: /bes/bes/BossCvs/Calibration/CalibSvc/CalibXmlCnvSvc/CalibXmlCnvSvc/CalibXmlCnvSvc.h,v 1.5 2022/02/21 07:16:40 maqm Exp $
2#ifndef CalibXmlCnvSvc_h
3#define CalibXmlCnvSvc_h 1
4
5#include <string>
6
7#include "CalibDataSvc/ICalibMetaCnvSvc.h" // not sure if this is needed
8#include "GaudiKernel/ConversionSvc.h"
10
11#include <xercesc/dom/DOMDocument.hpp>
12
13/// Forward and external declarations
14template <class TYPE> class SvcFactory;
15
16class IDetDataSvc;
17class IOpaqueAddress;
18namespace xmlBase {
19 class XmlParser;
20}
21
22///---------------------------------------------------------------------------
23/** @class CalibXmlCnvSvc
24
25 A conversion service for GLAST calibration bulk data in Xml format.
26
27 @author J. Bogart
28 @date November 2002
29*///--------------------------------------------------------------------------
30
31class CalibXmlCnvSvc : public ConversionSvc, virtual public ICalibXmlSvc
32{
33 /// Only factories can access protected constructors
34 friend class SvcFactory<CalibXmlCnvSvc>;
35
36 protected:
37
38 CalibXmlCnvSvc(const std::string& name, ISvcLocator* svc );
39 virtual ~CalibXmlCnvSvc() {}
40
41 public:
42
43 // Reimplemented from IInterface
44
45 //virtual StatusCode queryInterface( const InterfaceID& riid,
46 // void** ppvInterface);
47
48 public:
49
50 // Overloaded from ConversionSvc
51
52 virtual StatusCode initialize();
53 virtual StatusCode finalize();
54
55 /**
56 * Create an XML address using explicit arguments to identify a single object
57 * @param svc_type the service type
58 * @param CLID the CLID of the XML Element for which an address is created
59 * @param par an array of three strings containing the format version,
60 * calibration type name and the flavor, in this order
61 * @param ip has a single element, the serial number of the MySQL row
62 * which corresponds to this element
63 * @param refpAddress the new address created
64 * @return a StatusCode giving the status of the address creation
65 */
66 virtual StatusCode createAddress(unsigned char svc_type,
67 const CLID& clid,
68 const std::string* par,
69 const unsigned long* ip,
70 IOpaqueAddress*& refpAddress);
71
72 // from ICalibXmlSvc interface
73 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument*
74 parse(const char* filename);
75
76
77 /*
78 probably don't need to override these
79 /// Create a transient representation from another rep of this object.
80 virtual StatusCode createObj ( IOpaqueAddress* pAddress,
81 DataObject*& refpObject );
82
83 /// Resolve the references of the created transient object.
84 virtual StatusCode fillObjRefs ( IOpaqueAddress* pAddress,
85 DataObject* pObject );
86
87 /// Update a transient representation from another rep of this object.
88 virtual StatusCode updateObj ( IOpaqueAddress* pAddress,
89 DataObject* pObject );
90
91 /// Update the references of an updated transient object.
92 virtual StatusCode updateObjRefs ( IOpaqueAddress* pAddress,
93 DataObject* pObject );
94
95 /// Convert a transient object to a requested representation.
96 virtual StatusCode createRep ( DataObject* pObject,
97 IOpaqueAddress*& refpAddress );
98
99 /// Resolve the references of a converted object.
100 virtual StatusCode fillRepRefs ( IOpaqueAddress* pAddress,
101 DataObject* pObject );
102
103 /// Update a converted representation of a transient object.
104 virtual StatusCode updateRep ( IOpaqueAddress* pAddress,
105 DataObject* pObject );
106
107 /// Update the references of an already converted object.
108 virtual StatusCode updateRepRefs ( IOpaqueAddress* pAddress,
109 DataObject* pObject );
110 */
111
112
113
114 public:
115
116 // Probably don't need this. meta conversion service should
117 // already have fetched and stored everything we need.
118 // calibUtil::Metadata* getMeta();
119
120 private:
121
122 //Probably don't need this
123 // /// Handle for metadata access
124 // calibUtil::Metadata* m_meta;
125
126 // Not sure we need this
127 /// Handle to the IConversionSvc interface of the DetectorPersistencySvc
128 IConversionSvc* m_detPersSvc;
129
130 // Not sure we need this
131 /// Handle to the IDetDataSvc interface of the CalibDataSvc
132 IDetDataSvc* m_detDataSvc;
133
134 xmlBase::XmlParser* m_parser;
135};
136#endif
137
138
139
140
141
142
143
144
virtual StatusCode createAddress(unsigned char svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
virtual ~CalibXmlCnvSvc()
virtual StatusCode initialize()
virtual StatusCode finalize()
virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * parse(const char *filename)
Forward and external declarations.
Definition: CalibDataSvc.h:35