#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 81 of file HcalConstantsXMLWriter.cc.
83 XMLString::transcode(
"det_index", tempStr, 99);
84 DOMAttr* attrdet =
mDoc->createAttribute(tempStr);
86 XMLString::transcode(
"eta_index", tempStr, 99);
87 DOMAttr* attreta =
mDoc->createAttribute(tempStr);
89 XMLString::transcode(
"phi_index", tempStr, 99);
90 DOMAttr* attrphi =
mDoc->createAttribute(tempStr);
92 XMLString::transcode(
"depth_index", tempStr, 99);
93 DOMAttr* attrdepth =
mDoc->createAttribute(tempStr);
95 XMLString::transcode(
"scale_factor", tempStr, 99);
96 DOMAttr* attrscale =
mDoc->createAttribute(tempStr);
100 attrdet->setValue(XMLString::transcode(ost.str().c_str()));
101 detelem->setAttributeNode(attrdet);
105 attreta->setValue(XMLString::transcode(ost1.str().c_str()));
107 detelem->setAttributeNode(attreta);
111 attrphi->setValue(XMLString::transcode(ost2.str().c_str()));
113 detelem->setAttributeNode(attrphi);
117 attrdepth->setValue(XMLString::transcode(ost3.str().c_str()));
119 detelem->setAttributeNode(attrdepth);
123 attrscale->setValue(XMLString::transcode(ost4.str().c_str()));
125 detelem->setAttributeNode(attrscale);
References LEDCalibrationChannels::depth, PVValHelper::eta, and L1EGammaCrystalsEmulatorProducer_cfi::scale.
◆ writeXML()
void HcalConstantsXMLWriter::writeXML |
( |
std::string & |
, |
|
|
const std::vector< int > & |
, |
|
|
const std::vector< int > & |
, |
|
|
const std::vector< int > & |
, |
|
|
const std::vector< int > & |
, |
|
|
const std::vector< float > & |
|
|
) |
| |
Definition at line 23 of file HcalConstantsXMLWriter.cc.
29 int nn = newfile0.size();
31 for (
int i = 0;
i <
nn;
i++) {
34 char const* fend =
"\0";
45 XMLString::transcode(
"Core", tempStr, 99);
46 unique_ptr<DOMImplementation> mDom(DOMImplementationRegistry::getDOMImplementation(tempStr));
48 XMLString::transcode(
"CalibrationConstants", tempStr, 99);
49 mDoc = mDom->createDocument(
nullptr,
54 DOMLSSerializer* domWriter = mDom->createLSSerializer();
55 domWriter->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
56 DOMElement*
root =
mDoc->getDocumentElement();
58 XMLString::transcode(
"Hcal", tempStr, 99);
59 DOMElement* rootelem =
mDoc->createElement(tempStr);
60 root->appendChild(rootelem);
62 XMLString::transcode(
"Cell", tempStr, 99);
63 vector<DOMElement*> theDOMVec;
65 for (
unsigned int i = 0;
i < detvec.size();
i++) {
66 theDOMVec.push_back(
mDoc->createElement(tempStr));
67 newCellLine(theDOMVec[
i], detvec[
i], etavec[
i], phivec[
i], depthvec[
i], scalevec[
i]);
68 rootelem->appendChild(theDOMVec[
i]);
71 cout <<
" Write Doc " << theDOMVec.size() << endl;
72 DOMLSOutput*
output = mDom->createLSOutput();
73 output->setByteStream(&formTarget);
75 cout <<
" End of Writting " << endl;
References gather_cfg::cout, benchmark_cfg::fb, mps_fire::i, runonSM::newfile, groupFilesInBlocks::nn, MillePedeFileConverter_cfg::out, and convertSQLitetoXML_cfg::output.
◆ hcalfileOut_
std::string HcalConstantsXMLWriter::hcalfileOut_ |
|
private |
◆ mDoc
xercesc::DOMDocument* HcalConstantsXMLWriter::mDoc |
|
private |