|
|
Go to the documentation of this file.
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>
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 <<
"EcalPulseShapesXMLTranslator::Error parsing document" << std::endl;
40 DOMElement* elementRoot = xmlDoc->getDocumentElement();
105 cellnode = cellnode->getNextSibling();
107 while (cellnode && cellnode->getNodeType() != DOMNode::ELEMENT_NODE)
108 cellnode = cellnode->getNextSibling();
114 std::cout <<
" nb of channels found in xml file " <<
chan << std::endl;
132 unique_ptr<DOMImplementation>
impl(DOMImplementationRegistry::getDOMImplementation(
cms::xerces::uStr(
"LS").ptr()));
134 DOMLSSerializer*
writer =
impl->createLSSerializer();
135 if (
writer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
136 writer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
138 DOMDocumentType* doctype =
impl->createDocumentType(
cms::xerces::uStr(
"XML").ptr(),
nullptr,
nullptr);
141 DOMElement*
root =
doc->getDocumentElement();
144 if (
record.barrelItems().empty())
151 if (!
record[rawid].pdfval[5])
170 if (
record.endcapItems().empty())
180 if (!
record[rawid].pdfval[5])
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
xercesc::DOMElement * writeCell(xercesc::DOMNode *node, const DetId &detid)
Append a Cell node with attributes to.
const std::string sample4_tag("sample_4")
const std::string sample1_tag("sample_1")
static EEDetId unhashIndex(int hi)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
static int readXML(const std::string &filename, EcalCondHeader &header, EcalPulseShapes &record)
std::string toString(XMLCh const *toTranscode)
const std::string sample6_tag("sample_6")
static int writeXML(const std::string &filename, const EcalCondHeader &header, const EcalPulseShapes &record)
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
static std::string dumpXML(const EcalCondHeader &header, const EcalPulseShapes &record)
const std::string sample7_tag("sample_7")
const std::string sample11_tag("sample_11")
const std::string sample0_tag("sample_0")
const std::string PulseShapes_tag("EcalPulseShapes")
static bool validHashIndex(int i)
const std::string sample3_tag("sample_3")
ZStr< XMLCh > uStr(char const *str)
const std::string sample9_tag("sample_9")
const std::string sample5_tag("sample_5")
const std::string sample2_tag("sample_2")
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
static const int TEMPLATESAMPLES
const DetId readCellId(xercesc::DOMElement *node)
Assuming.
static const int MIN_HASH
const std::string sample8_tag("sample_8")
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
const std::string Cell_tag("cell")
const std::string sample10_tag("sample_10")
void GetNodeData(xercesc::DOMNode *node, T &value)
get the node data