CMS 3D CMS Logo

Public Member Functions

SiStripLayoutParser Class Reference

#include <SiStripLayoutParser.h>

Inheritance diagram for SiStripLayoutParser:
DQMParserBase

List of all members.

Public Member Functions

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

Detailed Description

* Class that handles the SiStrip Quality Tests

Date:
2007/04/10 20:56:26
Revision:
1.1
Author:
Suchandra Dutta

Definition at line 20 of file SiStripLayoutParser.h.


Constructor & Destructor Documentation

SiStripLayoutParser::SiStripLayoutParser ( )

Definition at line 9 of file SiStripLayoutParser.cc.

                                         : DQMParserBase() {
  edm::LogInfo("SiStripLayoutParser") << 
    " Creating SiStripLayoutParser " << "\n" ;
}
SiStripLayoutParser::~SiStripLayoutParser ( )

Definition at line 16 of file SiStripLayoutParser.cc.

                                          {
  edm::LogInfo("SiStripActionExecutor") << 
    " Deleting SiStripLayoutParser " << "\n" ;
}

Member Function Documentation

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

Definition at line 27 of file SiPixelLayoutParser.cc.

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

Referenced by SiStripActionExecutor::createShiftReport(), and SiStripInformationExtractor::readConfiguration().

                                                                              {
  if (!doc()) {
    cout << " SiPixelLayoutParser::Configuration File is not set!!! " << endl;
    return false;
  }

  layouts.clear();

  DOMNodeList * layoutList 
    = doc()->getElementsByTagName(qtxml::_toDOMS("layout"));

  unsigned int nlayout = layoutList->getLength();
  if (nlayout == 0) return false;

  for (unsigned int k = 0; k < layoutList->getLength(); k++) {
    DOMNode* layoutNode 
      = layoutList->item(k);
    if (!layoutNode) return false;
    
    DOMElement* layoutElement = static_cast<DOMElement *>(layoutNode);          
    if (!layoutElement) return false;
    string layoutName = qtxml::_toString(layoutElement->getAttribute (qtxml::_toDOMS ("name"))); 

    DOMNodeList * meList 
      = layoutElement->getElementsByTagName(qtxml::_toDOMS("monitorable"));
    vector<string> me_names;
    for (unsigned int l = 0; l < meList->getLength(); l++) {
      DOMNode* meNode = meList->item(l);
      if (!meNode) return false;
      DOMElement* meElement = static_cast<DOMElement *>(meNode);          
      if (!meElement) return false;
      string meName = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name"))); 
      me_names.push_back(meName);    
    }
    if (me_names.size() > 0) layouts[layoutName] = me_names;
  }
  if ( layouts.size() > 0) return true;
  else return false; 
}