#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 85 of file HcalConstantsXMLWriter.cc.
References egammaForCoreTracking_cff::depth, PVValHelper::eta, and Scenarios_cff::scale.
88 XMLString::transcode(
"det_index", tempStr, 99);
89 DOMAttr* attrdet =
mDoc->createAttribute(tempStr);
91 XMLString::transcode(
"eta_index", tempStr, 99);
92 DOMAttr* attreta =
mDoc->createAttribute(tempStr);
94 XMLString::transcode(
"phi_index", tempStr, 99);
95 DOMAttr* attrphi =
mDoc->createAttribute(tempStr) ;
97 XMLString::transcode(
"depth_index", tempStr, 99);
98 DOMAttr* attrdepth =
mDoc->createAttribute(tempStr) ;
100 XMLString::transcode(
"scale_factor", tempStr, 99);
101 DOMAttr* attrscale =
mDoc->createAttribute(tempStr) ;
105 attrdet->setValue(XMLString::transcode(ost.str().c_str()));
106 detelem->setAttributeNode(attrdet);
110 attreta->setValue(XMLString::transcode(ost1.str().c_str()));
112 detelem->setAttributeNode(attreta);
116 attrphi->setValue(XMLString::transcode(ost2.str().c_str()));
118 detelem->setAttributeNode(attrphi);
122 attrdepth->setValue(XMLString::transcode(ost3.str().c_str()));
124 detelem->setAttributeNode(attrdepth);
128 attrscale->setValue(XMLString::transcode(ost4.str().c_str()));
130 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 28 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.
30 int nn = newfile0.size();
32 for (
int i = 0;
i <
nn;
i++)
34 newfile[
i]=newfile0[
i];
36 char const* fend=
"\0";
39 cout<<
" New file "<<newfile<<endl;
47 XMLString::transcode (
"Core",tempStr,99);
48 unique_ptr<DOMImplementation> mDom( DOMImplementationRegistry::getDOMImplementation (tempStr));
50 XMLString::transcode(
"CalibrationConstants", tempStr, 99);
51 mDoc = mDom->createDocument(
57 DOMLSSerializer* domWriter = mDom->createLSSerializer();
58 domWriter->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
59 DOMElement*
root =
mDoc->getDocumentElement();
61 XMLString::transcode(
"Hcal", tempStr, 99);
62 DOMElement* rootelem =
mDoc->createElement (tempStr);
63 root->appendChild(rootelem);
65 XMLString::transcode(
"Cell", tempStr, 99);
66 vector<DOMElement*> theDOMVec;
68 for(
unsigned int i=0;
i<detvec.size();
i++)
70 theDOMVec.push_back(
mDoc->createElement (tempStr));
71 newCellLine(theDOMVec[
i],detvec[i],etavec[i],phivec[i],depthvec[i],scalevec[i]);
72 rootelem->appendChild(theDOMVec[
i]);
75 cout<<
" Write Doc "<<theDOMVec.size()<<endl;
76 DOMLSOutput*
output= mDom->createLSOutput();
77 output->setByteStream(&formTarget);
78 domWriter->write (
mDoc, output);
79 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 |