Manage collection of histograms, load histogram definitions from XML file and book histograms by calling MonitorObjectProvider routines. More...
#include <CSCDQM_Collection.h>
Public Types | |
typedef xercesc::DOMDocument | DOMDocument |
typedef xercesc::DOMElement | DOMElement |
typedef xercesc::DOMNamedNodeMap | DOMNamedNodeMap |
typedef xercesc::DOMNode | DOMNode |
typedef xercesc::DOMNodeList | DOMNodeList |
typedef xercesc::XercesDOMParser | XercesDOMParser |
typedef xercesc::XMLException | XMLException |
typedef xercesc::XMLPlatformUtils | XMLPlatformUtils |
typedef xercesc::XMLString | XMLString |
Public Member Functions | |
void | bookCSCHistos (const HwId crateId, const HwId dmbId) const |
Book Chamber Histograms. More... | |
void | bookCSCHistos (const HistoId hid, const HwId crateId, const HwId dmbId, const HwId addId) const |
Book Chamber Histogram with additional identifier (On Demand) More... | |
void | bookDDUHistos (const HwId dduId) const |
Book DDU histograms. More... | |
void | bookEMUHistos () const |
Book EMU histograms. More... | |
void | bookFEDHistos (const HwId fedId) const |
Book FED histograms. More... | |
Collection (Configuration *const p_config) | |
Constructor. More... | |
const bool | isOnDemand (const HistoName &name) const |
Check if the histogram is on demand (by histogram name) More... | |
void | load () |
Load XML file and fill definition map(s) More... | |
void | printCollection () const |
Print collection of available histograms and their parameters. More... | |
Private Member Functions | |
void | book (const HistoDef &h, const CoHistoProps &p, const std::string &folder) const |
Book histogram. More... | |
Static Private Member Functions | |
static const bool | checkHistoValue (const CoHistoProps &h, const std::string &name, std::string &value) |
Find string histogram value in map. More... | |
static const bool | checkHistoValue (const CoHistoProps &h, const std::string &name, int &value) |
get Histogram int value out of the map and return boolean result More... | |
static const bool | checkHistoValue (const CoHistoProps &h, const std::string name, double &value) |
get Histogram double value out of the map and return boolean result More... | |
static std::string & | getHistoValue (const CoHistoProps &h, const std::string &name, std::string &value, const std::string &def_value="") |
Find string histogram value in map. More... | |
static int & | getHistoValue (const CoHistoProps &h, const std::string &name, int &value, const int &def_value=0) |
get Histogram int value out of the map and More... | |
static double & | getHistoValue (const CoHistoProps &h, const std::string name, double &value, const int def_value=0.0) |
get Histogram double value out of the map and More... | |
static void | getNodeProperties (DOMNode *&node, CoHistoProps &hp) |
Extract and write single histogram properties from XML node to map. More... | |
static const int | ParseAxisLabels (const std::string &s, std::map< int, std::string > &labels) |
Parse Axis label string and return values in vector. More... | |
Private Attributes | |
CoHistoMap | collection |
Configuration * | config |
Manage collection of histograms, load histogram definitions from XML file and book histograms by calling MonitorObjectProvider routines.
Definition at line 73 of file CSCDQM_Collection.h.
typedef xercesc::DOMDocument cscdqm::Collection::DOMDocument |
Definition at line 76 of file CSCDQM_Collection.h.
typedef xercesc::DOMElement cscdqm::Collection::DOMElement |
Definition at line 77 of file CSCDQM_Collection.h.
typedef xercesc::DOMNamedNodeMap cscdqm::Collection::DOMNamedNodeMap |
Definition at line 80 of file CSCDQM_Collection.h.
typedef xercesc::DOMNode cscdqm::Collection::DOMNode |
Definition at line 78 of file CSCDQM_Collection.h.
typedef xercesc::DOMNodeList cscdqm::Collection::DOMNodeList |
Definition at line 79 of file CSCDQM_Collection.h.
typedef xercesc::XercesDOMParser cscdqm::Collection::XercesDOMParser |
Definition at line 84 of file CSCDQM_Collection.h.
typedef xercesc::XMLException cscdqm::Collection::XMLException |
Definition at line 81 of file CSCDQM_Collection.h.
typedef xercesc::XMLPlatformUtils cscdqm::Collection::XMLPlatformUtils |
Definition at line 83 of file CSCDQM_Collection.h.
typedef xercesc::XMLString cscdqm::Collection::XMLString |
Definition at line 82 of file CSCDQM_Collection.h.
cscdqm::Collection::Collection | ( | Configuration *const | p_config | ) |
Constructor.
p_config | Pointer to Global configuration object |
Definition at line 31 of file CSCDQM_Collection.cc.
|
private |
Book histogram.
h | Histogram definition to book |
p | Map of Histogram properties |
folder | folder to book histograms to |
Check if this histogram is included in booking by filters
Put histogram into cache
Definition at line 424 of file CSCDQM_Collection.cc.
References checkHistoValue(), cscdqm::DEF_HISTO_COLOR, Exception, cscdqm::HistoDef::getFullPath(), getHistoValue(), cscdqm::HistoDef::getName(), cscdqm::MonitorObject::getTH1Lock(), cscdqm::H1D, cscdqm::H2D, cscdqm::H3D, tablePrinter::labels, CommonMethods::lock(), LOG_INFO, cscdqm::Lock::mutex, dataset::name, NULL, ParseAxisLabels(), cscdqm::HistoDef::processTitle(), cscdqm::PROFILE, cscdqm::PROFILE2D, alignCSCRings::s, cscdqm::MonitorObject::setAxisTitle(), cscdqm::MonitorObject::SetMaximum(), AlCaHLTBitMon_QueryRunRegistry::string, fftjetcommon_cfi::title, cscdqm::Utility::tokenize(), cscdqm::LockType::unlock(), findQualityFiles::v, cscdqm::XML_BOOK_HISTO_TITLE, cscdqm::XML_BOOK_HISTO_TYPE, cscdqm::XML_BOOK_ONDEMAND, cscdqm::XML_BOOK_ONDEMAND_FALSE, and cscdqm::XML_BOOK_ONDEMAND_TRUE.
Referenced by bookCSCHistos(), bookDDUHistos(), bookEMUHistos(), and bookFEDHistos().
Book Chamber Histograms.
crateId | CSC Crate Id |
dmbId | CSC DMB Id |
Definition at line 371 of file CSCDQM_Collection.cc.
References book(), checkHistoValue(), collection, cscdqm::HistoDef::getHistoIdByName(), getHistoValue(), mps_fire::i, gen::k, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, cscdqm::XML_BOOK_NAME_FROM, cscdqm::XML_BOOK_NAME_TO, cscdqm::XML_BOOK_ONDEMAND, and cscdqm::XML_BOOK_ONDEMAND_FALSE.
Referenced by cscdqm::Dispatcher::book(), and cscdqm::Dispatcher::getHisto().
void cscdqm::Collection::bookCSCHistos | ( | const HistoId | hid, |
const HwId | crateId, | ||
const HwId | dmbId, | ||
const HwId | addId | ||
) | const |
Book Chamber Histogram with additional identifier (On Demand)
hid | Histogram Identifier |
crateId | CSC Crate Id |
dmbId | CSC DMB Id |
addId | CSC Additional identifier, ex. Layer Id, ALCT Id, etc. |
Definition at line 406 of file CSCDQM_Collection.cc.
References book(), collection, mps_fire::i, and cscdqm::h::names.
void cscdqm::Collection::bookDDUHistos | ( | const HwId | dduId | ) | const |
Book DDU histograms.
dduId | DDU Id |
Definition at line 348 of file CSCDQM_Collection.cc.
References book(), collection, cscdqm::HistoDef::getHistoIdByName(), getHistoValue(), mps_fire::i, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, cscdqm::XML_BOOK_ONDEMAND, and cscdqm::XML_BOOK_ONDEMAND_FALSE.
Referenced by cscdqm::Dispatcher::book(), and cscdqm::Dispatcher::getHisto().
void cscdqm::Collection::bookEMUHistos | ( | ) | const |
Book EMU histograms.
Definition at line 304 of file CSCDQM_Collection.cc.
References book(), collection, cscdqm::HistoDef::getHistoIdByName(), getHistoValue(), mps_fire::i, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, cscdqm::XML_BOOK_ONDEMAND, and cscdqm::XML_BOOK_ONDEMAND_FALSE.
Referenced by cscdqm::Dispatcher::book().
void cscdqm::Collection::bookFEDHistos | ( | const HwId | fedId | ) | const |
Book FED histograms.
fedId | FED Id |
Definition at line 326 of file CSCDQM_Collection.cc.
References book(), collection, cscdqm::HistoDef::getHistoIdByName(), getHistoValue(), mps_fire::i, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, cscdqm::XML_BOOK_ONDEMAND, and cscdqm::XML_BOOK_ONDEMAND_FALSE.
Referenced by cscdqm::Dispatcher::book(), and cscdqm::Dispatcher::getHisto().
|
staticprivate |
Find string histogram value in map.
h | Histogram map |
name | parameter name |
value | handler for parameter value |
Definition at line 182 of file CSCDQM_Collection.cc.
References mps_fire::i.
Referenced by book(), bookCSCHistos(), and getHistoValue().
|
staticprivate |
get Histogram int value out of the map and return boolean result
h | Histogram map |
name | parameter name |
value | handler for parameter value |
Definition at line 198 of file CSCDQM_Collection.cc.
References mps_fire::i, and relativeConstraints::value.
|
staticprivate |
get Histogram double value out of the map and return boolean result
h | Histogram map |
name | parameter name |
value | handler for parameter value |
Definition at line 217 of file CSCDQM_Collection.cc.
References mps_fire::i, and relativeConstraints::value.
|
staticprivate |
Find string histogram value in map.
h | Histogram map |
name | parameter name |
value | handler for parameter value |
def_value | default value if parameter not found |
Definition at line 236 of file CSCDQM_Collection.cc.
References checkHistoValue(), and relativeConstraints::value.
Referenced by book(), bookCSCHistos(), bookDDUHistos(), bookEMUHistos(), bookFEDHistos(), and isOnDemand().
|
staticprivate |
get Histogram int value out of the map and
h | Histogram map |
name | parameter name |
value | handler for parameter value |
def_value | default value if parameter not found |
Definition at line 251 of file CSCDQM_Collection.cc.
References checkHistoValue(), and relativeConstraints::value.
|
staticprivate |
get Histogram double value out of the map and
h | Histogram map |
name | parameter name |
value | handler for parameter value |
def_value | default value if parameter not found |
Definition at line 266 of file CSCDQM_Collection.cc.
References checkHistoValue(), and relativeConstraints::value.
|
staticprivate |
Extract and write single histogram properties from XML node to map.
node | XML node |
p | List of properties to fill |
Definition at line 147 of file CSCDQM_Collection.cc.
References ws_sso_content_reader::content, mps_fire::i, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, relativeConstraints::value, and XERCES_CPP_NAMESPACE_QUALIFIER.
Referenced by load().
const bool cscdqm::Collection::isOnDemand | ( | const HistoName & | name | ) | const |
Check if the histogram is on demand (by histogram name)
name | name of the histogram |
Definition at line 605 of file CSCDQM_Collection.cc.
References collection, getHistoValue(), mps_fire::i, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, cscdqm::XML_BOOK_ONDEMAND, cscdqm::XML_BOOK_ONDEMAND_FALSE, and cscdqm::XML_BOOK_ONDEMAND_TRUE.
Referenced by cscdqm::Dispatcher::getHisto().
void cscdqm::Collection::load | ( | ) |
Load XML file and fill definition map(s)
Load histogram definition
Load histogram
Definition at line 40 of file CSCDQM_Collection.cc.
References collection, edmIntegrityCheck::d, reco::dp, MillePedeFileConverter_cfg::e, Exception, getNodeProperties(), h, AnalysisDataFormats_SUSYBSMObjects::hp, mps_fire::i, hcalTTPDigis_cfi::id, LOG_INFO, python.rootplot.argparse::message, dataset::name, createfilelist::parser, tablePrinter::prefix, cscdqm::Utility::regexMatch(), cscdqm::REGEXP_ONDEMAND(), AlCaHLTBitMon_QueryRunRegistry::string, cms::concurrency::xercesInitialize(), cms::concurrency::xercesTerminate(), cscdqm::XML_BOOK_DEFINITION, cscdqm::XML_BOOK_DEFINITION_ID, cscdqm::XML_BOOK_DEFINITION_REF, cscdqm::XML_BOOK_HISTO_NAME, cscdqm::XML_BOOK_HISTO_PREFIX, cscdqm::XML_BOOK_HISTOGRAM, cscdqm::XML_BOOK_ONDEMAND, cscdqm::XML_BOOK_ONDEMAND_FALSE, and cscdqm::XML_BOOK_ONDEMAND_TRUE.
Referenced by cscdqm::Dispatcher::init().
|
staticprivate |
Parse Axis label string and return values in vector.
s | source string to parse |
labels | pointer to result vector |
Definition at line 279 of file CSCDQM_Collection.cc.
References diffTwoXMLs::label, NULL, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and tmp.
Referenced by book().
void cscdqm::Collection::printCollection | ( | ) | const |
Print collection of available histograms and their parameters.
Definition at line 622 of file CSCDQM_Collection.cc.
References collection, and LOG_INFO.
|
private |
Definition at line 113 of file CSCDQM_Collection.h.
Referenced by bookCSCHistos(), bookDDUHistos(), bookEMUHistos(), bookFEDHistos(), isOnDemand(), load(), and printCollection().
|
private |
Definition at line 112 of file CSCDQM_Collection.h.