CMS 3D CMS Logo

SiStripConfigParser.cc
Go to the documentation of this file.
3 #include <iostream>
4 
5 //
6 // -- Constructor
7 //
9  edm::LogInfo("SiStripConfigParser") << " Creating SiStripConfigParser "
10  << "\n";
11 }
12 
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 }
24 
25 // -- Get List of MEs for the summary plot and the
26 //
27 bool SiStripConfigParser::getMENamesForSummary(std::map<std::string, std::string>& me_names) {
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 }
42 
43 //
44 // -- Get List of MEs for the summary plot and the
45 //
47  u_freq = config_.get<int>("SummaryPlot.<xmlattr>.update_frequency", -1);
48  if (u_freq >= 0)
49  return true;
50  return false;
51 }
SiStripConfigParser::config_
boost::property_tree::ptree config_
Definition: SiStripConfigParser.h:31
MessageLogger.h
SiStripConfigParser::SiStripConfigParser
SiStripConfigParser()
Definition: SiStripConfigParser.cc:8
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripConfigParser.h
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
SiStripConfigParser::getFrequencyForSummary
bool getFrequencyForSummary(int &u_freq)
Definition: SiStripConfigParser.cc:46
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
SiStripConfigParser::getDocument
void getDocument(std::string filepath)
Definition: SiStripConfigParser.cc:13
SiStripConfigParser::getMENamesForSummary
bool getMENamesForSummary(std::map< std::string, std::string > &me_names)
Definition: SiStripConfigParser.cc:27
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17