Translates a EcalTPGLinearizationConst record to XML
- Version
- Id
- EcalTPGLinearizationConstXMLTranslator.h,v 1.0 2012/05/01 13:48:05 Exp
- Date
- 01 May 2012
Definition at line 14 of file EcalTPGLinearizationConstXMLTranslator.h.
Definition at line 30 of file EcalTPGLinearizationConstXMLTranslator.cc.
References common_cff::doc, FrontierConditions_GlobalTag_cff::dump, groupFilesInBlocks::fout, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, xuti::Linearization_m12_tag(), xuti::Linearization_m1_tag(), xuti::Linearization_m6_tag(), xuti::Linearization_s12_tag(), xuti::Linearization_s1_tag(), xuti::Linearization_s6_tag(), xuti::Linearization_tag(), EBDetId::MIN_HASH, record, 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.
33 unique_ptr<DOMImplementation>
impl( DOMImplementationRegistry::getDOMImplementation(
cms::xerces::uStr(
"LS").ptr()));
35 DOMLSSerializer*
writer =
impl->createLSSerializer();
36 if( writer->getDomConfig()->canSetParameter( XMLUni::fgDOMWRTFormatPrettyPrint,
true ))
37 writer->getDomConfig()->setParameter( XMLUni::fgDOMWRTFormatPrettyPrint,
true );
39 DOMDocumentType* doctype =
impl->createDocumentType(
cms::xerces::uStr(
"XML").ptr(),
nullptr,
nullptr );
42 DOMElement*
root = doc->getDocumentElement();
48 fout.open(
"Linearization.txt");
56 DOMElement* cellnode=
writeCell(root,rawid);
58 float m12=(
record)[rawid].mult_x12;
59 float s12=(
record)[rawid].shift_x12;
60 float m6 =(
record)[rawid].mult_x6;
61 float s6 =(
record)[rawid].shift_x6;
62 float m1 =(
record)[rawid].mult_x1;
63 float s1 =(
record)[rawid].shift_x1;
71 fout << rawid <<
" " << m12 <<
" " << m6 <<
" " << m1 <<
" " << s12 <<
" " << s6 <<
" " << s1 <<
"\n";
81 DOMElement* cellnode=
writeCell(root,rawid);
83 float m12=(
record)[rawid].mult_x12;
84 float s12=(
record)[rawid].shift_x12;
85 float m6 =(
record)[rawid].mult_x6;
86 float s6 =(
record)[rawid].shift_x6;
87 float m1 =(
record)[rawid].mult_x1;
88 float s1 =(
record)[rawid].shift_x1;
96 fout << rawid <<
" " << m12 <<
" " << m6 <<
" " << m1 <<
" " << s12 <<
" " << s6 <<
" " << s1 <<
"\n";
const std::string Linearization_m1_tag("mult1")
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 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 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.