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 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ getCalibType()

bool SiPixelConfigParser::getCalibType ( int &  u_freq)

Definition at line 154 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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

◆ getDocument()

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

Definition at line 16 of file SiPixelConfigParser.cc.

References Exception, and corrVsCorr::filename.

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

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 }
boost::property_tree::ptree config_

◆ getFrequencyForBarrelSummary()

bool SiPixelConfigParser::getFrequencyForBarrelSummary ( int &  u_freq)

Definition at line 96 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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 }
boost::property_tree::ptree config_

◆ getFrequencyForEndcapSummary()

bool SiPixelConfigParser::getFrequencyForEndcapSummary ( int &  u_freq)

Definition at line 103 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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 }
boost::property_tree::ptree config_

◆ getFrequencyForGrandBarrelSummary()

bool SiPixelConfigParser::getFrequencyForGrandBarrelSummary ( int &  u_freq)

Definition at line 126 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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 }
boost::property_tree::ptree config_

◆ getFrequencyForGrandEndcapSummary()

bool SiPixelConfigParser::getFrequencyForGrandEndcapSummary ( int &  u_freq)

Definition at line 133 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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 }
boost::property_tree::ptree config_

◆ getFrequencyForTrackerMap()

bool SiPixelConfigParser::getFrequencyForTrackerMap ( int &  u_freq)

Definition at line 52 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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

◆ getMENamesForBarrelSummary()

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

Definition at line 71 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForEndcapSummary()

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

Definition at line 78 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForFEDErrorSummary()

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

Definition at line 86 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::createSummary().

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForGrandBarrelSummary()

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

Definition at line 110 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::fillSummary().

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForGrandEndcapSummary()

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

Definition at line 118 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiPixelActionExecutor::fillSummary().

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForTrackerMap()

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

Definition at line 45 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

45  {
46  tkmap_name = config_.get<std::string>("TkMap.<xmlattr>.name", "");
47  return readMEListHelper(config_, "TkMap", me_names);
48 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMENamesForTree()

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

Definition at line 61 of file SiPixelConfigParser.cc.

References readMEListHelper(), and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
static bool readMEListHelper(boost::property_tree::ptree &config, string const &tagname, vector< string > &me_names)
boost::property_tree::ptree config_

◆ getMessageLimitForQTests()

bool SiPixelConfigParser::getMessageLimitForQTests ( int &  u_freq)

Definition at line 140 of file SiPixelConfigParser.cc.

Referenced by SiPixelActionExecutor::readConfiguration().

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

◆ getSourceType()

bool SiPixelConfigParser::getSourceType ( int &  u_freq)

Definition at line 147 of file SiPixelConfigParser.cc.

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

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

Member Data Documentation

◆ config_

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

Definition at line 44 of file SiPixelConfigParser.h.