#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 |
( |
| ) |
|
|
virtual |
void HcalConstantsXMLWriter::newCellLine |
( |
xercesc::DOMElement * |
, |
|
|
int |
, |
|
|
int |
, |
|
|
int |
, |
|
|
int |
, |
|
|
float |
|
|
) |
| |
Definition at line 81 of file HcalConstantsXMLWriter.cc.
References egammaForCoreTracking_cff::depth, PVValHelper::eta, and Scenarios_cff::scale.
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);
xercesc::DOMDocument * mDoc
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.
References gather_cfg::cout, benchmark_cfg::fb, mps_fire::i, create_public_lumi_plots::newfile, groupFilesInBlocks::nn, MillePedeFileConverter_cfg::out, and convertSQLitetoXML_cfg::output.
29 int nn = newfile0.size();
31 for (
int i = 0;
i <
nn;
i++) {
32 newfile[
i] = newfile0[
i];
34 char const* fend =
"\0";
37 cout <<
" New file " << newfile << endl;
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);
74 domWriter->write(
mDoc, output);
75 cout <<
" End of Writting " << endl;
void newCellLine(xercesc::DOMElement *, int, int, int, int, float)
xercesc::DOMDocument * mDoc
std::string HcalConstantsXMLWriter::hcalfileOut_ |
|
private |
xercesc::DOMDocument* HcalConstantsXMLWriter::mDoc |
|
private |