32 unique_ptr<DOMImplementation>
impl(DOMImplementationRegistry::getDOMImplementation(
cms::xerces::uStr(
"LS").ptr()));
34 DOMLSSerializer*
writer =
impl->createLSSerializer();
35 if (
writer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
36 writer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
38 DOMDocumentType* doctype =
impl->createDocumentType(
cms::xerces::uStr(
"XML").ptr(),
nullptr,
nullptr);
40 DOMElement*
root =
doc->getDocumentElement();
46 fout.open(
"Linearization.txt");
53 float m12 = (
record)[rawid].mult_x12;
54 float s12 = (
record)[rawid].shift_x12;
55 float m6 = (
record)[rawid].mult_x6;
56 float s6 = (
record)[rawid].shift_x6;
57 float m1 = (
record)[rawid].mult_x1;
58 float s1 = (
record)[rawid].shift_x1;
66 fout << rawid <<
" " << m12 <<
" " << m6 <<
" " << m1 <<
" " << s12 <<
" " << s6 <<
" " << s1 <<
"\n";
77 float m12 = (
record)[rawid].mult_x12;
78 float s12 = (
record)[rawid].shift_x12;
79 float m6 = (
record)[rawid].mult_x6;
80 float s6 = (
record)[rawid].shift_x6;
81 float m1 = (
record)[rawid].mult_x1;
82 float s1 = (
record)[rawid].shift_x1;
90 fout << rawid <<
" " << m12 <<
" " << m6 <<
" " << m1 <<
" " << s12 <<
" " << s6 <<
" " << s1 <<
"\n";
static constexpr int kSizeForDenseIndexing
const std::string Linearization_m1_tag("mult1")
static std::string dumpXML(const EcalCondHeader &header, const EcalTPGLinearizationConst &record)
const std::string Linearization_s12_tag("shift12")
static EEDetId unhashIndex(int hi)
const std::string Linearization_m12_tag("mult12")
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
static bool validHashIndex(int i)
const std::string Linearization_m6_tag("mult6")
std::string toString(XMLCh const *toTranscode)
const std::string Linearization_s6_tag("shift6")
static constexpr int kSizeForDenseIndexing
static const int MIN_HASH
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
ZStr< XMLCh > uStr(char const *str)
const std::string Linearization_s1_tag("shift1")
static int writeXML(const std::string &filename, const EcalCondHeader &header, const EcalTPGLinearizationConst &record)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
const std::string Linearization_tag("EcalTPGLinearizationConts")
xercesc::DOMElement * writeCell(xercesc::DOMNode *node, const DetId &detid)
Append a Cell node with attributes to.