CMS 3D CMS Logo

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::SiStripConfigParser ( )

Definition at line 8 of file SiStripConfigParser.cc.

8  {
9  edm::LogInfo("SiStripConfigParser") << " Creating SiStripConfigParser "
10  << "\n";
11 }

Member Function Documentation

◆ getDocument()

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

Definition at line 13 of file SiStripConfigParser.cc.

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 }

References config_, Exception, and corrVsCorr::filename.

Referenced by SiStripSummaryCreator::readConfiguration().

◆ getFrequencyForSummary()

bool SiStripConfigParser::getFrequencyForSummary ( int &  u_freq)

Definition at line 46 of file SiStripConfigParser.cc.

46  {
47  u_freq = config_.get<int>("SummaryPlot.<xmlattr>.update_frequency", -1);
48  if (u_freq >= 0)
49  return true;
50  return false;
51 }

References config_.

Referenced by SiStripSummaryCreator::readConfiguration().

◆ getMENamesForSummary()

bool SiStripConfigParser::getMENamesForSummary ( std::map< std::string, std::string > &  me_names)

Definition at line 27 of file SiStripConfigParser.cc.

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 }

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

Referenced by SiStripSummaryCreator::readConfiguration().

Member Data Documentation

◆ config_

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

Definition at line 31 of file SiStripConfigParser.h.

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

SiStripConfigParser::config_
boost::property_tree::ptree config_
Definition: SiStripConfigParser.h:31
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17