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