27 XercesDOMParser*
parser =
new XercesDOMParser;
28 parser->setValidationScheme( XercesDOMParser::Val_Never );
29 parser->setDoNamespaces(
false );
30 parser->setDoSchema(
false );
34 DOMDocument* xmlDoc = parser->getDocument();
36 std::cout <<
"EcalWeightSetXMLTranslator::Error parsing document" << std::endl;
40 DOMElement* elementRoot = xmlDoc->getDocumentElement();
51 DOMElement* rowelement;
56 rowelement =
dynamic_cast< xercesc::DOMElement*
>(rownode);
60 std::stringstream rowid_ss(rowid_s);
66 std::stringstream weightrow_s(weightrow);
69 while(weightrow_s >> weight)
77 rownode = rownode->getNextSibling();
79 while (rownode && rownode->getNodeType( ) != DOMNode::ELEMENT_NODE)
80 rownode = rownode->getNextSibling();
88 rowelement =
dynamic_cast< xercesc::DOMElement*
>(rownode);
92 std::stringstream rowid_ss(rowid_s);
98 std::stringstream weightrow_s(weightrow);
101 while(weightrow_s >> weight)
109 rownode = rownode->getNextSibling();
111 while (rownode && rownode->getNodeType( ) != DOMNode::ELEMENT_NODE)
112 rownode = rownode->getNextSibling();
123 rowelement =
dynamic_cast< xercesc::DOMElement*
>(rownode);
126 std::stringstream rowid_ss(rowid_s);
132 std::stringstream weightrow_s(weightrow);
135 while(weightrow_s >> weight)
143 rownode = rownode->getNextSibling();
145 while (rownode && rownode->getNodeType( ) != DOMNode::ELEMENT_NODE)
146 rownode = rownode->getNextSibling();
158 rowelement =
dynamic_cast< xercesc::DOMElement*
>(rownode);
161 std::stringstream rowid_ss(rowid_s);
167 std::stringstream weightrow_s(weightrow);
170 while(weightrow_s >> weight)
178 rownode = rownode->getNextSibling();
180 while (rownode && rownode->getNodeType( ) != DOMNode::ELEMENT_NODE)
181 rownode = rownode->getNextSibling();
EcalChi2WeightMatrix & getChi2WeightsBeforeGainSwitch()
const std::string id_tag("id")
const std::string row_tag("row")
const std::string wgtChi2AfterSwitch_tag("Chi2WeightAfterSwitch")
std::string toString(XMLCh const *toTranscode)
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
EcalChi2WeightMatrix & getChi2WeightsAfterGainSwitch()
ZStr< XMLCh > uStr(char const *str)
const std::string wgtBeforeSwitch_tag("WeightBeforeSwitch")
EcalWeightMatrix & getWeightsAfterGainSwitch()
EcalWeightMatrix & getWeightsBeforeGainSwitch()
const std::string wgtChi2BeforeSwitch_tag("Chi2WeightBeforeSwitch")
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
const std::string wgtAfterSwitch_tag("WeightAfterSwitch")