Translates a EcalGainRatio record to XML and vice versa
- Author
- Francesco RUBBO
- Version
- Id
- EcalPulseShapesXMLTranslator.h,v 0 2010/04/26 fay Exp
- Date
- 26 Apr 2010
Definition at line 15 of file EcalPulseShapesXMLTranslator.h.
Definition at line 131 of file EcalPulseShapesXMLTranslator.cc.
References boostedTaus_cff::doc, submitPVValidationJobs::dump, RecoTauValidation_cfi::header, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, EBDetId::MIN_HASH, xuti::PulseShapes_tag(), AlCaHarvesting_cff::record, xuti::sample0_tag(), xuti::sample10_tag(), xuti::sample11_tag(), xuti::sample1_tag(), xuti::sample2_tag(), xuti::sample3_tag(), xuti::sample4_tag(), xuti::sample5_tag(), xuti::sample6_tag(), xuti::sample7_tag(), xuti::sample8_tag(), xuti::sample9_tag(), AlCaHLTBitMon_QueryRunRegistry::string, cms::xerces::toString(), EBDetId::unhashIndex(), EEDetId::unhashIndex(), cms::xerces::uStr(), EEDetId::validHashIndex(), xuti::writeCell(), xuti::writeHeader(), xuti::WriteNodeWithValue(), and cscNeutronWriter_cfi::writer.
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])
const std::string sample9_tag("sample_9")
const std::string sample10_tag("sample_10")
const std::string sample0_tag("sample_0")
const std::string PulseShapes_tag("EcalPulseShapes")
const std::string sample2_tag("sample_2")
const std::string sample11_tag("sample_11")
const std::string sample5_tag("sample_5")
static EEDetId unhashIndex(int hi)
const std::string sample7_tag("sample_7")
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
static bool validHashIndex(int i)
std::string toString(XMLCh const *toTranscode)
const std::string sample3_tag("sample_3")
static const int MIN_HASH
const std::string sample8_tag("sample_8")
const std::string sample1_tag("sample_1")
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
ZStr< XMLCh > uStr(char const *str)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
xercesc::DOMElement * writeCell(xercesc::DOMNode *node, const DetId &detid)
Append a Cell node with attributes to.
const std::string sample6_tag("sample_6")
const std::string sample4_tag("sample_4")
Definition at line 22 of file EcalPulseShapesXMLTranslator.cc.
References xuti::Cell_tag(), officialStyle::chan, gather_cfg::cout, corrVsCorr::filename, xuti::getChildNode(), xuti::GetNodeData(), RecoTauValidation_cfi::header, writedatasetfile::parser, xuti::readCellId(), xuti::readHeader(), AlCaHarvesting_cff::record, alignCSCRings::s, xuti::sample0_tag(), xuti::sample10_tag(), xuti::sample11_tag(), xuti::sample1_tag(), xuti::sample2_tag(), xuti::sample3_tag(), xuti::sample4_tag(), xuti::sample5_tag(), xuti::sample6_tag(), xuti::sample7_tag(), xuti::sample8_tag(), xuti::sample9_tag(), EgammaValidation_cff::samples, EcalPulseShape::TEMPLATESAMPLES, cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().
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;
const std::string sample9_tag("sample_9")
const std::string sample10_tag("sample_10")
const std::string sample0_tag("sample_0")
const std::string sample2_tag("sample_2")
static const int TEMPLATESAMPLES
const std::string sample11_tag("sample_11")
const std::string sample5_tag("sample_5")
const std::string sample7_tag("sample_7")
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
const std::string sample3_tag("sample_3")
const std::string Cell_tag("cell")
const std::string sample8_tag("sample_8")
const std::string sample1_tag("sample_1")
void GetNodeData(xercesc::DOMNode *node, T &value)
get the node data
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
const std::string sample6_tag("sample_6")
const std::string sample4_tag("sample_4")
const DetId readCellId(xercesc::DOMElement *node)
Assuming.