#include <HcalConstantsXMLWriter.h>
|
| HcalConstantsXMLWriter () |
|
void | newCellLine (xercesc::DOMElement *, int, int, int, int, float) |
|
void | writeXML (std::string &, const std::vector< int > &, const std::vector< int > &, const std::vector< int > &, const std::vector< int > &, const std::vector< float > &) |
|
virtual | ~HcalConstantsXMLWriter () |
|
Definition at line 18 of file HcalConstantsXMLWriter.h.
◆ HcalConstantsXMLWriter()
HcalConstantsXMLWriter::HcalConstantsXMLWriter |
( |
| ) |
|
◆ ~HcalConstantsXMLWriter()
HcalConstantsXMLWriter::~HcalConstantsXMLWriter |
( |
| ) |
|
|
virtual |
◆ newCellLine()
void HcalConstantsXMLWriter::newCellLine |
( |
xercesc::DOMElement * |
, |
|
|
int |
, |
|
|
int |
, |
|
|
int |
, |
|
|
int |
, |
|
|
float |
|
|
) |
| |
Definition at line 82 of file HcalConstantsXMLWriter.cc.
References LEDCalibrationChannels::depth, PVValHelper::eta, phi, and L1EGammaClusterEmuProducer_cfi::scale.
84 XMLString::transcode(
"det_index", tempStr, 99);
85 DOMAttr* attrdet =
mDoc->createAttribute(tempStr);
87 XMLString::transcode(
"eta_index", tempStr, 99);
88 DOMAttr* attreta =
mDoc->createAttribute(tempStr);
90 XMLString::transcode(
"phi_index", tempStr, 99);
91 DOMAttr* attrphi =
mDoc->createAttribute(tempStr);
93 XMLString::transcode(
"depth_index", tempStr, 99);
94 DOMAttr* attrdepth =
mDoc->createAttribute(tempStr);
96 XMLString::transcode(
"scale_factor", tempStr, 99);
97 DOMAttr* attrscale =
mDoc->createAttribute(tempStr);
99 std::ostringstream ost;
101 attrdet->setValue(XMLString::transcode(ost.str().c_str()));
102 detelem->setAttributeNode(attrdet);
104 std::ostringstream ost1;
106 attreta->setValue(XMLString::transcode(ost1.str().c_str()));
108 detelem->setAttributeNode(attreta);
110 std::ostringstream ost2;
112 attrphi->setValue(XMLString::transcode(ost2.str().c_str()));
114 detelem->setAttributeNode(attrphi);
116 std::ostringstream ost3;
118 attrdepth->setValue(XMLString::transcode(ost3.str().c_str()));
120 detelem->setAttributeNode(attrdepth);
122 std::ostringstream ost4;
124 attrscale->setValue(XMLString::transcode(ost4.str().c_str()));
126 detelem->setAttributeNode(attrscale);
xercesc::DOMDocument * mDoc
◆ writeXML()
void HcalConstantsXMLWriter::writeXML |
( |
std::string & |
newfile0, |
|
|
const std::vector< int > & |
detvec, |
|
|
const std::vector< int > & |
etavec, |
|
|
const std::vector< int > & |
phivec, |
|
|
const std::vector< int > & |
depthvec, |
|
|
const std::vector< float > & |
scalevec |
|
) |
| |
Definition at line 24 of file HcalConstantsXMLWriter.cc.
References mps_fire::i, runonSM::newfile, groupFilesInBlocks::nn, MillePedeFileConverter_cfg::out, and convertSQLitetoXML_cfg::output.
30 int nn = newfile0.size();
32 for (
int i = 0;
i <
nn;
i++) {
35 char const* fend =
"\0";
42 std::ostream fOut(&fb);
46 XMLString::transcode(
"Core", tempStr, 99);
47 std::unique_ptr<DOMImplementation> mDom(DOMImplementationRegistry::getDOMImplementation(tempStr));
49 XMLString::transcode(
"CalibrationConstants", tempStr, 99);
50 mDoc = mDom->createDocument(
nullptr,
55 DOMLSSerializer* domWriter = mDom->createLSSerializer();
56 domWriter->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
57 DOMElement*
root =
mDoc->getDocumentElement();
59 XMLString::transcode(
"Hcal", tempStr, 99);
60 DOMElement* rootelem =
mDoc->createElement(tempStr);
61 root->appendChild(rootelem);
63 XMLString::transcode(
"Cell", tempStr, 99);
64 std::vector<DOMElement*> theDOMVec;
66 for (
unsigned int i = 0;
i < detvec.size();
i++) {
67 theDOMVec.push_back(
mDoc->createElement(tempStr));
68 newCellLine(theDOMVec[
i], detvec[
i], etavec[
i], phivec[
i], depthvec[
i], scalevec[
i]);
69 rootelem->appendChild(theDOMVec[
i]);
73 DOMLSOutput*
output = mDom->createLSOutput();
74 output->setByteStream(&formTarget);
Log< level::Info, true > LogVerbatim
void newCellLine(xercesc::DOMElement *, int, int, int, int, float)
xercesc::DOMDocument * mDoc
◆ hcalfileOut_
std::string HcalConstantsXMLWriter::hcalfileOut_ |
|
private |
◆ mDoc
xercesc::DOMDocument* HcalConstantsXMLWriter::mDoc |
|
private |