/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/CalibSvc/CalibXmlCnvSvc/CalibXmlCnvSvc-00-01-01/src/cnv/XmlBaseCnv.h

Go to the documentation of this file.
00001 // $Header: /bes/bes/BossCvs/Calibration/CalibSvc/CalibXmlCnvSvc/src/cnv/XmlBaseCnv.h,v 1.1.1.1 2006/04/03 03:04:32 maqm Exp $
00002 #ifndef CalibData_XmlBaseCnv_h
00003 #define CalibData_XmlBaseCnv_h
00004 
00013 #include <string>
00014 #include <vector>
00015 #include "GaudiKernel/Converter.h"
00016 #include "GaudiKernel/CnvFactory.h"
00017 #include <xercesc/dom/DOMElement.hpp>
00018 
00019 class ISvcLocator;
00020 class GenericAddress;
00021 class ICalibXmlSvc;
00022 class ICalibMetaCnvSvc;
00023 class ITime;
00024 
00025 namespace CalibData {
00026   class CalibTime;
00027   class CalibBase;
00028   class DacCol; // for now used only by calorimeter intNonLin calibration
00029   class Xpos;   // only of interest for some calorimeter calibrations
00030   class ValSig;
00031 }
00032 
00033 using XERCES_CPP_NAMESPACE_QUALIFIER DOMElement;
00034 
00035 
00036 class  XmlBaseCnv : public Converter {
00037 
00038 public:
00039 
00040   virtual ~XmlBaseCnv();
00041 
00042   virtual StatusCode initialize();
00043 
00044   virtual StatusCode finalize();
00045 
00051   virtual StatusCode createObj(IOpaqueAddress* addr,
00052                                DataObject*& refpObject);
00053 
00054   ICalibXmlSvc* getCalibXmlSvc() {
00055     return m_xmlSvc;
00056   }
00057 
00058   static const unsigned char storageType();
00059 
00065   //  XmlBaseCnv(ISvcLocator* svc, const CLID& clid = 0);
00066   XmlBaseCnv(ISvcLocator* svc, const CLID& clid);
00067 
00068 protected:
00082   virtual StatusCode internalCreateObj (const DOMElement* element,
00083                                         DataObject*& refpObject,
00084                                         IOpaqueAddress* address);
00085   
00097   virtual StatusCode i_createObj (const DOMElement* element,
00098                                   DataObject*& refpObject);
00099 
00101   virtual StatusCode i_processObj(DataObject* pObject,
00102                                   IOpaqueAddress* address);
00103 
00104   // Might want to verify that instrument, calType are correct,
00105   // for example.  If so, might as well provide the service in
00106   // the base converter.
00107   virtual StatusCode readHeader(const DOMElement*);
00108 
00109 
00112   DOMElement* findFirstRange(const DOMElement* docElt) {
00113     return 0;}
00114 
00115 
00117   DOMElement* findNextRange(const DOMElement* rangeElt) {
00118     return 0;}
00119 
00121   DOMElement* findFirstDacCol(const DOMElement* docElt);
00122 
00124   DOMElement* findNextDacCol(const DOMElement* rangeElt);
00125 
00126   CalibData::DacCol* processDacCol(DOMElement* dacColElt, unsigned* range);
00127 
00128   // maqm comment
00129    //DOMElement* findXpos(const DOMElement* docElt);
00130 
00131   // maqm comment CalibData::Xpos* processXpos(DOMElement* xposElt);
00132 
00134   CalibData::ValSig* processValSig(DOMElement* elt, 
00135                                    std::string valName, std::string sigName);
00136 
00138   std::vector<CalibData::ValSig>*  processValSigs(DOMElement* elt, 
00139                                                   std::string valName, 
00140                                                   std::string sigName);
00141 
00145   void setBaseInfo(CalibData::CalibBase* pObj);
00146 
00147   ICalibXmlSvc* m_xmlSvc;
00148   ICalibMetaCnvSvc* m_metaSvc;
00149 
00150   int m_serNo;
00151   ITime*  m_vstart;
00152   ITime*  m_vend;
00153 
00154 
00155 };
00156 
00157 #endif

Generated on Tue Nov 29 22:57:54 2016 for BOSS_7.0.2 by  doxygen 1.4.7