CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
DQMParserBase Class Reference

#include <DQMParserBase.h>

Inheritance diagram for DQMParserBase:
QTestConfigurationParser SiPixelConfigParser SiPixelLayoutParser SiStripConfigParser SiStripLayoutParser SummaryPlotXmlParser

Public Member Functions

int countNodes (std::string tagName)
 Returns the number of nodes with given name. More...
 
xercesc::DOMDocument * doc ()
 DOM Document. More...
 
 DQMParserBase ()
 Creator. More...
 
void getDocument (std::string configFile, bool UseDB=false)
 Methor that parses the xml file configFile. More...
 
void getNewDocument (std::string configFile, bool UseDB=false)
 Parses a new Document. More...
 
virtual ~DQMParserBase ()
 Destructor. More...
 

Protected Attributes

xercesc::XercesDOMParser * parser
 

Detailed Description

Definition at line 31 of file DQMParserBase.h.

Constructor & Destructor Documentation

DQMParserBase::DQMParserBase ( )

Creator.

Definition at line 16 of file DQMParserBase.cc.

References geometryXMLtoCSV::parser.

16  {
17  parser=0;
18 }
xercesc::XercesDOMParser * parser
Definition: DQMParserBase.h:47
DQMParserBase::~DQMParserBase ( )
virtual

Destructor.

Definition at line 20 of file DQMParserBase.cc.

References geometryXMLtoCSV::parser.

20  {
21  delete parser;
22  parser=0;
23 }
xercesc::XercesDOMParser * parser
Definition: DQMParserBase.h:47

Member Function Documentation

int DQMParserBase::countNodes ( std::string  tagName)

Returns the number of nodes with given name.

Definition at line 60 of file DQMParserBase.cc.

References qtxml::_toDOMS(), and geometryXMLtoCSV::parser.

60  {
61  unsigned int tagsNum =
62  parser->getDocument()->getElementsByTagName(qtxml::_toDOMS(tagName))->getLength();
63  return tagsNum;
64 }
xercesc::XercesDOMParser * parser
Definition: DQMParserBase.h:47
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument* DQMParserBase::doc ( )
inline
void DQMParserBase::getDocument ( std::string  configFile,
bool  UseDB = false 
)

Methor that parses the xml file configFile.

Definition at line 26 of file DQMParserBase.cc.

References assert(), asciidump::doc, and geometryXMLtoCSV::parser.

Referenced by QTestHandle::configureTests(), TrackingActionExecutor::createShiftReport(), SiStripActionExecutor::createShiftReport(), SiPixelActionExecutor::createSummary(), SiStripSummaryCreator::readConfiguration(), SiStripInformationExtractor::readConfiguration(), and SiPixelActionExecutor::readConfiguration().

26  {
27 
28  parser = new XercesDOMParser;
29  parser->setValidationScheme(XercesDOMParser::Val_Auto);
30  parser->setDoNamespaces(false);
31  if(UseDB){
32 // std::cout<<"=== This is config file from getDocument ====== "<<std::endl;
33 // std::cout<<configFile<<std::endl;
34  MemBufInputSource mb((const XMLByte*)configFile.c_str(),strlen(configFile.c_str()),"",false);
35  parser->parse(mb);
36  }
37  else{
38  parser->parse(configFile.c_str());
39  }
40  xercesc::DOMDocument* doc = parser->getDocument();
41  assert(doc);
42 
43 }
assert(m_qm.get())
xercesc::XercesDOMParser * parser
Definition: DQMParserBase.h:47
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
void DQMParserBase::getNewDocument ( std::string  configFile,
bool  UseDB = false 
)

Parses a new Document.

Definition at line 45 of file DQMParserBase.cc.

References assert(), gather_cfg::cout, asciidump::doc, and geometryXMLtoCSV::parser.

Referenced by QTestHandle::configureTests().

45  {
46  parser->resetDocumentPool();
47  if(UseDB){
48  std::cout<<"=== This is config file from getNewDocument ==== "<<std::endl;
49  std::cout<<configFile<<std::endl;
50  MemBufInputSource mb((const XMLByte*)configFile.c_str(),strlen(configFile.c_str()),"",false);
51  parser->parse(mb);
52  }
53  else{
54  parser->parse(configFile.c_str());
55  }
56  xercesc::DOMDocument* doc = parser->getDocument();
57  assert(doc);
58 
59 }
assert(m_qm.get())
xercesc::XercesDOMParser * parser
Definition: DQMParserBase.h:47
tuple cout
Definition: gather_cfg.py:121
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45

Member Data Documentation

xercesc::XercesDOMParser* DQMParserBase::parser
protected

Definition at line 47 of file DQMParserBase.h.

Referenced by doc().