CMS 3D CMS Logo

CSCDQM_Configuration.h
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: Configuration.h
5  *
6  * Description: CSCDQM Configuration parameter storage
7  *
8  * Version: 1.0
9  * Created: 10/03/2008 10:26:04 AM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius, valdas.rapsevicius@cern.ch
14  * Company: CERN, CH
15  *
16  * =====================================================================================
17  */
18 
19 #ifndef CSCDQM_Configuration_H
20 #define CSCDQM_Configuration_H
21 
22 #include <string>
23 #include <sstream>
24 #include <functional>
25 
26 #include <xercesc/parsers/XercesDOMParser.hpp>
27 #include <xercesc/dom/DOMNodeList.hpp>
28 #include <xercesc/dom/DOMElement.hpp>
29 #include <xercesc/dom/DOMComment.hpp>
30 #include <xercesc/sax/ErrorHandler.hpp>
31 #include <xercesc/sax/SAXParseException.hpp>
32 #include <xercesc/dom/DOMImplementation.hpp>
33 #include <xercesc/framework/StdOutFormatTarget.hpp>
34 #include <xercesc/dom/DOM.hpp>
35 
36 #include <boost/multi_index_container.hpp>
37 #include <boost/multi_index/member.hpp>
38 #include <boost/multi_index/composite_key.hpp>
39 #include <boost/multi_index/ordered_index.hpp>
40 #include "boost/tuple/tuple.hpp"
41 
42 #include <boost/preprocessor/tuple/elem.hpp>
43 #include <boost/preprocessor/seq/for_each_i.hpp>
44 #include <boost/preprocessor/stringize.hpp>
45 #include <boost/preprocessor/cat.hpp>
46 #include <boost/preprocessor/comparison/equal.hpp>
47 
48 #include <boost/timer.hpp>
49 
51 #ifdef DQMGLOBAL
52 
54 
55 #endif
56 
58 #include "CSCDQM_Exception.h"
59 #include "CSCDQM_Utility.h"
60 #include "CSCDQM_Logger.h"
61 
63 #define CONFIG_PARAMETERS_SEQ_LEN 4
64 
69 #define CONFIG_PARAMETERS_SEQ \
70  \
71  ((bool, PROCESS_DDU, true, "enter DDU (and latter Chamber) sections (EventProcessor flag)"))( \
72  (bool, PROCESS_CSC, true, "enter Chamber section (EventProcessor flag)"))( \
73  (bool, PROCESS_EFF_HISTOS, true, "calculate efficiency histograms (Dispatcher flag)"))(( \
74  bool, PROCESS_EFF_PARAMETERS, true, "calculate efficiency parameters (EventProcessor flag)"))(( \
75  bool, BINCHECKER_CRC_ALCT, false, "check ALCT CRC (CSCDCCExaminer flag)"))(( \
76  bool, BINCHECKER_CRC_CLCT, false, "check CLCT CRC (CSCDCCExaminer flag)"))(( \
77  bool, BINCHECKER_CRC_CFEB, false, "check CFEB CRC (CSCDCCExaminer flag)"))(( \
78  bool, BINCHECKER_MODE_DDU, true, "set DDU mode (CSCDCCExaminer flag)"))(( \
79  bool, BINCHECKER_OUTPUT, false, "print 1 and 2 output (CSCDCCExaminer flag)"))(( \
80  bool, \
81  FRAEFF_AUTO_UPDATE, \
82  false, \
83  "start fractional and efficiency histogram update automatically (Dispatcher flag)"))(( \
84  bool, \
85  FRAEFF_SEPARATE_THREAD, \
86  false, \
87  "start fractional and efficiency histogram update on separate thread (EventProcessor flag)"))(( \
88  bool, PRINT_STATS_ON_EXIT, true, "print statistics on exit (destruction)"))(( \
89  bool, IN_FULL_STANDBY, true, "full detector is in standby mode from the beginning of the run"))(( \
90  std::string, BOOKING_XML_FILE, "", "histogram description (booking) file in XML format (Collection)"))(( \
91  std::string, FOLDER_EMU, "", "root file folder name to be used for EMU histograms (EventProcessor)"))(( \
92  std::string, FOLDER_DDU, "", "root file folder name to be used for DDU histograms (EventProcessor)"))(( \
93  std::string, FOLDER_CSC, "", "root file folder name to be used for CSC histograms (EventProcessor)"))(( \
94  std::string, FOLDER_PAR, "", "root file folder name to be used for parameters (EventProcessor)"))(( \
95  unsigned int, \
96  DDU_CHECK_MASK, \
97  0xFFFFFFFF, \
98  "mask for cumulative EmuFileReader DDU error flags (EventProcessor)"))(( \
99  unsigned int, DDU_BINCHECK_MASK, 0x02080016, "mask for DDU level examiner errors (CSCDCCExaminer)"))(( \
100  unsigned int, BINCHECK_MASK, 0xFFFFFFFF, "mask for chamber level examiner errors (CSCDCCExaminer)"))(( \
101  unsigned int, \
102  FRAEFF_AUTO_UPDATE_START, \
103  5, \
104  "event number to start automatic fractional and efficiency histogram updates from (Dispatcer)"))(( \
105  unsigned int, \
106  FRAEFF_AUTO_UPDATE_FREQ, \
107  1, \
108  "frequency in events to perform automatic fractional and efficiency histogram updates (Dispatcher)"))(( \
109  double, \
110  EFF_COLD_THRESHOLD, \
111  0.1, \
112  "threshold in fraction to check for cold (not reporting) HW (EventProcessor)"))(( \
113  double, EFF_COLD_SIGFAIL, 5.0, "statistical significance for cold (not reporting) HW (EventProcessor)"))(( \
114  double, EFF_HOT_THRESHOLD, 0.1, "threshold in fraction to check for hot HW (EventProcessor)"))(( \
115  double, EFF_HOT_SIGFAIL, 5.0, "statistical significance for hot HW (EventProcessor)"))(( \
116  double, EFF_ERR_THRESHOLD, 0.1, "threshold in fraction to check for errors in HW (EventProcessor)"))(( \
117  double, EFF_ERR_SIGFAIL, 5.0, "statistical significance for errors in HW (EventProcessor)"))(( \
118  double, \
119  EFF_NODATA_THRESHOLD, \
120  0.1, \
121  "threshold in fraction to check for not reporting elements in HW (EventProcessor)"))(( \
122  double, EFF_NODATA_SIGFAIL, 5.0, "statistical significance for not reportingelements in HW (EventProcessor)"))(( \
123  unsigned int, EVENTS_ECHO, 1000, "frequency in events to print echo message (EventProcessor)"))(( \
124  std::string, FOLDER_FED, "", "root file folder name to be used for FED histograms (EventProcessor)"))(( \
125  bool, PREBOOK_ALL_HISTOS, true, "pre-book all FED, DDU, CSC histogragrams before run begins"))
126 
132 #define CONFIG_PARAMETER_DEFINE_MACRO(r, data, i, elem) \
133  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem);
134 
136 #define CONFIG_PARAMETER_DEFAULT_MACRO(r, data, i, elem) \
137  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem) = BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem);
138 
140 #define CONFIG_PARAMETER_GETTER_MACRO(r, data, i, elem) \
141  const BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) \
142  BOOST_PP_CAT(get, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))() const { \
143  return BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem); \
144  }
145 
147 #define CONFIG_PARAMETER_SETTER_MACRO(r, data, i, elem) \
148  void BOOST_PP_CAT(set, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))( \
149  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) p) { \
150  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem) = p; \
151  }
152 
153 #ifdef DQMGLOBAL
154 
156 #define CONFIG_PARAMETER_LOADPS_MACRO(r, data, i, elem) \
157  BOOST_PP_CAT(set, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)) \
158  (ps.getUntrackedParameter<BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem)>( \
159  BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)), \
160  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem)));
161 
162 #endif
163 
164 #ifdef DQMLOCAL
165 
167 #define CONFIG_PARAMETER_LOADXML_MACRO(r, data, i, elem) \
168  if (nodeName.compare(BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))) == 0) { \
169  stm >> BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem); \
170  continue; \
171  }
172 
174 #define CONFIG_PARAMETER_PRINTXML_MACRO(r, data, i, elem) \
175  { \
176  DOMComment* comment = \
177  doc->createComment(XERCES_TRANSCODE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 3, elem))); \
178  DOMElement* el = doc->createElement( \
179  XERCES_TRANSCODE(BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)))); \
180  std::string value = toString(config.BOOST_PP_CAT(get, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))()); \
181  DOMText* tdata = doc->createTextNode(XERCES_TRANSCODE(value.c_str())); \
182  el->appendChild(tdata); \
183  rootElem->appendChild(comment); \
184  rootElem->appendChild(el); \
185  }
186 
187 #endif
188 
189 namespace cscdqm {
190 
192  struct MOFilterItem {
194  TPRegexp pattern;
196  bool include;
198  MOFilterItem(const std::string pattern_, const bool include_) : pattern(pattern_.c_str()), include(include_) {}
199  };
200 
210  };
211 
213  typedef std::map<ChamberCounterType, uint32_t> ChamberCounterMapType;
214 
220  ChamberCounterKeyType(const HwId& crateId_, const HwId& dmbId_, const ChamberCounterMapType& c_)
221  : crateId(crateId_), dmbId(dmbId_), counters(c_) {}
222  };
223 
225  typedef boost::multi_index_container<
226  ChamberCounterKeyType,
227  boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::composite_key<
228  ChamberCounterKeyType,
229  boost::multi_index::member<ChamberCounterKeyType, HwId, &ChamberCounterKeyType::crateId>,
230  boost::multi_index::member<ChamberCounterKeyType, HwId, &ChamberCounterKeyType::dmbId> > > > >
232 
238  private:
239  unsigned short printStatsLocal;
240 
242  std::vector<MOFilterItem> MOFilterItems;
243 
245  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_DEFINE_MACRO, _, CONFIG_PARAMETERS_SEQ)
246 
247 
251  void init() {
253  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_DEFAULT_MACRO, _, CONFIG_PARAMETERS_SEQ)
254  reset();
255  }
256 
257  public:
264 
269  std::function<bool(const HistoId id, const HwId& id1, const HwId& id2, const HwId& id3, MonitorObject*& mo)>
273  std::function<bool(unsigned int&, unsigned int&, unsigned int&)> fnNextBookedCSC;
274  std::function<bool(unsigned int&, unsigned int&)> fnIsBookedCSC;
277 
280 
282  std::function<bool(const unsigned int, const unsigned int, CSCDetId&)> fnGetCSCDetId;
283 
285  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_GETTER_MACRO, _, CONFIG_PARAMETERS_SEQ)
286 
287 
288  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_SETTER_MACRO, _, CONFIG_PARAMETERS_SEQ)
289 
290 
294  init();
295  printStatsLocal = 0;
296  }
297 
302  Configuration(const bool printStats) {
303  init();
304  if (printStats) {
305  printStatsLocal = 1;
306  } else {
307  printStatsLocal = 2;
308  }
309  }
310 
315  if ((PRINT_STATS_ON_EXIT && printStatsLocal == 0) || printStatsLocal == 1) {
316  printStats();
317  }
318  }
319 
320 #ifdef DQMLOCAL
321 
327  void load(const std::string& configFile) {
329 
330  {
331  XercesDOMParser parser;
332 
334  parser.setErrorHandler(&eh);
335 
336  parser.parse(configFile.c_str());
337  DOMDocument* doc = parser.getDocument();
338  DOMNode* docNode = (DOMNode*)doc->getDocumentElement();
339 
340  DOMNodeList* itemList = docNode->getChildNodes();
341  for (XMLSize_t i = 0; i < itemList->getLength(); i++) {
342  DOMNode* node = itemList->item(i);
343  if (node->getNodeType() != DOMNode::ELEMENT_NODE) {
344  continue;
345  }
346 
347  std::string nodeName = XMLString::transcode(node->getNodeName());
348  std::string value = XMLString::transcode(node->getTextContent());
349  std::istringstream stm(value);
350 
351  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_LOADXML_MACRO, _, CONFIG_PARAMETERS_SEQ)
352 
353  if (nodeName.compare("MO_FILTER") == 0) {
354  DOMNodeList* filterList = node->getChildNodes();
355  for (XMLSize_t j = 0; j < filterList->getLength(); j++) {
356  DOMNode* filter = filterList->item(j);
357  if (filter->getNodeType() != DOMNode::ELEMENT_NODE) {
358  continue;
359  }
360  std::string filterName = XMLString::transcode(filter->getNodeName());
361  std::string filterValue = XMLString::transcode(filter->getTextContent());
362  MOFilterItems.insert(MOFilterItems.end(),
363  MOFilterItem(filterValue, (filterName.compare("INCLUDE") == 0)));
364  }
365  }
366  }
367  }
368 
370  }
371 
377  static void printXML(const Configuration& config) {
379 
380  DOMImplementation* domImpl = DOMImplementationRegistry::getDOMImplementation(XERCES_TRANSCODE("core"));
381  DOMDocument* doc = domImpl->createDocument(0, XERCES_TRANSCODE("processor_configuration"), 0);
382  DOMElement* rootElem = doc->getDocumentElement();
383 
384  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_PRINTXML_MACRO, _, CONFIG_PARAMETERS_SEQ)
385 
386  DOMLSSerializer* ser = domImpl->createLSSerializer();
387  if (ser->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) {
388  ser->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true);
389  }
390  XMLFileErrorHandler eh;
391  ser->setErrorHandler((DOMErrorHandler*)&eh);
392  ser->writeNode(new StdOutFormatTarget(), *doc);
393 
394  doc->release();
396  }
397 
398 #endif
399 
400 #ifdef DQMGLOBAL
401 
407  void load(const edm::ParameterSet& ps) {
408  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_LOADPS_MACRO, _, CONFIG_PARAMETERS_SEQ)
409  std::vector<std::string> moFilter = ps.getUntrackedParameter<std::vector<std::string> >("MO_FILTER");
410  for (std::vector<std::string>::iterator it = moFilter.begin(); it != moFilter.end(); it++) {
411  std::string f = *it;
412  if (!Utility::regexMatch("^[-+]/.*/$", f)) {
413  LOG_WARN << "MO_FILTER item " << f << " does not recognized to be a valid one. Skipping...";
414  continue;
415  }
416  bool include = Utility::regexMatch("^[+]", f);
417  Utility::regexReplace("^./(.*)/$", f, "$1");
418  MOFilterItems.insert(MOFilterItems.end(), MOFilterItem(f, include));
419  }
420  }
421 
422 #endif
423 
428  private:
430  boost::timer globalTimer;
431 
433  boost::timer eventTimer;
434 
436  boost::timer fraTimer;
437 
439  boost::timer effTimer;
440 
442  double eventTimeSum;
443 
445  double fraTimeSum;
446 
448  double effTimeSum;
449 
450  public:
452 #define STATFIELD(caption, value, units) \
453  logger << std::setfill(' '); \
454  logger << std::setiosflags(std::ios::right) << std::setw(25) << caption << " : "; \
455  logger << std::setiosflags(std::ios::right) << std::setw(12); \
456  if (((double)value) < 0) { \
457  logger << "NA"; \
458  } else { \
459  logger << value; \
460  } \
461  logger << std::setiosflags(std::ios::left) << std::setw(2) << units; \
462  logger << std::endl;
463 
465 #define SEPFIELD \
466  logger << std::setfill('-'); \
467  logger << std::setw(25) << ""; \
468  logger << std::setw(10) << ""; \
469  logger << std::setw(2) << ""; \
470  logger << std::endl;
471 
476  void printStats() {
477  double allTime = globalTimer.elapsed();
478  LogInfo logger;
479  logger << std::endl;
480 
481  STATFIELD("Events processed", nEvents, "")
482  STATFIELD("Bad events", nEventsBad, "")
483  STATFIELD("Good events", nEventsGood, "")
484  STATFIELD("CSC DCC events", nEventsCSC, "")
485  STATFIELD("Unpacked CSCs", nUnpackedCSC, "")
486 
487  SEPFIELD
488 
489  STATFIELD("All event time", eventTimeSum, "s")
490  double eventTimeAverage = (nEvents > 0 ? eventTimeSum / nEvents : -1.0);
491  STATFIELD("Avg. event time", eventTimeAverage, "s")
492  double eventRateAverage = (eventTimeSum > 0 ? nEvents / eventTimeSum : -1.0);
493  STATFIELD("Avg. event rate", eventRateAverage, "Hz")
494  double chamberRateAverage = (eventTimeSum > 0 ? nUnpackedCSC / eventTimeSum : -1.0);
495  STATFIELD("Avg. chamber rate", chamberRateAverage, "Hz")
496 
497  SEPFIELD
498 
499  STATFIELD("All fra update time", fraTimeSum, "s")
500  STATFIELD("All fra update count", fraCount, "")
501  double fraTimeAverage = (fraCount > 0 ? fraTimeSum / fraCount : -1.0);
502  STATFIELD("Avg. fra update time", fraTimeAverage, "s")
503 
504  SEPFIELD
505 
506  STATFIELD("All eff update time", effTimeSum, "s")
507  STATFIELD("All eff update count", effCount, "")
508  double effTimeAverage = (effCount > 0 ? effTimeSum / effCount : -1.0);
509  STATFIELD("Avg. eff update time", effTimeAverage, "s")
510 
511  SEPFIELD
512 
513  STATFIELD("All time", allTime, "s")
514  double allTimeAverage = (nEvents > 0 ? allTime / nEvents : -1.0);
515  STATFIELD("Avg. event all time", allTimeAverage, "s")
516  double allRateAverage = (allTime > 0 ? nEvents / allTime : -1.0);
517  STATFIELD("Avg. event all rate", allRateAverage, "Hz")
518  double chamberAllRateAverage = (allTime > 0 ? nUnpackedCSC / allTime : -1.0);
519  STATFIELD("Avg. chamber all rate", chamberAllRateAverage, "Hz")
520  }
521 
522 #undef STATFIELD
523 #undef SEPFIELD
524 
530  void eventProcessTimer(const bool start) {
531  if (start) {
532  eventTimer.restart();
533  } else {
534  eventTimeSum += eventTimer.elapsed();
535  }
536  }
537 
543  void updateFraTimer(const bool start) {
544  if (start) {
545  fraTimer.restart();
546  } else {
547  fraTimeSum += fraTimer.elapsed();
548  fraCount++;
549  }
550  }
551 
557  void updateEffTimer(const bool start) {
558  if (start) {
559  effTimer.restart();
560  } else {
561  effTimeSum += effTimer.elapsed();
562  effCount++;
563  }
564  }
565 
571  const bool needBookMO(const std::string name) const {
572  bool result = true;
573  for (unsigned int i = 0; i < MOFilterItems.size(); i++) {
574  const MOFilterItem* filter = &MOFilterItems.at(i);
575  if (Utility::regexMatch(filter->pattern, name))
576  result = filter->include;
577  }
578  return result;
579  }
580 
585  public:
590  void reset() {
591  nEvents = 0;
592  nEventsBad = 0;
593  nEventsGood = 0;
594  nEventsCSC = 0;
595  nUnpackedCSC = 0;
596  fraCount = 0;
597  effCount = 0;
598  eventTimeSum = 0.0;
599  fraTimeSum = 0.0;
600  effTimeSum = 0.0;
601  }
602 
607  const unsigned long getNEvents() const { return nEvents; }
608  const unsigned long getNEventsBad() const { return nEventsBad; }
609  const unsigned long getNEventsGood() const { return nEventsGood; }
610  const unsigned long getNEventsCSC() const { return nEventsCSC; }
611  const unsigned long getNUnpackedCSC() const { return nUnpackedCSC; }
612 
617  void incNEvents() {
618  nEvents++;
619  if (getEVENTS_ECHO() > 0) {
620  if (getNEvents() % getEVENTS_ECHO() == 0) {
621  LOG_INFO << "(echo) Events processed: " << std::setw(12) << getNEvents();
622  }
623  }
624  }
625  void incNEventsBad() { nEventsBad++; }
627  void incNEventsCSC() { nEventsCSC++; }
629 
637  void incChamberCounter(const ChamberCounterType counter, const HwId crateId, const HwId dmbId) {
638  setChamberCounterValue(counter, crateId, dmbId, getChamberCounterValue(counter, crateId, dmbId) + 1);
639  }
640 
650  const HwId crateId,
651  const HwId dmbId,
652  const uint32_t value) {
653  ChamberMapCounterMapType::iterator it = chamberCounters.find(boost::make_tuple(crateId, dmbId));
654  if (it == chamberCounters.end()) {
655  it = chamberCounters.insert(chamberCounters.end(),
656  ChamberCounterKeyType(crateId, dmbId, ChamberCounterMapType()));
657  }
658  ChamberCounterMapType* cs = const_cast<ChamberCounterMapType*>(&it->counters);
659  ChamberCounterMapType::iterator itc = cs->find(counter);
660  if (itc == cs->end()) {
661  cs->insert(std::make_pair(counter, value));
662  } else {
663  itc->second = value;
664  }
665  }
666 
676  const ChamberCounterType counter_to,
677  const HwId crateId,
678  const HwId dmbId) {
679  setChamberCounterValue(counter_from, crateId, dmbId, getChamberCounterValue(counter_from, crateId, dmbId));
680  }
681 
690  const HwId crateId,
691  const HwId dmbId) const {
692  ChamberMapCounterMapType::iterator it = chamberCounters.find(boost::make_tuple(crateId, dmbId));
693  if (it == chamberCounters.end())
694  return 0;
695  ChamberCounterMapType::const_iterator itc = it->counters.find(counter);
696  if (itc == it->counters.end())
697  return 0;
698  return itc->second;
699  }
700 
701  private:
707  unsigned long nEvents;
708 
710  unsigned long nEventsBad;
711 
713  unsigned long nEventsGood;
714 
716  unsigned long nEventsCSC;
717 
719  unsigned long nUnpackedCSC;
720 
722  unsigned long fraCount;
723 
725  unsigned long effCount;
726 
729  };
730 
731 } // namespace cscdqm
732 
733 #undef CONFIG_PARAMETERS_SEQ_LEN
734 #undef CONFIG_PARAMETERS_SEQ
735 #undef CONFIG_PARAMETER_DEFINE_MACRO
736 #undef CONFIG_PARAMETER_DEFAULT_MACRO
737 #undef CONFIG_PARAMETER_GETTER_MACRO
738 #undef CONFIG_PARAMETER_SETTER_MACRO
739 #undef CONFIG_PARAMETER_LOADPS_MACRO
740 #undef CONFIG_PARAMETER_LOADXML_MACRO
741 #undef CONFIG_PARAMETER_PRINTXML_MACRO
742 
743 #endif
cscdqm::Configuration::fnIsBookedCSC
std::function< bool(unsigned int &, unsigned int &)> fnIsBookedCSC
Definition: CSCDQM_Configuration.h:274
cscdqm::Configuration::nEventsCSC
unsigned long nEventsCSC
Definition: CSCDQM_Configuration.h:716
cscdqm::Configuration::incNEventsBad
void incNEventsBad()
Definition: CSCDQM_Configuration.h:625
CSCDQM_Logger.h
cscdqm::Configuration::printStatsLocal
unsigned short printStatsLocal
Definition: CSCDQM_Configuration.h:239
counter
Definition: counter.py:1
cscdqm::Configuration::fnIsBookedDDU
std::function< bool(unsigned int &)> fnIsBookedDDU
Definition: CSCDQM_Configuration.h:275
cscdqm::ChamberCounterKeyType::counters
ChamberCounterMapType counters
Definition: CSCDQM_Configuration.h:219
cscdqm::Configuration::eventProcessTimer
void eventProcessTimer(const bool start)
Switch on/off event processing timer.
Definition: CSCDQM_Configuration.h:530
cscdqm::Configuration::Configuration
Configuration()
Constructor.
Definition: CSCDQM_Configuration.h:293
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
start
Definition: start.py:1
cscdqm::HistoDef
Abstract Base Histogram Definition.
Definition: CSCDQM_HistoDef.h:62
cscdqm::HistoId
unsigned int HistoId
Definition: CSCDQM_HistoDef.h:35
cscdqm::ChamberMapCounterMapType
boost::multi_index_container< ChamberCounterKeyType, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::composite_key< ChamberCounterKeyType, boost::multi_index::member< ChamberCounterKeyType, HwId, &ChamberCounterKeyType::crateId >, boost::multi_index::member< ChamberCounterKeyType, HwId, &ChamberCounterKeyType::dmbId > > > > > ChamberMapCounterMapType
Definition: CSCDQM_Configuration.h:231
cscdqm::Configuration::updateEffTimer
void updateEffTimer(const bool start)
Switch on/off efficiency MO processing timer.
Definition: CSCDQM_Configuration.h:557
cscdqm::Configuration::nEvents
unsigned long nEvents
Definition: CSCDQM_Configuration.h:707
cscdqm::MOFilterItem::MOFilterItem
MOFilterItem(const std::string pattern_, const bool include_)
Definition: CSCDQM_Configuration.h:198
SEPFIELD
#define SEPFIELD
Definition: CSCDQM_Configuration.h:465
boostedTaus_cff.doc
doc
Definition: boostedTaus_cff.py:20
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
cscdqm::Configuration::fnGetCacheDDUHisto
std::function< bool(const HistoId id, const HwId &id1, MonitorObject *&mo)> fnGetCacheDDUHisto
Definition: CSCDQM_Configuration.h:268
logger
Definition: logger.py:1
cscdqm::BAD_EVENTS
Definition: CSCDQM_Configuration.h:204
cscdqm::Configuration::fnGetCacheParHisto
std::function< bool(const HistoId id, MonitorObject *&mo)> fnGetCacheParHisto
Definition: CSCDQM_Configuration.h:271
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:47
cscdqm::Configuration::fnBook
std::function< MonitorObject *(const HistoBookRequest &)> fnBook
Definition: CSCDQM_Configuration.h:279
cscdqm::EVENT_DISPLAY_PLOT
Definition: CSCDQM_Configuration.h:209
globals_cff.id1
id1
Definition: globals_cff.py:33
crabWrapper._
_
Definition: crabWrapper.py:19
cscdqm::Configuration::nEventsGood
unsigned long nEventsGood
Definition: CSCDQM_Configuration.h:713
CSCDQM_Utility.h
cscdqm::Configuration::fnPutHisto
std::function< void(const HistoDef &histoT, MonitorObject *&)> fnPutHisto
Definition: CSCDQM_Configuration.h:272
cscdqm::DMB_TRIGGERS
Definition: CSCDQM_Configuration.h:205
cscdqm::Configuration::effCount
unsigned long effCount
Definition: CSCDQM_Configuration.h:725
cscdqm::Configuration::getNEventsBad
const unsigned long getNEventsBad() const
Definition: CSCDQM_Configuration.h:608
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
cscdqm::Utility::regexMatch
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
Definition: CSCDQM_Utility.cc:166
cscdqm::ChamberCounterKeyType::crateId
HwId crateId
Definition: CSCDQM_Configuration.h:217
LOG_INFO
#define LOG_INFO
Definition: CSCDQM_Logger.h:42
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
cscdqm::Configuration::effTimer
boost::timer effTimer
Definition: CSCDQM_Configuration.h:439
cscdqm::Configuration::effTimeSum
double effTimeSum
Definition: CSCDQM_Configuration.h:448
cscdqm::Configuration::eventTimer
boost::timer eventTimer
Definition: CSCDQM_Configuration.h:433
cscdqm::Configuration::nEventsBad
unsigned long nEventsBad
Definition: CSCDQM_Configuration.h:710
cscdqm::Configuration::fraTimer
boost::timer fraTimer
Definition: CSCDQM_Configuration.h:436
cscdqm::CFEB_TRIGGERS
Definition: CSCDQM_Configuration.h:208
cscdqm::Configuration::fnNextBookedCSC
std::function< bool(unsigned int &, unsigned int &, unsigned int &)> fnNextBookedCSC
Definition: CSCDQM_Configuration.h:273
cscdqm::Configuration::printStats
void printStats()
Print Statistics on Exit (Destruction)
Definition: CSCDQM_Configuration.h:476
cscdqm::Configuration::incNEvents
void incNEvents()
Definition: CSCDQM_Configuration.h:617
cscdqm::Configuration::chamberCounters
ChamberMapCounterMapType chamberCounters
Definition: CSCDQM_Configuration.h:728
cscdqm::ChamberCounterKeyType
Chamber Counters key type.
Definition: CSCDQM_Configuration.h:216
fwlog::logger
std::ostream & logger()
Definition: fwLog.cc:36
cscdqm::Configuration::fnGetCSCDetId
std::function< bool(const unsigned int, const unsigned int, CSCDetId &)> fnGetCSCDetId
Definition: CSCDQM_Configuration.h:282
cscdqm::Configuration::incNUnpackedCSC
void incNUnpackedCSC()
Definition: CSCDQM_Configuration.h:628
config
Definition: config.py:1
cscdqm::XMLFileErrorHandler
Takes care of errors and warnings while parsing XML files file in XML format.
Definition: CSCDQM_Exception.h:54
cscdqm::Configuration::getNUnpackedCSC
const unsigned long getNUnpackedCSC() const
Definition: CSCDQM_Configuration.h:611
cscdqm::Configuration::fnGetCacheCSCHisto
std::function< bool(const HistoId id, const HwId &id1, const HwId &id2, const HwId &id3, MonitorObject *&mo)> fnGetCacheCSCHisto
Definition: CSCDQM_Configuration.h:270
cscdqm::Configuration::incNEventsCSC
void incNEventsCSC()
Definition: CSCDQM_Configuration.h:627
cscdqm::HwId
unsigned int HwId
Definition: CSCDQM_HistoDef.h:38
CSCDQM_MonitorObjectProvider.h
CSCDQM_Exception.h
cscdqm::Configuration::nUnpackedCSC
unsigned long nUnpackedCSC
Definition: CSCDQM_Configuration.h:719
cscdqm::ChamberCounterType
ChamberCounterType
Chamber level counter types.
Definition: CSCDQM_Configuration.h:202
CONFIG_PARAMETER_SETTER_MACRO
#define CONFIG_PARAMETER_SETTER_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:147
svgfig.load
def load(fileName)
Definition: svgfig.py:547
cscdqm::Configuration::fraTimeSum
double fraTimeSum
Definition: CSCDQM_Configuration.h:445
cscdqm::DMB_EVENTS
Definition: CSCDQM_Configuration.h:203
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
cscdqm::Configuration::fnIsBookedFED
std::function< bool(unsigned int &)> fnIsBookedFED
Definition: CSCDQM_Configuration.h:276
cscdqm::Configuration::getNEvents
const unsigned long getNEvents() const
Definition: CSCDQM_Configuration.h:607
cscdqm::HistoBookRequest
Definition: CSCDQM_MonitorObjectProvider.h:31
CONFIG_PARAMETER_GETTER_MACRO
#define CONFIG_PARAMETER_GETTER_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:140
cscdqm::ChamberCounterMapType
std::map< ChamberCounterType, uint32_t > ChamberCounterMapType
Definition: CSCDQM_Configuration.h:213
cscdqm::Configuration::getNEventsCSC
const unsigned long getNEventsCSC() const
Definition: CSCDQM_Configuration.h:610
edm::ParameterSet
Definition: ParameterSet.h:47
cscdqm::Configuration::eventTimeSum
double eventTimeSum
Definition: CSCDQM_Configuration.h:442
cscdqm::Configuration::fnGetHisto
std::function< bool(const HistoDef &histoT, MonitorObject *&)> fnGetHisto
Definition: CSCDQM_Configuration.h:263
cscdqm
Definition: CSCDQM_DCSBase.h:29
cscdqm::Configuration::fraCount
unsigned long fraCount
Definition: CSCDQM_Configuration.h:722
CSCDetId
Definition: CSCDetId.h:26
cscdqm::Configuration::globalTimer
boost::timer globalTimer
Definition: CSCDQM_Configuration.h:430
CONFIG_PARAMETERS_SEQ
#define CONFIG_PARAMETERS_SEQ
Definition: CSCDQM_Configuration.h:69
STATFIELD
#define STATFIELD(caption, value, units)
Definition: CSCDQM_Configuration.h:452
cscdqm::ALCT_TRIGGERS
Definition: CSCDQM_Configuration.h:206
cms::concurrency::xercesTerminate
void xercesTerminate()
Definition: Xerces.cc:23
value
Definition: value.py:1
cscdqm::Configuration::fnGetCacheEMUHisto
std::function< bool(const HistoId id, MonitorObject *&mo)> fnGetCacheEMUHisto
Definition: CSCDQM_Configuration.h:266
cscdqm::CLCT_TRIGGERS
Definition: CSCDQM_Configuration.h:207
cscdqm::ChamberCounterKeyType::ChamberCounterKeyType
ChamberCounterKeyType(const HwId &crateId_, const HwId &dmbId_, const ChamberCounterMapType &c_)
Definition: CSCDQM_Configuration.h:220
cscdqm::MOFilterItem::include
bool include
Definition: CSCDQM_Configuration.h:196
cscdqm::LogInfo
Information level logger. Use LOG_INFO macros instead, i.e. LOG_INFO << "x = " << x;.
Definition: CSCDQM_Logger.h:58
CONFIG_PARAMETER_DEFINE_MACRO
#define CONFIG_PARAMETER_DEFINE_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:132
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cscdqm::Configuration::copyChamberCounterValue
void copyChamberCounterValue(const ChamberCounterType counter_from, const ChamberCounterType counter_to, const HwId crateId, const HwId dmbId)
Copy Chamber counter value from one counter to another.
Definition: CSCDQM_Configuration.h:675
cscdqm::Configuration
CSCDQM Framework Global Configuration.
Definition: CSCDQM_Configuration.h:237
cscdqm::Configuration::setChamberCounterValue
void setChamberCounterValue(const ChamberCounterType counter, const HwId crateId, const HwId dmbId, const uint32_t value)
Set Chamber counter value.
Definition: CSCDQM_Configuration.h:649
pdwgDoubleElectron_cfi.filterName
filterName
Definition: pdwgDoubleElectron_cfi.py:7
cscdqm::Configuration::getNEventsGood
const unsigned long getNEventsGood() const
Definition: CSCDQM_Configuration.h:609
init
Definition: init.py:1
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CONFIG_PARAMETER_DEFAULT_MACRO
#define CONFIG_PARAMETER_DEFAULT_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:136
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
cscdqm::Configuration::MOFilterItems
std::vector< MOFilterItem > MOFilterItems
Definition: CSCDQM_Configuration.h:242
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cscdqm::MonitorObject
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
Definition: CSCDQM_MonitorObject.h:35
cscdqm::Utility::regexReplace
static void regexReplace(const std::string &expression, std::string &message, const std::string replace="")
Replace string part that matches RegExp expression with some string.
Definition: CSCDQM_Utility.cc:177
cscdqm::Configuration::fnGetCacheFEDHisto
std::function< bool(const HistoId id, const HwId &id1, MonitorObject *&mo)> fnGetCacheFEDHisto
Definition: CSCDQM_Configuration.h:267
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
cscdqm::Configuration::reset
void reset()
Reset counters.
Definition: CSCDQM_Configuration.h:590
cscdqm::MOFilterItem
MO filter Item definition (loaded from XML/PSet)
Definition: CSCDQM_Configuration.h:192
include
bool include(const CollT &coll, const ItemT &item)
Definition: EcalDetIdToBeRecoveredProducer.cc:71
cscdqm::Configuration::needBookMO
const bool needBookMO(const std::string name) const
Check if MO is not excluded by MO Filter.
Definition: CSCDQM_Configuration.h:571
mps_fire.result
result
Definition: mps_fire.py:311
cscdqm::Configuration::init
void init()
Initialize parameter values and reset counters (used by constructors)
Definition: CSCDQM_Configuration.h:251
ParameterSet.h
LOG_WARN
#define LOG_WARN
Definition: CSCDQM_Logger.h:41
globals_cff.id2
id2
Definition: globals_cff.py:34
cscdqm::Configuration::incChamberCounter
void incChamberCounter(const ChamberCounterType counter, const HwId crateId, const HwId dmbId)
Increment Chamber counter by 1.
Definition: CSCDQM_Configuration.h:637
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
cscdqm::Configuration::getChamberCounterValue
const uint32_t getChamberCounterValue(const ChamberCounterType counter, const HwId crateId, const HwId dmbId) const
Get Chamber counter value.
Definition: CSCDQM_Configuration.h:689
cscdqm::Configuration::incNEventsGood
void incNEventsGood()
Definition: CSCDQM_Configuration.h:626
cscdqm::Configuration::~Configuration
~Configuration()
Destructor.
Definition: CSCDQM_Configuration.h:314
cms::concurrency::xercesInitialize
void xercesInitialize()
Definition: Xerces.cc:18
cscdqm::ChamberCounterKeyType::dmbId
HwId dmbId
Definition: CSCDQM_Configuration.h:218
cscdqm::Configuration::updateFraTimer
void updateFraTimer(const bool start)
Switch on/off fractional MO processing timer.
Definition: CSCDQM_Configuration.h:543
cscdqm::Configuration::Configuration
Configuration(const bool printStats)
Constructor.
Definition: CSCDQM_Configuration.h:302
cscdqm::MOFilterItem::pattern
TPRegexp pattern
Definition: CSCDQM_Configuration.h:194