CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiPixelConfigParser Class Reference

#include <SiPixelConfigParser.h>

Public Member Functions

bool getCalibType (int &u_freq)
 
void getDocument (std::string filename)
 
bool getFrequencyForBarrelSummary (int &u_freq)
 
bool getFrequencyForEndcapSummary (int &u_freq)
 
bool getFrequencyForGrandBarrelSummary (int &u_freq)
 
bool getFrequencyForGrandEndcapSummary (int &u_freq)
 
bool getFrequencyForTrackerMap (int &u_freq)
 
bool getMENamesForBarrelSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForEndcapSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForFEDErrorSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForGrandBarrelSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForGrandEndcapSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForTrackerMap (std::string &tkmap_name, std::vector< std::string > &me_names)
 
bool getMENamesForTree (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMessageLimitForQTests (int &u_freq)
 
bool getSourceType (int &u_freq)
 
 SiPixelConfigParser ()
 

Private Attributes

boost::property_tree::ptree config_
 

Detailed Description

Definition at line 19 of file SiPixelConfigParser.h.

Constructor & Destructor Documentation

◆ SiPixelConfigParser()

SiPixelConfigParser::SiPixelConfigParser ( )

Definition at line 11 of file SiPixelConfigParser.cc.

11  {
12  edm::LogInfo("SiPixelConfigParser") << " Creating SiPixelConfigParser "
13  << "\n";
14 }

Member Function Documentation

◆ getCalibType()

bool SiPixelConfigParser::getCalibType ( int &  u_freq)

Definition at line 154 of file SiPixelConfigParser.cc.

154  {
155  u_freq = config_.get<int>("Calib.CalibType.<xmlattr>.value", -1);
156  if (u_freq >= 0)
157  return true;
158  return false;
159 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getDocument()

void SiPixelConfigParser::getDocument ( std::string  filename)

Definition at line 16 of file SiPixelConfigParser.cc.

16  {
17  boost::property_tree::ptree xml;
18  boost::property_tree::read_xml(filename, xml);
19 
20  auto it = xml.find("MonElementConfiguration");
21  if (it == xml.not_found()) {
22  throw cms::Exception("SiPixelConfigParser")
23  << "SiPixelConfigParser XML needs to have a MonElementConfiguration node.";
24  }
25  this->config_ = it->second;
26 }

References Exception, and corrVsCorr::filename.

Referenced by SiPixelActionExecutor::createSummary(), and SiPixelActionExecutor::readConfiguration().

◆ getFrequencyForBarrelSummary()

bool SiPixelConfigParser::getFrequencyForBarrelSummary ( int &  u_freq)

Definition at line 96 of file SiPixelConfigParser.cc.

96  {
97  u_freq = config_.get<int>("SummaryPlot.SubStructureBarrelLevel.<xmlattr>.update_frequency", -1);
98  if (u_freq >= 0)
99  return true;
100  return false;
101 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getFrequencyForEndcapSummary()

bool SiPixelConfigParser::getFrequencyForEndcapSummary ( int &  u_freq)

Definition at line 103 of file SiPixelConfigParser.cc.

103  {
104  u_freq = config_.get<int>("SummaryPlot.SubStructureEndcapLevel.<xmlattr>.update_frequency", -1);
105  if (u_freq >= 0)
106  return true;
107  return false;
108 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getFrequencyForGrandBarrelSummary()

bool SiPixelConfigParser::getFrequencyForGrandBarrelSummary ( int &  u_freq)

Definition at line 126 of file SiPixelConfigParser.cc.

126  {
127  u_freq = config_.get<int>("SummaryPlot.SubStructureGrandBarrelLevel.<xmlattr>.update_frequency", -1);
128  if (u_freq >= 0)
129  return true;
130  return false;
131 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getFrequencyForGrandEndcapSummary()

bool SiPixelConfigParser::getFrequencyForGrandEndcapSummary ( int &  u_freq)

Definition at line 133 of file SiPixelConfigParser.cc.

133  {
134  u_freq = config_.get<int>("SummaryPlot.SubStructureGrandEndcapLevel.<xmlattr>.update_frequency", -1);
135  if (u_freq >= 0)
136  return true;
137  return false;
138 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getFrequencyForTrackerMap()

bool SiPixelConfigParser::getFrequencyForTrackerMap ( int &  u_freq)

Definition at line 52 of file SiPixelConfigParser.cc.

52  {
53  u_freq = config_.get<int>("TkMap.<xmlattr>.update_frequency", -1);
54  if (u_freq >= 0)
55  return true;
56  return false;
57 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getMENamesForBarrelSummary()

bool SiPixelConfigParser::getMENamesForBarrelSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 71 of file SiPixelConfigParser.cc.

71  {
72  structure_name = config_.get<std::string>("SummaryPlot.SubStructureBarrelLevel.<xmlattr>.name", "");
73  auto it = config_.find("SummaryPlot");
74  if (it == config_.not_found())
75  return false;
76  return readMEListHelper(it->second, "SubStructureBarrelLevel", me_names);
77 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

◆ getMENamesForEndcapSummary()

bool SiPixelConfigParser::getMENamesForEndcapSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 78 of file SiPixelConfigParser.cc.

78  {
79  structure_name = config_.get<std::string>("SummaryPlot.SubStructureEndcapLevel.<xmlattr>.name", "");
80  auto it = config_.find("SummaryPlot");
81  if (it == config_.not_found())
82  return false;
83  return readMEListHelper(it->second, "SubStructureEndcapLevel", me_names);
84 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

◆ getMENamesForFEDErrorSummary()

bool SiPixelConfigParser::getMENamesForFEDErrorSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 86 of file SiPixelConfigParser.cc.

86  {
87  structure_name = config_.get<std::string>("SummaryPlot.SubStructureNonDetId.<xmlattr>.name", "");
88  auto it = config_.find("SummaryPlot");
89  if (it == config_.not_found())
90  return false;
91  return readMEListHelper(it->second, "SubStructureNonDetId", me_names);
92 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

◆ getMENamesForGrandBarrelSummary()

bool SiPixelConfigParser::getMENamesForGrandBarrelSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 110 of file SiPixelConfigParser.cc.

110  {
111  structure_name = config_.get<std::string>("SummaryPlot.SubStructureGrandBarrelLevel.<xmlattr>.name", "");
112  auto it = config_.find("SummaryPlot");
113  if (it == config_.not_found())
114  return false;
115  return readMEListHelper(it->second, "SubStructureGrandBarrelLevel", me_names);
116 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::fillSummary().

◆ getMENamesForGrandEndcapSummary()

bool SiPixelConfigParser::getMENamesForGrandEndcapSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 118 of file SiPixelConfigParser.cc.

118  {
119  structure_name = config_.get<std::string>("SummaryPlot.SubStructureGrandEndcapLevel.<xmlattr>.name", "");
120  auto it = config_.find("SummaryPlot");
121  if (it == config_.not_found())
122  return false;
123  return readMEListHelper(it->second, "SubStructureGrandEndcapLevel", me_names);
124 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::fillSummary().

◆ getMENamesForTrackerMap()

bool SiPixelConfigParser::getMENamesForTrackerMap ( std::string &  tkmap_name,
std::vector< std::string > &  me_names 
)

Definition at line 45 of file SiPixelConfigParser.cc.

45  {
46  tkmap_name = config_.get<std::string>("TkMap.<xmlattr>.name", "");
47  return readMEListHelper(config_, "TkMap", me_names);
48 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getMENamesForTree()

bool SiPixelConfigParser::getMENamesForTree ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Definition at line 61 of file SiPixelConfigParser.cc.

61  {
62  structure_name = config_.get<std::string>("SummaryPlot.SubStructureLevel.<xmlattr>.name", "");
63  auto it = config_.find("SummaryPlot");
64  if (it == config_.not_found())
65  return false;
66  return readMEListHelper(it->second, "SubStructureLevel", me_names);
67 }

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getMessageLimitForQTests()

bool SiPixelConfigParser::getMessageLimitForQTests ( int &  u_freq)

Definition at line 140 of file SiPixelConfigParser.cc.

140  {
141  u_freq = config_.get<int>("QTests.QTestMessageLimit.<xmlattr>.value", -1);
142  if (u_freq >= 0)
143  return true;
144  return false;
145 }

Referenced by SiPixelActionExecutor::readConfiguration().

◆ getSourceType()

bool SiPixelConfigParser::getSourceType ( int &  u_freq)

Definition at line 147 of file SiPixelConfigParser.cc.

147  {
148  u_freq = config_.get<int>("Source.SourceType.<xmlattr>.code", -1);
149  if (u_freq >= 0)
150  return true;
151  return false;
152 }

Referenced by SiPixelActionExecutor::createSummary(), and SiPixelActionExecutor::readConfiguration().

Member Data Documentation

◆ config_

boost::property_tree::ptree SiPixelConfigParser::config_
private

Definition at line 44 of file SiPixelConfigParser.h.

edm::LogInfo
Definition: MessageLogger.h:254
SiPixelConfigParser::config_
boost::property_tree::ptree config_
Definition: SiPixelConfigParser.h:44
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Exception
Definition: hltDiff.cc:246
readMEListHelper
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
Definition: SiPixelConfigParser.cc:28