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 
25 #include <xercesc/parsers/XercesDOMParser.hpp>
26 #include <xercesc/dom/DOMNodeList.hpp>
27 #include <xercesc/dom/DOMElement.hpp>
28 #include <xercesc/dom/DOMComment.hpp>
29 #include <xercesc/sax/ErrorHandler.hpp>
30 #include <xercesc/sax/SAXParseException.hpp>
31 #include <xercesc/dom/DOMImplementation.hpp>
32 #include <xercesc/framework/StdOutFormatTarget.hpp>
33 #include <xercesc/dom/DOM.hpp>
34 
35 #include <boost/multi_index_container.hpp>
36 #include <boost/multi_index/member.hpp>
37 #include <boost/multi_index/composite_key.hpp>
38 #include <boost/multi_index/ordered_index.hpp>
39 #include "boost/tuple/tuple.hpp"
40 
41 #include <boost/preprocessor/tuple/elem.hpp>
42 #include <boost/preprocessor/seq/for_each_i.hpp>
43 #include <boost/preprocessor/stringize.hpp>
44 #include <boost/preprocessor/cat.hpp>
45 #include <boost/preprocessor/comparison/equal.hpp>
46 
47 #include <boost/function.hpp>
48 #include <boost/bind.hpp>
49 
50 #include <boost/timer.hpp>
51 
53 #ifdef DQMGLOBAL
54 
56 
57 #endif
58 
60 #include "CSCDQM_Exception.h"
61 #include "CSCDQM_Utility.h"
62 #include "CSCDQM_Logger.h"
63 
65 #define CONFIG_PARAMETERS_SEQ_LEN 4
66 
71 #define CONFIG_PARAMETERS_SEQ \
72  \
73  ((bool, PROCESS_DDU, true, "enter DDU (and latter Chamber) sections (EventProcessor flag)"))( \
74  (bool, PROCESS_CSC, true, "enter Chamber section (EventProcessor flag)"))( \
75  (bool, PROCESS_EFF_HISTOS, true, "calculate efficiency histograms (Dispatcher flag)"))( \
76  (bool, PROCESS_EFF_PARAMETERS, true, "calculate efficiency parameters (EventProcessor flag)"))( \
77  (bool, BINCHECKER_CRC_ALCT, false, "check ALCT CRC (CSCDCCExaminer flag)"))( \
78  (bool, BINCHECKER_CRC_CLCT, false, "check CLCT CRC (CSCDCCExaminer flag)"))( \
79  (bool, BINCHECKER_CRC_CFEB, false, "check CFEB CRC (CSCDCCExaminer flag)"))( \
80  (bool, BINCHECKER_MODE_DDU, true, "set DDU mode (CSCDCCExaminer flag)"))( \
81  (bool, BINCHECKER_OUTPUT, false, "print 1 and 2 output (CSCDCCExaminer flag)"))( \
82  (bool, \
83  FRAEFF_AUTO_UPDATE, \
84  false, \
85  "start fractional and efficiency histogram update automatically (Dispatcher flag)"))( \
86  (bool, \
87  FRAEFF_SEPARATE_THREAD, \
88  false, \
89  "start fractional and efficiency histogram update on separate thread (EventProcessor flag)"))( \
90  (bool, PRINT_STATS_ON_EXIT, true, "print statistics on exit (destruction)"))( \
91  (bool, IN_FULL_STANDBY, true, "full detector is in standby mode from the beginning of the run"))( \
92  (std::string, BOOKING_XML_FILE, "", "histogram description (booking) file in XML format (Collection)"))( \
93  (std::string, FOLDER_EMU, "", "root file folder name to be used for EMU histograms (EventProcessor)"))( \
94  (std::string, FOLDER_DDU, "", "root file folder name to be used for DDU histograms (EventProcessor)"))( \
95  (std::string, FOLDER_CSC, "", "root file folder name to be used for CSC histograms (EventProcessor)"))( \
96  (std::string, FOLDER_PAR, "", "root file folder name to be used for parameters (EventProcessor)"))(( \
97  unsigned int, DDU_CHECK_MASK, 0xFFFFFFFF, "mask for cumulative EmuFileReader DDU error flags (EventProcessor)"))( \
98  (unsigned int, DDU_BINCHECK_MASK, 0x02080016, "mask for DDU level examiner errors (CSCDCCExaminer)"))( \
99  (unsigned int, BINCHECK_MASK, 0xFFFFFFFF, "mask for chamber level examiner errors (CSCDCCExaminer)"))( \
100  (unsigned int, \
101  FRAEFF_AUTO_UPDATE_START, \
102  5, \
103  "event number to start automatic fractional and efficiency histogram updates from (Dispatcer)"))( \
104  (unsigned int, \
105  FRAEFF_AUTO_UPDATE_FREQ, \
106  1, \
107  "frequency in events to perform automatic fractional and efficiency histogram updates (Dispatcher)"))(( \
108  double, EFF_COLD_THRESHOLD, 0.1, "threshold in fraction to check for cold (not reporting) HW (EventProcessor)"))( \
109  (double, EFF_COLD_SIGFAIL, 5.0, "statistical significance for cold (not reporting) HW (EventProcessor)"))( \
110  (double, EFF_HOT_THRESHOLD, 0.1, "threshold in fraction to check for hot HW (EventProcessor)"))( \
111  (double, EFF_HOT_SIGFAIL, 5.0, "statistical significance for hot HW (EventProcessor)"))( \
112  (double, EFF_ERR_THRESHOLD, 0.1, "threshold in fraction to check for errors in HW (EventProcessor)"))( \
113  (double, EFF_ERR_SIGFAIL, 5.0, "statistical significance for errors in HW (EventProcessor)"))( \
114  (double, \
115  EFF_NODATA_THRESHOLD, \
116  0.1, \
117  "threshold in fraction to check for not reporting elements in HW (EventProcessor)"))( \
118  (double, EFF_NODATA_SIGFAIL, 5.0, "statistical significance for not reportingelements in HW (EventProcessor)"))( \
119  (unsigned int, EVENTS_ECHO, 1000, "frequency in events to print echo message (EventProcessor)"))( \
120  (std::string, FOLDER_FED, "", "root file folder name to be used for FED histograms (EventProcessor)"))( \
121  (bool, PREBOOK_ALL_HISTOS, true, "pre-book all FED, DDU, CSC histogragrams before run begins"))
122 
128 #define CONFIG_PARAMETER_DEFINE_MACRO(r, data, i, elem) \
129  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem);
130 
132 #define CONFIG_PARAMETER_DEFAULT_MACRO(r, data, i, elem) \
133  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem) = BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem);
134 
136 #define CONFIG_PARAMETER_GETTER_MACRO(r, data, i, elem) \
137  const BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) \
138  BOOST_PP_CAT(get, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))() const { \
139  return BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem); \
140  }
141 
143 #define CONFIG_PARAMETER_SETTER_MACRO(r, data, i, elem) \
144  void BOOST_PP_CAT(set, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))( \
145  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem) p) { \
146  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem) = p; \
147  }
148 
149 #ifdef DQMGLOBAL
150 
152 #define CONFIG_PARAMETER_LOADPS_MACRO(r, data, i, elem) \
153  BOOST_PP_CAT(set, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)) \
154  (ps.getUntrackedParameter<BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 0, elem)>( \
155  BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)), \
156  BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 2, elem)));
157 
158 #endif
159 
160 #ifdef DQMLOCAL
161 
163 #define CONFIG_PARAMETER_LOADXML_MACRO(r, data, i, elem) \
164  if (nodeName.compare(BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))) == 0) { \
165  stm >> BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem); \
166  continue; \
167  }
168 
170 #define CONFIG_PARAMETER_PRINTXML_MACRO(r, data, i, elem) \
171  { \
172  DOMComment* comment = \
173  doc->createComment(XERCES_TRANSCODE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 3, elem))); \
174  DOMElement* el = doc->createElement( \
175  XERCES_TRANSCODE(BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem)))); \
176  std::string value = toString(config.BOOST_PP_CAT(get, BOOST_PP_TUPLE_ELEM(CONFIG_PARAMETERS_SEQ_LEN, 1, elem))()); \
177  DOMText* tdata = doc->createTextNode(XERCES_TRANSCODE(value.c_str())); \
178  el->appendChild(tdata); \
179  rootElem->appendChild(comment); \
180  rootElem->appendChild(el); \
181  }
182 
183 #endif
184 
185 namespace cscdqm {
186 
188  struct MOFilterItem {
190  TPRegexp pattern;
192  bool include;
194  MOFilterItem(const std::string pattern_, const bool include_) : pattern(pattern_.c_str()), include(include_) {}
195  };
196 
206  };
207 
209  typedef std::map<ChamberCounterType, uint32_t> ChamberCounterMapType;
210 
216  ChamberCounterKeyType(const HwId& crateId_, const HwId& dmbId_, const ChamberCounterMapType& c_)
217  : crateId(crateId_), dmbId(dmbId_), counters(c_) {}
218  };
219 
221  typedef boost::multi_index_container<
222  ChamberCounterKeyType,
223  boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::composite_key<
224  ChamberCounterKeyType,
225  boost::multi_index::member<ChamberCounterKeyType, HwId, &ChamberCounterKeyType::crateId>,
226  boost::multi_index::member<ChamberCounterKeyType, HwId, &ChamberCounterKeyType::dmbId> > > > >
228 
234  private:
235  unsigned short printStatsLocal;
236 
238  std::vector<MOFilterItem> MOFilterItems;
239 
241  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_DEFINE_MACRO, _, CONFIG_PARAMETERS_SEQ)
242 
243 
247  void init() {
249  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_DEFAULT_MACRO, _, CONFIG_PARAMETERS_SEQ)
250  reset();
251  }
252 
253  public:
260 
265  boost::function<bool(const HistoId id, const HwId& id1, const HwId& id2, const HwId& id3, MonitorObject*& mo)>
269  boost::function<bool(unsigned int&, unsigned int&, unsigned int&)> fnNextBookedCSC;
270  boost::function<bool(unsigned int&, unsigned int&)> fnIsBookedCSC;
273 
276 
278  boost::function<bool(const unsigned int, const unsigned int, CSCDetId&)> fnGetCSCDetId;
279 
281  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_GETTER_MACRO, _, CONFIG_PARAMETERS_SEQ)
282 
283 
284  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_SETTER_MACRO, _, CONFIG_PARAMETERS_SEQ)
285 
286 
290  init();
291  printStatsLocal = 0;
292  }
293 
298  Configuration(const bool printStats) {
299  init();
300  if (printStats) {
301  printStatsLocal = 1;
302  } else {
303  printStatsLocal = 2;
304  }
305  }
306 
311  if ((PRINT_STATS_ON_EXIT && printStatsLocal == 0) || printStatsLocal == 1) {
312  printStats();
313  }
314  }
315 
316 #ifdef DQMLOCAL
317 
323  void load(const std::string& configFile) {
325 
326  {
327  XercesDOMParser parser;
328 
330  parser.setErrorHandler(&eh);
331 
332  parser.parse(configFile.c_str());
333  DOMDocument* doc = parser.getDocument();
334  DOMNode* docNode = (DOMNode*)doc->getDocumentElement();
335 
336  DOMNodeList* itemList = docNode->getChildNodes();
337  for (XMLSize_t i = 0; i < itemList->getLength(); i++) {
338  DOMNode* node = itemList->item(i);
339  if (node->getNodeType() != DOMNode::ELEMENT_NODE) {
340  continue;
341  }
342 
343  std::string nodeName = XMLString::transcode(node->getNodeName());
344  std::string value = XMLString::transcode(node->getTextContent());
345  std::istringstream stm(value);
346 
347  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_LOADXML_MACRO, _, CONFIG_PARAMETERS_SEQ)
348 
349  if (nodeName.compare("MO_FILTER") == 0) {
350  DOMNodeList* filterList = node->getChildNodes();
351  for (XMLSize_t j = 0; j < filterList->getLength(); j++) {
352  DOMNode* filter = filterList->item(j);
353  if (filter->getNodeType() != DOMNode::ELEMENT_NODE) {
354  continue;
355  }
356  std::string filterName = XMLString::transcode(filter->getNodeName());
357  std::string filterValue = XMLString::transcode(filter->getTextContent());
358  MOFilterItems.insert(MOFilterItems.end(),
359  MOFilterItem(filterValue, (filterName.compare("INCLUDE") == 0)));
360  }
361  }
362  }
363  }
364 
366  }
367 
373  static void printXML(const Configuration& config) {
375 
376  DOMImplementation* domImpl = DOMImplementationRegistry::getDOMImplementation(XERCES_TRANSCODE("core"));
377  DOMDocument* doc = domImpl->createDocument(0, XERCES_TRANSCODE("processor_configuration"), 0);
378  DOMElement* rootElem = doc->getDocumentElement();
379 
380  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_PRINTXML_MACRO, _, CONFIG_PARAMETERS_SEQ)
381 
382  DOMLSSerializer* ser = domImpl->createLSSerializer();
383  if (ser->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) {
384  ser->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true);
385  }
386  XMLFileErrorHandler eh;
387  ser->setErrorHandler((DOMErrorHandler*)&eh);
388  ser->writeNode(new StdOutFormatTarget(), *doc);
389 
390  doc->release();
392  }
393 
394 #endif
395 
396 #ifdef DQMGLOBAL
397 
403  void load(const edm::ParameterSet& ps) {
404  BOOST_PP_SEQ_FOR_EACH_I(CONFIG_PARAMETER_LOADPS_MACRO, _, CONFIG_PARAMETERS_SEQ)
405  std::vector<std::string> moFilter = ps.getUntrackedParameter<std::vector<std::string> >("MO_FILTER");
406  for (std::vector<std::string>::iterator it = moFilter.begin(); it != moFilter.end(); it++) {
407  std::string f = *it;
408  if (!Utility::regexMatch("^[-+]/.*/$", f)) {
409  LOG_WARN << "MO_FILTER item " << f << " does not recognized to be a valid one. Skipping...";
410  continue;
411  }
412  bool include = Utility::regexMatch("^[+]", f);
413  Utility::regexReplace("^./(.*)/$", f, "$1");
414  MOFilterItems.insert(MOFilterItems.end(), MOFilterItem(f, include));
415  }
416  }
417 
418 #endif
419 
424  private:
426  boost::timer globalTimer;
427 
429  boost::timer eventTimer;
430 
432  boost::timer fraTimer;
433 
435  boost::timer effTimer;
436 
438  double eventTimeSum;
439 
441  double fraTimeSum;
442 
444  double effTimeSum;
445 
446  public:
448 #define STATFIELD(caption, value, units) \
449  logger << std::setfill(' '); \
450  logger << std::setiosflags(std::ios::right) << std::setw(25) << caption << " : "; \
451  logger << std::setiosflags(std::ios::right) << std::setw(12); \
452  if (((double)value) < 0) { \
453  logger << "NA"; \
454  } else { \
455  logger << value; \
456  } \
457  logger << std::setiosflags(std::ios::left) << std::setw(2) << units; \
458  logger << std::endl;
459 
461 #define SEPFIELD \
462  logger << std::setfill('-'); \
463  logger << std::setw(25) << ""; \
464  logger << std::setw(10) << ""; \
465  logger << std::setw(2) << ""; \
466  logger << std::endl;
467 
472  void printStats() {
473  double allTime = globalTimer.elapsed();
474  LogInfo logger;
475  logger << std::endl;
476 
477  STATFIELD("Events processed", nEvents, "")
478  STATFIELD("Bad events", nEventsBad, "")
479  STATFIELD("Good events", nEventsGood, "")
480  STATFIELD("CSC DCC events", nEventsCSC, "")
481  STATFIELD("Unpacked CSCs", nUnpackedCSC, "")
482 
483  SEPFIELD
484 
485  STATFIELD("All event time", eventTimeSum, "s")
486  double eventTimeAverage = (nEvents > 0 ? eventTimeSum / nEvents : -1.0);
487  STATFIELD("Avg. event time", eventTimeAverage, "s")
488  double eventRateAverage = (eventTimeSum > 0 ? nEvents / eventTimeSum : -1.0);
489  STATFIELD("Avg. event rate", eventRateAverage, "Hz")
490  double chamberRateAverage = (eventTimeSum > 0 ? nUnpackedCSC / eventTimeSum : -1.0);
491  STATFIELD("Avg. chamber rate", chamberRateAverage, "Hz")
492 
493  SEPFIELD
494 
495  STATFIELD("All fra update time", fraTimeSum, "s")
496  STATFIELD("All fra update count", fraCount, "")
497  double fraTimeAverage = (fraCount > 0 ? fraTimeSum / fraCount : -1.0);
498  STATFIELD("Avg. fra update time", fraTimeAverage, "s")
499 
500  SEPFIELD
501 
502  STATFIELD("All eff update time", effTimeSum, "s")
503  STATFIELD("All eff update count", effCount, "")
504  double effTimeAverage = (effCount > 0 ? effTimeSum / effCount : -1.0);
505  STATFIELD("Avg. eff update time", effTimeAverage, "s")
506 
507  SEPFIELD
508 
509  STATFIELD("All time", allTime, "s")
510  double allTimeAverage = (nEvents > 0 ? allTime / nEvents : -1.0);
511  STATFIELD("Avg. event all time", allTimeAverage, "s")
512  double allRateAverage = (allTime > 0 ? nEvents / allTime : -1.0);
513  STATFIELD("Avg. event all rate", allRateAverage, "Hz")
514  double chamberAllRateAverage = (allTime > 0 ? nUnpackedCSC / allTime : -1.0);
515  STATFIELD("Avg. chamber all rate", chamberAllRateAverage, "Hz")
516  }
517 
518 #undef STATFIELD
519 #undef SEPFIELD
520 
526  void eventProcessTimer(const bool start) {
527  if (start) {
528  eventTimer.restart();
529  } else {
530  eventTimeSum += eventTimer.elapsed();
531  }
532  }
533 
539  void updateFraTimer(const bool start) {
540  if (start) {
541  fraTimer.restart();
542  } else {
543  fraTimeSum += fraTimer.elapsed();
544  fraCount++;
545  }
546  }
547 
553  void updateEffTimer(const bool start) {
554  if (start) {
555  effTimer.restart();
556  } else {
557  effTimeSum += effTimer.elapsed();
558  effCount++;
559  }
560  }
561 
567  const bool needBookMO(const std::string name) const {
568  bool result = true;
569  for (unsigned int i = 0; i < MOFilterItems.size(); i++) {
570  const MOFilterItem* filter = &MOFilterItems.at(i);
571  if (Utility::regexMatch(filter->pattern, name))
572  result = filter->include;
573  }
574  return result;
575  }
576 
581  public:
586  void reset() {
587  nEvents = 0;
588  nEventsBad = 0;
589  nEventsGood = 0;
590  nEventsCSC = 0;
591  nUnpackedCSC = 0;
592  fraCount = 0;
593  effCount = 0;
594  eventTimeSum = 0.0;
595  fraTimeSum = 0.0;
596  effTimeSum = 0.0;
597  }
598 
603  const unsigned long getNEvents() const { return nEvents; }
604  const unsigned long getNEventsBad() const { return nEventsBad; }
605  const unsigned long getNEventsGood() const { return nEventsGood; }
606  const unsigned long getNEventsCSC() const { return nEventsCSC; }
607  const unsigned long getNUnpackedCSC() const { return nUnpackedCSC; }
608 
613  void incNEvents() {
614  nEvents++;
615  if (getEVENTS_ECHO() > 0) {
616  if (getNEvents() % getEVENTS_ECHO() == 0) {
617  LOG_INFO << "(echo) Events processed: " << std::setw(12) << getNEvents();
618  }
619  }
620  }
621  void incNEventsBad() { nEventsBad++; }
623  void incNEventsCSC() { nEventsCSC++; }
625 
633  void incChamberCounter(const ChamberCounterType counter, const HwId crateId, const HwId dmbId) {
634  setChamberCounterValue(counter, crateId, dmbId, getChamberCounterValue(counter, crateId, dmbId) + 1);
635  }
636 
646  const HwId crateId,
647  const HwId dmbId,
648  const uint32_t value) {
649  ChamberMapCounterMapType::iterator it = chamberCounters.find(boost::make_tuple(crateId, dmbId));
650  if (it == chamberCounters.end()) {
651  it = chamberCounters.insert(chamberCounters.end(),
652  ChamberCounterKeyType(crateId, dmbId, ChamberCounterMapType()));
653  }
654  ChamberCounterMapType* cs = const_cast<ChamberCounterMapType*>(&it->counters);
655  ChamberCounterMapType::iterator itc = cs->find(counter);
656  if (itc == cs->end()) {
657  cs->insert(std::make_pair(counter, value));
658  } else {
659  itc->second = value;
660  }
661  }
662 
672  const ChamberCounterType counter_to,
673  const HwId crateId,
674  const HwId dmbId) {
675  setChamberCounterValue(counter_from, crateId, dmbId, getChamberCounterValue(counter_from, crateId, dmbId));
676  }
677 
686  const HwId crateId,
687  const HwId dmbId) const {
688  ChamberMapCounterMapType::iterator it = chamberCounters.find(boost::make_tuple(crateId, dmbId));
689  if (it == chamberCounters.end())
690  return 0;
691  ChamberCounterMapType::const_iterator itc = it->counters.find(counter);
692  if (itc == it->counters.end())
693  return 0;
694  return itc->second;
695  }
696 
697  private:
703  unsigned long nEvents;
704 
706  unsigned long nEventsBad;
707 
709  unsigned long nEventsGood;
710 
712  unsigned long nEventsCSC;
713 
715  unsigned long nUnpackedCSC;
716 
718  unsigned long fraCount;
719 
721  unsigned long effCount;
722 
725  };
726 
727 } // namespace cscdqm
728 
729 #undef CONFIG_PARAMETERS_SEQ_LEN
730 #undef CONFIG_PARAMETERS_SEQ
731 #undef CONFIG_PARAMETER_DEFINE_MACRO
732 #undef CONFIG_PARAMETER_DEFAULT_MACRO
733 #undef CONFIG_PARAMETER_GETTER_MACRO
734 #undef CONFIG_PARAMETER_SETTER_MACRO
735 #undef CONFIG_PARAMETER_LOADPS_MACRO
736 #undef CONFIG_PARAMETER_LOADXML_MACRO
737 #undef CONFIG_PARAMETER_PRINTXML_MACRO
738 
739 #endif
cscdqm::Configuration::fnNextBookedCSC
boost::function< bool(unsigned int &, unsigned int &, unsigned int &)> fnNextBookedCSC
Definition: CSCDQM_Configuration.h:269
cscdqm::Configuration::nEventsCSC
unsigned long nEventsCSC
Definition: CSCDQM_Configuration.h:712
cscdqm::Configuration::incNEventsBad
void incNEventsBad()
Definition: CSCDQM_Configuration.h:621
CSCDQM_Logger.h
cscdqm::Configuration::printStatsLocal
unsigned short printStatsLocal
Definition: CSCDQM_Configuration.h:235
counter
Definition: counter.py:1
cscdqm::ChamberCounterKeyType::counters
ChamberCounterMapType counters
Definition: CSCDQM_Configuration.h:215
cscdqm::Configuration::eventProcessTimer
void eventProcessTimer(const bool start)
Switch on/off event processing timer.
Definition: CSCDQM_Configuration.h:526
cscdqm::Configuration::Configuration
Configuration()
Constructor.
Definition: CSCDQM_Configuration.h:289
common_cff.doc
doc
Definition: common_cff.py:54
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
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:227
cscdqm::Configuration::updateEffTimer
void updateEffTimer(const bool start)
Switch on/off efficiency MO processing timer.
Definition: CSCDQM_Configuration.h:553
cscdqm::Configuration::nEvents
unsigned long nEvents
Definition: CSCDQM_Configuration.h:703
cscdqm::MOFilterItem::MOFilterItem
MOFilterItem(const std::string pattern_, const bool include_)
Definition: CSCDQM_Configuration.h:194
SEPFIELD
#define SEPFIELD
Definition: CSCDQM_Configuration.h:461
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
logger
Definition: logger.py:1
cscdqm::BAD_EVENTS
Definition: CSCDQM_Configuration.h:200
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
cscdqm::EVENT_DISPLAY_PLOT
Definition: CSCDQM_Configuration.h:205
globals_cff.id1
id1
Definition: globals_cff.py:32
cscdqm::Configuration::fnGetCacheEMUHisto
boost::function< bool(const HistoId id, MonitorObject *&mo)> fnGetCacheEMUHisto
Definition: CSCDQM_Configuration.h:262
crabWrapper._
_
Definition: crabWrapper.py:19
cscdqm::Configuration::nEventsGood
unsigned long nEventsGood
Definition: CSCDQM_Configuration.h:709
CSCDQM_Utility.h
cscdqm::DMB_TRIGGERS
Definition: CSCDQM_Configuration.h:201
cscdqm::Configuration::effCount
unsigned long effCount
Definition: CSCDQM_Configuration.h:721
cscdqm::Configuration::getNEventsBad
const unsigned long getNEventsBad() const
Definition: CSCDQM_Configuration.h:604
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:213
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:435
cscdqm::Configuration::effTimeSum
double effTimeSum
Definition: CSCDQM_Configuration.h:444
cscdqm::Configuration::eventTimer
boost::timer eventTimer
Definition: CSCDQM_Configuration.h:429
cscdqm::Configuration::nEventsBad
unsigned long nEventsBad
Definition: CSCDQM_Configuration.h:706
cscdqm::Configuration::fraTimer
boost::timer fraTimer
Definition: CSCDQM_Configuration.h:432
cscdqm::CFEB_TRIGGERS
Definition: CSCDQM_Configuration.h:204
cscdqm::Configuration::printStats
void printStats()
Print Statistics on Exit (Destruction)
Definition: CSCDQM_Configuration.h:472
cscdqm::Configuration::incNEvents
void incNEvents()
Definition: CSCDQM_Configuration.h:613
cscdqm::Configuration::chamberCounters
ChamberMapCounterMapType chamberCounters
Definition: CSCDQM_Configuration.h:724
cscdqm::ChamberCounterKeyType
Chamber Counters key type.
Definition: CSCDQM_Configuration.h:212
fwlog::logger
std::ostream & logger()
Definition: fwLog.cc:36
cscdqm::Configuration::incNUnpackedCSC
void incNUnpackedCSC()
Definition: CSCDQM_Configuration.h:624
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:607
cscdqm::Configuration::fnPutHisto
boost::function< void(const HistoDef &histoT, MonitorObject *&)> fnPutHisto
Definition: CSCDQM_Configuration.h:268
cscdqm::Configuration::fnIsBookedDDU
boost::function< bool(unsigned int &)> fnIsBookedDDU
Definition: CSCDQM_Configuration.h:271
cscdqm::Configuration::incNEventsCSC
void incNEventsCSC()
Definition: CSCDQM_Configuration.h:623
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:715
cscdqm::ChamberCounterType
ChamberCounterType
Chamber level counter types.
Definition: CSCDQM_Configuration.h:198
CONFIG_PARAMETER_SETTER_MACRO
#define CONFIG_PARAMETER_SETTER_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:143
svgfig.load
def load(fileName)
Definition: svgfig.py:547
cscdqm::Configuration::fnGetCacheCSCHisto
boost::function< bool(const HistoId id, const HwId &id1, const HwId &id2, const HwId &id3, MonitorObject *&mo)> fnGetCacheCSCHisto
Definition: CSCDQM_Configuration.h:266
cscdqm::Configuration::fraTimeSum
double fraTimeSum
Definition: CSCDQM_Configuration.h:441
cscdqm::DMB_EVENTS
Definition: CSCDQM_Configuration.h:199
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
cscdqm::Configuration::getNEvents
const unsigned long getNEvents() const
Definition: CSCDQM_Configuration.h:603
cscdqm::HistoBookRequest
Definition: CSCDQM_MonitorObjectProvider.h:31
cscdqm::Configuration::fnGetCacheFEDHisto
boost::function< bool(const HistoId id, const HwId &id1, MonitorObject *&mo)> fnGetCacheFEDHisto
Definition: CSCDQM_Configuration.h:263
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CONFIG_PARAMETER_GETTER_MACRO
#define CONFIG_PARAMETER_GETTER_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:136
cscdqm::ChamberCounterMapType
std::map< ChamberCounterType, uint32_t > ChamberCounterMapType
Definition: CSCDQM_Configuration.h:209
cscdqm::Configuration::getNEventsCSC
const unsigned long getNEventsCSC() const
Definition: CSCDQM_Configuration.h:606
edm::ParameterSet
Definition: ParameterSet.h:36
cscdqm::Configuration::eventTimeSum
double eventTimeSum
Definition: CSCDQM_Configuration.h:438
cscdqm
Definition: CSCDQM_DCSBase.h:29
cscdqm::Configuration::fraCount
unsigned long fraCount
Definition: CSCDQM_Configuration.h:718
CSCDetId
Definition: CSCDetId.h:26
cscdqm::Configuration::globalTimer
boost::timer globalTimer
Definition: CSCDQM_Configuration.h:426
CONFIG_PARAMETERS_SEQ
#define CONFIG_PARAMETERS_SEQ
Definition: CSCDQM_Configuration.h:71
STATFIELD
#define STATFIELD(caption, value, units)
Definition: CSCDQM_Configuration.h:448
cscdqm::ALCT_TRIGGERS
Definition: CSCDQM_Configuration.h:202
cms::concurrency::xercesTerminate
void xercesTerminate()
Definition: Xerces.cc:23
value
Definition: value.py:1
cscdqm::Configuration::fnIsBookedCSC
boost::function< bool(unsigned int &, unsigned int &)> fnIsBookedCSC
Definition: CSCDQM_Configuration.h:270
cscdqm::CLCT_TRIGGERS
Definition: CSCDQM_Configuration.h:203
cscdqm::ChamberCounterKeyType::ChamberCounterKeyType
ChamberCounterKeyType(const HwId &crateId_, const HwId &dmbId_, const ChamberCounterMapType &c_)
Definition: CSCDQM_Configuration.h:216
cscdqm::MOFilterItem::include
bool include
Definition: CSCDQM_Configuration.h:192
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:128
cscdqm::Configuration::fnGetCacheParHisto
boost::function< bool(const HistoId id, MonitorObject *&mo)> fnGetCacheParHisto
Definition: CSCDQM_Configuration.h:267
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:671
cscdqm::Configuration
CSCDQM Framework Global Configuration.
Definition: CSCDQM_Configuration.h:233
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:645
pdwgDoubleElectron_cfi.filterName
filterName
Definition: pdwgDoubleElectron_cfi.py:7
cscdqm::Configuration::getNEventsGood
const unsigned long getNEventsGood() const
Definition: CSCDQM_Configuration.h:605
cscdqm::Configuration::fnGetHisto
boost::function< bool(const HistoDef &histoT, MonitorObject *&)> fnGetHisto
Definition: CSCDQM_Configuration.h:259
init
Definition: init.py:1
cscdqm::Configuration::fnGetCacheDDUHisto
boost::function< bool(const HistoId id, const HwId &id1, MonitorObject *&mo)> fnGetCacheDDUHisto
Definition: CSCDQM_Configuration.h:264
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CONFIG_PARAMETER_DEFAULT_MACRO
#define CONFIG_PARAMETER_DEFAULT_MACRO(r, data, i, elem)
Definition: CSCDQM_Configuration.h:132
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
cscdqm::Configuration::MOFilterItems
std::vector< MOFilterItem > MOFilterItems
Definition: CSCDQM_Configuration.h:238
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
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:29
cscdqm::Configuration::reset
void reset()
Reset counters.
Definition: CSCDQM_Configuration.h:586
cscdqm::MOFilterItem
MO filter Item definition (loaded from XML/PSet)
Definition: CSCDQM_Configuration.h:188
cscdqm::Configuration::fnBook
boost::function< MonitorObject *(const HistoBookRequest &)> fnBook
Definition: CSCDQM_Configuration.h:275
include
bool include(const CollT &coll, const ItemT &item)
Definition: EcalDetIdToBeRecoveredProducer.cc:74
cscdqm::Configuration::needBookMO
const bool needBookMO(const std::string name) const
Check if MO is not excluded by MO Filter.
Definition: CSCDQM_Configuration.h:567
mps_fire.result
result
Definition: mps_fire.py:303
cscdqm::Configuration::fnIsBookedFED
boost::function< bool(unsigned int &)> fnIsBookedFED
Definition: CSCDQM_Configuration.h:272
cscdqm::Configuration::init
void init()
Initialize parameter values and reset counters (used by constructors)
Definition: CSCDQM_Configuration.h:247
ParameterSet.h
LOG_WARN
#define LOG_WARN
Definition: CSCDQM_Logger.h:41
globals_cff.id2
id2
Definition: globals_cff.py:33
cscdqm::Configuration::incChamberCounter
void incChamberCounter(const ChamberCounterType counter, const HwId crateId, const HwId dmbId)
Increment Chamber counter by 1.
Definition: CSCDQM_Configuration.h:633
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:685
cscdqm::Configuration::incNEventsGood
void incNEventsGood()
Definition: CSCDQM_Configuration.h:622
cscdqm::Configuration::~Configuration
~Configuration()
Destructor.
Definition: CSCDQM_Configuration.h:310
cms::concurrency::xercesInitialize
void xercesInitialize()
Definition: Xerces.cc:18
cscdqm::ChamberCounterKeyType::dmbId
HwId dmbId
Definition: CSCDQM_Configuration.h:214
cscdqm::Configuration::fnGetCSCDetId
boost::function< bool(const unsigned int, const unsigned int, CSCDetId &)> fnGetCSCDetId
Definition: CSCDQM_Configuration.h:278
cscdqm::Configuration::updateFraTimer
void updateFraTimer(const bool start)
Switch on/off fractional MO processing timer.
Definition: CSCDQM_Configuration.h:539
cscdqm::Configuration::Configuration
Configuration(const bool printStats)
Constructor.
Definition: CSCDQM_Configuration.h:298
cscdqm::MOFilterItem::pattern
TPRegexp pattern
Definition: CSCDQM_Configuration.h:190