#include <SiPixelConfigWriter.h>
Public Member Functions | |
void | createColumn (std::string &element, std::string &name) |
void | createLayout (std::string &name) |
void | createRow () |
bool | init () |
Write XML file. | |
SiPixelConfigWriter () | |
Creator. | |
void | write (std::string &fname) |
~SiPixelConfigWriter () | |
Destructor. | |
Private Attributes | |
xercesc::DOMImplementation * | domImpl |
xercesc::DOMWriter * | domWriter |
xercesc::DOMElement * | lastLayout |
xercesc::DOMElement * | lastRow |
xercesc::DOMDocument * | theDoc |
xercesc::DOMElement * | theTopElement |
* Base class for Parsers used by DQM
Definition at line 30 of file SiPixelConfigWriter.h.
SiPixelConfigWriter::SiPixelConfigWriter | ( | ) |
SiPixelConfigWriter::~SiPixelConfigWriter | ( | ) |
void SiPixelConfigWriter::createColumn | ( | std::string & | element, |
std::string & | name | ||
) |
Definition at line 59 of file SiPixelConfigWriter.cc.
References qtxml::_toDOMS().
Referenced by SiPixelActionExecutor::fillLayout().
{ lastRow->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); DOMElement* e1 = theDoc->createElement(qtxml::_toDOMS("column")); lastRow->appendChild(e1); DOMElement* e2 = theDoc->createElement(qtxml::_toDOMS(element)); e2->setAttribute(qtxml::_toDOMS("name"),qtxml::_toDOMS(name)); e1->appendChild(e2); }
void SiPixelConfigWriter::createLayout | ( | std::string & | name | ) |
Definition at line 41 of file SiPixelConfigWriter.cc.
References qtxml::_toDOMS().
Referenced by SiPixelActionExecutor::createLayout().
{ lastLayout = theDoc->createElement(qtxml::_toDOMS("layout")); lastLayout->setAttribute(qtxml::_toDOMS("name"), qtxml::_toDOMS(name)); theTopElement->appendChild(lastLayout); }
void SiPixelConfigWriter::createRow | ( | ) |
Definition at line 49 of file SiPixelConfigWriter.cc.
References qtxml::_toDOMS().
Referenced by SiPixelActionExecutor::createLayout(), and SiPixelActionExecutor::fillLayout().
{ lastLayout->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); lastRow = theDoc->createElement(qtxml::_toDOMS("row")); lastLayout->appendChild(lastRow); lastLayout->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); }
bool SiPixelConfigWriter::init | ( | void | ) |
Write XML file.
Definition at line 22 of file SiPixelConfigWriter.cc.
References qtxml::_toDOMS(), and gather_cfg::cout.
Referenced by SiPixelActionExecutor::createLayout().
{ try { XMLPlatformUtils::Initialize(); } catch (const XMLException& toCatch) { cout << "Problem to initialise XML !!! " << endl; return false; } DOMImplementation* domImpl = DOMImplementationRegistry::getDOMImplementation(qtxml::_toDOMS("Range")); domWriter = (dynamic_cast<DOMImplementation*>(domImpl))->createDOMWriter(); domWriter->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true); theDoc = domImpl->createDocument(0,qtxml::_toDOMS("Layouts"), 0); theTopElement = theDoc->getDocumentElement(); theTopElement->appendChild(theDoc->createTextNode(qtxml::_toDOMS("\n"))); return true; }
void SiPixelConfigWriter::write | ( | std::string & | fname | ) |
xercesc::DOMImplementation* SiPixelConfigWriter::domImpl [private] |
Definition at line 54 of file SiPixelConfigWriter.h.
xercesc::DOMWriter* SiPixelConfigWriter::domWriter [private] |
Definition at line 55 of file SiPixelConfigWriter.h.
xercesc::DOMElement* SiPixelConfigWriter::lastLayout [private] |
Definition at line 51 of file SiPixelConfigWriter.h.
xercesc::DOMElement* SiPixelConfigWriter::lastRow [private] |
Definition at line 52 of file SiPixelConfigWriter.h.
xercesc::DOMDocument* SiPixelConfigWriter::theDoc [private] |
Definition at line 53 of file SiPixelConfigWriter.h.
xercesc::DOMElement* SiPixelConfigWriter::theTopElement [private] |
Definition at line 50 of file SiPixelConfigWriter.h.