4 #include <xercesc/dom/DOMNode.hpp>
5 #include <xercesc/dom/DOM.hpp>
6 #include <xercesc/parsers/XercesDOMParser.hpp>
9 #include <xercesc/util/XMLString.hpp>
10 #include <xercesc/sax/SAXException.hpp>
11 #include <xercesc/framework/LocalFileFormatTarget.hpp>
29 std::cout <<
" TPGStripStatus should not be filled out from an xml file ..." << std::endl;
32 XercesDOMParser*
parser =
new XercesDOMParser;
33 parser->setValidationScheme(XercesDOMParser::Val_Never);
34 parser->setDoNamespaces(
false);
35 parser->setDoSchema(
false);
39 DOMDocument* xmlDoc =
parser->getDocument();
41 std::cout <<
"EcalTPGStripStatusXMLTranslator::Error parsing document" << std::endl;
45 DOMElement* elementRoot = xmlDoc->getDocumentElement();
68 unique_ptr<DOMImplementation>
impl(DOMImplementationRegistry::getDOMImplementation(
cms::xerces::uStr(
"LS").ptr()));
70 DOMLSSerializer*
writer =
impl->createLSSerializer();
71 if (
writer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
72 writer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
74 DOMDocumentType* doctype =
impl->createDocumentType(
cms::xerces::uStr(
"XML").ptr(),
nullptr,
nullptr);
76 DOMElement*
root =
doc->getDocumentElement();
83 std::cout <<
"EcalTPGStripStatusXMLTranslator::dumpXML strip map size " << stripMap.size() << std::endl;
85 for (itSt = stripMap.begin(); itSt != stripMap.end(); ++itSt) {
86 if (itSt->second > 0) {
87 int tccid = itSt->first / 8192 & 0x7F;
88 int tt = itSt->first / 64 & 0x7F;
89 int pseudostrip = itSt->first / 8 & 0x7;
101 value_s << pseudostrip;
103 root->appendChild(cell_node);