CMS 3D CMS Logo

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

#include <SiStripConfigParser.h>

Public Member Functions

void getDocument (std::string filepath)
 
bool getFrequencyForSummary (int &u_freq)
 
bool getMENamesForSummary (std::map< std::string, std::string > &me_names)
 
 SiStripConfigParser ()
 

Private Attributes

boost::property_tree::ptree config_
 

Detailed Description

Definition at line 19 of file SiStripConfigParser.h.

Constructor & Destructor Documentation

SiStripConfigParser::SiStripConfigParser ( )

Definition at line 8 of file SiStripConfigParser.cc.

8  {
9  edm::LogInfo("SiStripConfigParser") << " Creating SiStripConfigParser "
10  << "\n";
11 }
Log< level::Info, false > LogInfo

Member Function Documentation

void SiStripConfigParser::getDocument ( std::string  filepath)

Definition at line 13 of file SiStripConfigParser.cc.

References config_, and Exception.

Referenced by SiStripSummaryCreator::readConfiguration().

13  {
14  boost::property_tree::ptree xml;
15  boost::property_tree::read_xml(filename, xml);
16 
17  auto it = xml.find("MonElementConfiguration");
18  if (it == xml.not_found()) {
19  throw cms::Exception("SiPixelConfigParser")
20  << "SiPixelConfigParser XML needs to have a MonElementConfiguration node.";
21  }
22  this->config_ = it->second;
23 }
boost::property_tree::ptree config_
tuple filename
Definition: lut2db_cfg.py:20
bool SiStripConfigParser::getFrequencyForSummary ( int &  u_freq)

Definition at line 46 of file SiStripConfigParser.cc.

References config_.

Referenced by SiStripSummaryCreator::readConfiguration().

46  {
47  u_freq = config_.get<int>("SummaryPlot.<xmlattr>.update_frequency", -1);
48  if (u_freq >= 0)
49  return true;
50  return false;
51 }
boost::property_tree::ptree config_
bool SiStripConfigParser::getMENamesForSummary ( std::map< std::string, std::string > &  me_names)

Definition at line 27 of file SiStripConfigParser.cc.

References config_, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripSummaryCreator::readConfiguration().

27  {
28  for (auto& kv : config_) {
29  if (kv.first == "SummaryPlot") {
30  for (auto& mekv : kv.second) {
31  if (mekv.first == "MonElement") {
32  auto name = mekv.second.get<std::string>("<xmlattr>.name");
33  auto type = mekv.second.get<std::string>("<xmlattr>.type");
34  me_names[name] = type;
35  }
36  }
37  return true;
38  }
39  }
40  return false;
41 }
boost::property_tree::ptree config_

Member Data Documentation

boost::property_tree::ptree SiStripConfigParser::config_
private

Definition at line 31 of file SiStripConfigParser.h.

Referenced by getDocument(), getFrequencyForSummary(), and getMENamesForSummary().