CMS 3D CMS Logo

List of all members | Public Member Functions
SiStripLayoutParser Class Reference

#include <SiStripLayoutParser.h>

Inheritance diagram for SiStripLayoutParser:
DQMParserBase

Public Member Functions

bool getAllLayouts (std::map< std::string, std::vector< std::string > > &me_names)
 
 SiStripLayoutParser ()
 
 ~SiStripLayoutParser () override
 
- Public Member Functions inherited from DQMParserBase
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...
 

Additional Inherited Members

- Protected Attributes inherited from DQMParserBase
xercesc::XercesDOMParser * parser
 

Detailed Description

Definition at line 18 of file SiStripLayoutParser.h.

Constructor & Destructor Documentation

SiStripLayoutParser::SiStripLayoutParser ( )

Definition at line 9 of file SiStripLayoutParser.cc.

9  : DQMParserBase() {
10  edm::LogInfo("SiStripLayoutParser") <<
11  " Creating SiStripLayoutParser " << "\n" ;
12 }
DQMParserBase()
Creator.
SiStripLayoutParser::~SiStripLayoutParser ( )
override

Definition at line 16 of file SiStripLayoutParser.cc.

16  {
17  edm::LogInfo("SiStripActionExecutor") <<
18  " Deleting SiStripLayoutParser " << "\n" ;
19 }

Member Function Documentation

bool SiStripLayoutParser::getAllLayouts ( std::map< std::string, std::vector< std::string > > &  me_names)

Definition at line 23 of file SiStripLayoutParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), gen::k, checklumidiff::l, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TrackingActionExecutor::createShiftReport(), and SiStripActionExecutor::createShiftReport().

23  {
24  if (!doc()) {
25  std::cout << " SiStripLayoutParser::Configuration File is not set!!! " << std::endl;
26  return false;
27  }
28 
29  layouts.clear();
30 
31  xercesc::DOMNodeList * layoutList
32  = doc()->getElementsByTagName(qtxml::_toDOMS("layout"));
33 
34  unsigned int nlayout = layoutList->getLength();
35  if (nlayout == 0) return false;
36 
37  for (unsigned int k = 0; k < layoutList->getLength(); k++) {
38  xercesc::DOMNode* layoutNode = layoutList->item(k);
39  if (!layoutNode) return false;
40 
41  xercesc::DOMElement* layoutElement = static_cast<xercesc::DOMElement *>(layoutNode);
42  if (!layoutElement) return false;
43  std::string layoutName = qtxml::_toString(layoutElement->getAttribute (qtxml::_toDOMS ("name")));
44 
45  xercesc::DOMNodeList * meList
46  = layoutElement->getElementsByTagName(qtxml::_toDOMS("monitorable"));
47  std::vector<std::string> me_names;
48  for (unsigned int l = 0; l < meList->getLength(); l++) {
49  xercesc::DOMNode* meNode = meList->item(l);
50  if (!meNode) return false;
51  xercesc::DOMElement* meElement = static_cast<xercesc::DOMElement *>(meNode);
52  if (!meElement) return false;
53  std::string meName = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
54  me_names.push_back(meName);
55  }
56  if (!me_names.empty()) layouts[layoutName] = me_names;
57  }
58  if ( !layouts.empty()) return true;
59  else return false;
60 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45