BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
XmlTest1Cnv Class Reference

#include <XmlTest1Cnv.h>

+ Inheritance diagram for XmlTest1Cnv:

Public Member Functions

const CLID & objType () const
 
- Public Member Functions inherited from XmlBaseCnv
virtual ~XmlBaseCnv ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 
ICalibXmlSvcgetCalibXmlSvc ()
 
 XmlBaseCnv (ISvcLocator *svc, const CLID &clid)
 
- Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
 

Static Public Member Functions

static const CLID & classID ()
 
- Static Public Member Functions inherited from XmlBaseCnv
static const unsigned char storageType ()
 

Protected Member Functions

 XmlTest1Cnv (ISvcLocator *svcs)
 
virtual ~XmlTest1Cnv ()
 
virtual StatusCode i_createObj (const DOMElement *element, DataObject *&refpObject)
 
- Protected Member Functions inherited from XmlBaseCnv
virtual StatusCode internalCreateObj (const DOMElement *element, DataObject *&refpObject, IOpaqueAddress *address)
 
virtual StatusCode i_processObj (DataObject *pObject, IOpaqueAddress *address)
 In case there is additional work to do on the created object.
 
virtual StatusCode readHeader (const DOMElement *)
 
DOMElement * findFirstRange (const DOMElement *docElt)
 
DOMElement * findNextRange (const DOMElement *rangeElt)
 Still another one to navigate XML file and find next set of range data.
 
DOMElement * findFirstDacCol (const DOMElement *docElt)
 Another one to find first dac collection element.
 
DOMElement * findNextDacCol (const DOMElement *rangeElt)
 Still another one to navigate XML file and find next dac collection.
 
CalibData::DacColprocessDacCol (DOMElement *dacColElt, unsigned *range)
 
CalibData::ValSigprocessValSig (DOMElement *elt, std::string valName, std::string sigName)
 Read in what will become a CalibData::ValSig.
 
std::vector< CalibData::ValSig > * processValSigs (DOMElement *elt, std::string valName, std::string sigName)
 Read in what will become a vector of CalibData::ValSig.
 
void setBaseInfo (CalibData::CalibBase *pObj)
 Another utility for derived classes to use.
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 

Friends

class CnvFactory< XmlTest1Cnv >
 Friend needed for instantiation.
 

Additional Inherited Members

- Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
 
typedef Ty2 destination
 
- Protected Attributes inherited from XmlBaseCnv
ICalibXmlSvcm_xmlSvc
 
ICalibMetaCnvSvcm_metaSvc
 
int m_serNo
 
ITime * m_vstart
 
ITime * m_vend
 

Detailed Description

Definition at line 16 of file XmlTest1Cnv.h.

Constructor & Destructor Documentation

◆ XmlTest1Cnv()

XmlTest1Cnv::XmlTest1Cnv ( ISvcLocator * svcs)
protected

Definition at line 29 of file XmlTest1Cnv.cxx.

29 :
31}
const CLID CLID_Calib_CalibTest1
Definition CalibModel.h:35
XmlBaseCnv(ISvcLocator *svc, const CLID &clid)

◆ ~XmlTest1Cnv()

virtual XmlTest1Cnv::~XmlTest1Cnv ( )
inlineprotectedvirtual

Definition at line 27 of file XmlTest1Cnv.h.

27{} // most likely nothing to do

Member Function Documentation

◆ classID()

const CLID & XmlTest1Cnv::classID ( )
static

Definition at line 38 of file XmlTest1Cnv.cxx.

38 {
40}

◆ i_createObj()

StatusCode XmlTest1Cnv::i_createObj ( const DOMElement * element,
DataObject *& refpObject )
protectedvirtual

This creates the transient representation of an object from the DOM_Element representing it. This actually does the "new" operation and deals with the attributes of the node. This base class implementation does nothing; it should not normally be called because it doesn't correspond to any TCDS class. Instead, i_createObj of some derived class will be called.

Parameters
elementthe DOM_Element (typically root element of document) to be used to builds the object
refpObjectthe object to be built
Returns
status depending on the completion of the call

Reimplemented from XmlBaseCnv.

Definition at line 52 of file XmlTest1Cnv.cxx.

54{
55 using xmlBase::Dom;
56
57 // Fetch quantities we need: name, value
58 DOMElement* child = Dom::findFirstChildByName(element, "data");
59 if (child == 0) return StatusCode::FAILURE;
60 child = Dom::findFirstChildByName(child, "leaf");
61 if (child == 0) return StatusCode::FAILURE;
62
63 std::string name = Dom::getAttribute(child, "name");
64
65 // std::string valueString = Dom::getAttribute(child, "value");
66
67 // int value = atoi(valueString.c_str());
68 int value;
69 try {
70 value = Dom::getIntAttribute(child, "value");
71 }
72 catch (xmlBase::DomException ex) {
73 std::cerr << "From CalibSvc::XmlTest1Cnv::i_crateObj " << std::endl;
74 std::cerr << ex.getMsg() << std::endl;
75 }
76
77 refpObject = new
78 CalibData::CalibTest1(name, value, *m_vstart, *m_vend, m_serNo);
79
80 return StatusCode::SUCCESS;
81}
ITime * m_vend
Definition XmlBaseCnv.h:152
ITime * m_vstart
Definition XmlBaseCnv.h:151
Base exception class for Dom.
Definition Dom.h:29
virtual std::string getMsg()
Definition Dom.h:34

◆ objType()

const CLID & XmlTest1Cnv::objType ( ) const

Definition at line 34 of file XmlTest1Cnv.cxx.

34 {
36}

Friends And Related Symbol Documentation

◆ CnvFactory< XmlTest1Cnv >

friend class CnvFactory< XmlTest1Cnv >
friend

Friend needed for instantiation.

Definition at line 1 of file XmlTest1Cnv.h.


The documentation for this class was generated from the following files: