#include <DQM/SiStripMonitorClient/interface/SiStripConfigWriter.h>
Public Member Functions | |
void | createColumn (std::string &element, std::string &name) |
void | createLayout (std::string &name) |
void | createRow () |
bool | init () |
Write XML file. | |
SiStripConfigWriter () | |
Creator. | |
void | write (std::string &fname) |
~SiStripConfigWriter () | |
Destructor. | |
Private Attributes | |
xercesc::DOMImplementation * | domImpl |
xercesc::DOMWriter * | domWriter |
xercesc::DOMElement * | lastLayout |
xercesc::DOMElement * | lastRow |
xercesc::DOMDocument * | theDoc |
xercesc::DOMElement * | theTopElement |
Definition at line 32 of file SiStripConfigWriter.h.
SiStripConfigWriter::SiStripConfigWriter | ( | ) |
SiStripConfigWriter::~SiStripConfigWriter | ( | ) |
void SiStripConfigWriter::createColumn | ( | std::string & | element, | |
std::string & | name | |||
) |
void SiStripConfigWriter::createLayout | ( | std::string & | name | ) |
void SiStripConfigWriter::createRow | ( | ) |
Definition at line 49 of file SiStripConfigWriter.cc.
References qtxml::_toDOMS(), lastLayout, lastRow, and theDoc.
00049 { 00050 lastLayout->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); 00051 00052 lastRow = theDoc->createElement(qtxml::_toDOMS("row")); 00053 lastLayout->appendChild(lastRow); 00054 lastLayout->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); 00055 }
Write XML file.
Definition at line 22 of file SiStripConfigWriter.cc.
References qtxml::_toDOMS(), GenMuonPlsPt100GeV_cfg::cout, domImpl, domWriter, lat::endl(), theDoc, and theTopElement.
00022 { 00023 try { 00024 XMLPlatformUtils::Initialize(); 00025 } 00026 catch (const XMLException& toCatch) { 00027 cout << "Problem to initialise XML !!! " << endl; 00028 return false; 00029 } 00030 DOMImplementation* domImpl = DOMImplementationRegistry::getDOMImplementation(qtxml::_toDOMS("Range")); 00031 domWriter = (dynamic_cast<DOMImplementation*>(domImpl))->createDOMWriter(); 00032 domWriter->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true); 00033 theDoc = domImpl->createDocument(0,qtxml::_toDOMS("Layouts"), 0); 00034 theTopElement = theDoc->getDocumentElement(); 00035 theTopElement->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); 00036 return true; 00037 }
void SiStripConfigWriter::write | ( | std::string & | fname | ) |
xercesc::DOMImplementation* SiStripConfigWriter::domImpl [private] |
xercesc::DOMWriter* SiStripConfigWriter::domWriter [private] |
xercesc::DOMElement* SiStripConfigWriter::lastLayout [private] |
xercesc::DOMElement* SiStripConfigWriter::lastRow [private] |
xercesc::DOMDocument* SiStripConfigWriter::theDoc [private] |
xercesc::DOMElement* SiStripConfigWriter::theTopElement [private] |