#include <DQMParserBase.h>
Public Member Functions | |
int | countNodes (std::string tagName) |
Returns the number of nodes with given name. | |
xercesc::DOMDocument * | doc () |
DOM Document. | |
DQMParserBase () | |
Creator. | |
void | getDocument (std::string configFile, bool UseDB=false) |
Methor that parses the xml file configFile. | |
void | getNewDocument (std::string configFile, bool UseDB=false) |
Parses a new Document. | |
virtual | ~DQMParserBase () |
Destructor. | |
Protected Attributes | |
xercesc::XercesDOMParser * | parser |
* Base class for Parsers used by DQM
Definition at line 33 of file DQMParserBase.h.
DQMParserBase::DQMParserBase | ( | ) |
Creator.
Definition at line 18 of file DQMParserBase.cc.
References geometryXMLtoCSV::parser.
{ parser=0; }
DQMParserBase::~DQMParserBase | ( | ) | [virtual] |
int DQMParserBase::countNodes | ( | std::string | tagName | ) |
Returns the number of nodes with given name.
Definition at line 62 of file DQMParserBase.cc.
References qtxml::_toDOMS(), and geometryXMLtoCSV::parser.
{ unsigned int tagsNum = parser->getDocument()->getElementsByTagName(qtxml::_toDOMS(tagName))->getLength(); return tagsNum; }
xercesc::DOMDocument* DQMParserBase::doc | ( | ) | [inline] |
DOM Document.
Definition at line 47 of file DQMParserBase.h.
References parser.
Referenced by SiStripLayoutParser::getAllLayouts(), SiPixelConfigParser::getCalibType(), SiPixelConfigParser::getFrequencyForBarrelSummary(), SiPixelConfigParser::getFrequencyForEndcapSummary(), SiPixelConfigParser::getFrequencyForGrandBarrelSummary(), SiPixelConfigParser::getFrequencyForGrandEndcapSummary(), SiStripConfigParser::getFrequencyForSummary(), SiPixelConfigParser::getFrequencyForTrackerMap(), SiPixelConfigParser::getMENamesForBarrelSummary(), SiPixelConfigParser::getMENamesForEndcapSummary(), SiPixelConfigParser::getMENamesForFEDErrorSummary(), SiPixelConfigParser::getMENamesForGrandBarrelSummary(), SiPixelConfigParser::getMENamesForGrandEndcapSummary(), SiStripConfigParser::getMENamesForSummary(), SiPixelConfigParser::getMENamesForTrackerMap(), SiPixelConfigParser::getMENamesForTree(), SiPixelConfigParser::getMessageLimitForQTests(), and SiPixelConfigParser::getSourceType().
{return parser->getDocument();}
void DQMParserBase::getDocument | ( | std::string | configFile, |
bool | UseDB = false |
||
) |
Methor that parses the xml file configFile.
Definition at line 28 of file DQMParserBase.cc.
References asciidump::doc, and geometryXMLtoCSV::parser.
Referenced by QTestHandle::configureTests(), SiStripActionExecutor::createShiftReport(), SiPixelActionExecutor::createSummary(), SiPixelInformationExtractor::getTrackerMapHistos(), SiStripInformationExtractor::readConfiguration(), SiStripSummaryCreator::readConfiguration(), and SiPixelActionExecutor::readConfiguration().
{ parser = new XercesDOMParser; parser->setValidationScheme(XercesDOMParser::Val_Auto); parser->setDoNamespaces(false); if(UseDB){ // std::cout<<"=== This is config file from getDocument ====== "<<std::endl; // std::cout<<configFile<<std::endl; MemBufInputSource mb((const XMLByte*)configFile.c_str(),strlen(configFile.c_str()),"",false); parser->parse(mb); } else{ parser->parse(configFile.c_str()); } xercesc::DOMDocument* doc = parser->getDocument(); assert(doc); }
void DQMParserBase::getNewDocument | ( | std::string | configFile, |
bool | UseDB = false |
||
) |
Parses a new Document.
Definition at line 47 of file DQMParserBase.cc.
References gather_cfg::cout, asciidump::doc, and geometryXMLtoCSV::parser.
Referenced by QTestHandle::configureTests().
{ parser->resetDocumentPool(); if(UseDB){ std::cout<<"=== This is config file from getNewDocument ==== "<<std::endl; std::cout<<configFile<<std::endl; MemBufInputSource mb((const XMLByte*)configFile.c_str(),strlen(configFile.c_str()),"",false); parser->parse(mb); } else{ parser->parse(configFile.c_str()); } xercesc::DOMDocument* doc = parser->getDocument(); assert(doc); }
xercesc::XercesDOMParser* DQMParserBase::parser [protected] |
Definition at line 49 of file DQMParserBase.h.
Referenced by doc().