CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TEMUEventInfoClient.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <stdio.h>
20 #include <sstream>
21 #include <fstream>
22 #include <iostream>
23 #include <iomanip>
24 
25 #include <math.h>
26 #include <memory>
27 
28 #include <vector>
29 #include <string>
30 
31 // user include files
37 
41 
42 #include <TH2F.h>
43 #include "TROOT.h"
44 
45 // constructor
47  m_verbose(parSet.getUntrackedParameter<bool>("verbose", false)),
48  m_monitorDir(parSet.getUntrackedParameter<std::string>("monitorDir", "")),
49  m_runInEventLoop(parSet.getUntrackedParameter<bool>("runInEventLoop", false)),
50  m_runInEndLumi(parSet.getUntrackedParameter<bool>("runInEndLumi", false)),
51  m_runInEndRun(parSet.getUntrackedParameter<bool>("runInEndRun", false)),
52  m_runInEndJob(parSet.getUntrackedParameter<bool>("runInEndJob", false)),
53  m_l1Systems(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Systems")),
54  m_l1Objects(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Objects")),
55  m_maskL1Systems(parSet.getParameter<std::vector<std::string> >("MaskL1Systems")),
56  m_maskL1Objects(parSet.getParameter<std::vector<std::string> >("MaskL1Objects")),
57  m_nrL1Systems(0),
58  m_nrL1Objects(0),
59  m_totalNrQtSummaryEnabled(0) {
60 
61  initialize();
62 }
63 
64 // destructor
66 
67  //empty
68 
69 }
70 
72 
73  // get back-end interface
75 
76  if (m_verbose) {
77  std::cout << "\nMonitor directory = " << m_monitorDir
78  << std::endl;
79  }
80 
81  //
82 
83  m_nrL1Systems = m_l1Systems.size();
84 
87  m_systemMask.reserve(m_nrL1Systems);
89 
90  // on average two quality test per system - just a best guess
94 
95  int indexSys = 0;
96 
97  int totalNrQualityTests = 0;
98 
99  for (std::vector<edm::ParameterSet>::const_iterator itSystem =
100  m_l1Systems.begin(); itSystem != m_l1Systems.end(); ++itSystem) {
101 
102  m_systemLabel.push_back(itSystem->getParameter<std::string>(
103  "SystemLabel"));
104 
105  m_systemLabelExt.push_back(itSystem->getParameter<std::string>(
106  "HwValLabel"));
107 
108  m_systemMask.push_back(itSystem->getParameter<unsigned int>(
109  "SystemMask"));
110  // check the additional mask from m_maskL1Systems
111  for (std::vector<std::string>::const_iterator itSys =
112  m_maskL1Systems.begin(); itSys != m_maskL1Systems.end(); ++itSys) {
113 
114  if (*itSys == m_systemLabel[indexSys]) {
115  m_systemMask[indexSys] = 1;
116 
117  }
118  }
119 
120  //
121  std::string sysFolder = itSystem->getParameter<std::string> (
122  "SystemFolder");
123  m_systemFolder.push_back(sysFolder);
124 
125  //
126  std::vector<std::string> qtNames = itSystem->getParameter<
127  std::vector<std::string> >("QualityTestName");
128  m_systemQualityTestName.push_back(qtNames);
129 
130  totalNrQualityTests = totalNrQualityTests + qtNames.size();
131 
132  //
133  std::vector<std::string> qtHists = itSystem->getParameter<
134  std::vector<std::string> > ("QualityTestHist");
135 
136  std::vector<std::string> qtFullPathHists;
137  qtFullPathHists.reserve(qtHists.size());
138 
139  for (std::vector<std::string>::const_iterator itQtHist =
140  qtHists.begin(); itQtHist != qtHists.end(); ++itQtHist) {
141 
142  std::string hist = *itQtHist;
143 
144  if (sysFolder == "") {
145  hist = "L1TEMU/" + m_systemLabel[indexSys] + "/" + hist;
146  } else {
147  hist = sysFolder + "/" + hist;
148  }
149 
150  qtFullPathHists.push_back(hist);
151  }
152 
153  m_systemQualityTestHist.push_back(qtFullPathHists);
154 
155  //
156  std::vector<unsigned int> qtSumEnabled = itSystem->getParameter<
157  std::vector<unsigned int> >("QualityTestSummaryEnabled");
158  m_systemQtSummaryEnabled.push_back(qtSumEnabled);
159 
160  for (std::vector<unsigned int>::const_iterator itQtSumEnabled =
161  qtSumEnabled.begin(); itQtSumEnabled != qtSumEnabled.end(); ++itQtSumEnabled) {
162 
164  }
165 
166  // consistency check - throw exception, it will crash anyway if not consistent
167  if (
168  (qtNames.size() != qtHists.size()) ||
169  (qtNames.size() != qtSumEnabled.size()) ||
170  (qtHists.size() != qtSumEnabled.size())) {
171 
172  throw cms::Exception("FailModule")
173  << "\nError: inconsistent size of input vector parameters"
174  << "\n QualityTestName, QualityTestHistQuality, TestSummaryEnabled"
175  << "\nfor system " << m_systemLabel[indexSys]
176  << "\n They must have equal size.\n"
177  << std::endl;
178  }
179 
180 
181  indexSys++;
182 
183  }
184 
185  // L1 objects
186 
187  //
188  m_nrL1Objects = m_l1Objects.size();
189 
190  m_objectLabel.reserve(m_nrL1Objects);
191  m_objectMask.reserve(m_nrL1Objects);
192  m_objectFolder.reserve(m_nrL1Objects);
193 
194  // on average two quality test per object - just a best guess
198 
199  int indexObj = 0;
200 
201  for (std::vector<edm::ParameterSet>::const_iterator itObject =
202  m_l1Objects.begin(); itObject != m_l1Objects.end(); ++itObject) {
203 
204  m_objectLabel.push_back(itObject->getParameter<std::string>(
205  "ObjectLabel"));
206 
207  m_objectMask.push_back(itObject->getParameter<unsigned int>(
208  "ObjectMask"));
209  // check the additional mask from m_maskL1Objects
210  for (std::vector<std::string>::const_iterator itObj =
211  m_maskL1Objects.begin(); itObj != m_maskL1Objects.end(); ++itObj) {
212 
213  if (*itObj == m_objectLabel[indexObj]) {
214  m_objectMask[indexObj] = 1;
215 
216  }
217  }
218 
219  //
220  std::string objFolder = itObject->getParameter<std::string> (
221  "ObjectFolder");
222  m_objectFolder.push_back(objFolder);
223 
224  //
225  std::vector<std::string> qtNames = itObject->getParameter<
226  std::vector<std::string> >("QualityTestName");
227  m_objectQualityTestName.push_back(qtNames);
228 
229  totalNrQualityTests = totalNrQualityTests + qtNames.size();
230 
231  //
232  std::vector<std::string> qtHists = itObject->getParameter<
233  std::vector<std::string> > ("QualityTestHist");
234 
235  std::vector<std::string> qtFullPathHists;
236  qtFullPathHists.reserve(qtHists.size());
237 
238  for (std::vector<std::string>::const_iterator itQtHist =
239  qtHists.begin(); itQtHist != qtHists.end(); ++itQtHist) {
240 
241  std::string hist = *itQtHist;
242 
243  if (objFolder == "") {
244  hist = "L1TEMU/" + m_objectLabel[indexObj] + "/" + hist;
245  } else {
246  hist = objFolder + hist;
247  }
248 
249  qtFullPathHists.push_back(hist);
250  }
251 
252  m_objectQualityTestHist.push_back(qtFullPathHists);
253 
254  //
255  std::vector<unsigned int> qtSumEnabled = itObject->getParameter<
256  std::vector<unsigned int> >("QualityTestSummaryEnabled");
257  m_objectQtSummaryEnabled.push_back(qtSumEnabled);
258 
259  for (std::vector<unsigned int>::const_iterator itQtSumEnabled =
260  qtSumEnabled.begin(); itQtSumEnabled != qtSumEnabled.end(); ++itQtSumEnabled) {
261 
263  }
264 
265  // consistency check - throw exception, it will crash anyway if not consistent
266  if (
267  (qtNames.size() != qtHists.size()) ||
268  (qtNames.size() != qtSumEnabled.size()) ||
269  (qtHists.size() != qtSumEnabled.size())) {
270 
271  throw cms::Exception("FailModule")
272  << "\nError: inconsistent size of input vector parameters"
273  << "\n QualityTestName, QualityTestHistQuality, TestSummaryEnabled"
274  << "\nfor object " << m_objectLabel[indexObj]
275  << "\nThe three vectors must have equal size.\n"
276  << std::endl;
277  }
278 
279 
280 
281 
282  indexObj++;
283 
284  }
285 
287  m_meReportSummaryContent.reserve(totalNrQualityTests);
288 
289 }
290 
291 
293 
294 
295  // get backend interface
297 
298 }
299 
300 
302  const edm::EventSetup& evSetup) {
303 
304  bookHistograms();
305 
306 }
307 
308 
310  const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& evSetup) {
311 
312 }
313 
314 
316  const edm::EventSetup& evSetup) {
317 
318  // there is no loop on events in the offline harvesting step
319  // code here will not be executed offline
320 
321  if (m_runInEventLoop) {
322 
323  readQtResults();
324 
325  }
326 }
327 
328 
330  const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& evSetup) {
331 
332  if (m_runInEndLumi) {
333 
334  readQtResults();
335 
336  if (m_verbose) {
337 
338  std::cout << "\n L1TEMUEventInfoClient::endLuminosityBlock\n"
339  << std::endl;
341  }
342 
343  }
344 }
345 
346 
348  const edm::EventSetup& evSetup) {
349 
350  if (m_runInEndRun) {
351 
352  readQtResults();
353 
354  if (m_verbose) {
355 
356  std::cout << "\n L1TEMUEventInfoClient::endRun\n" << std::endl;
358  }
359 
360  }
361 }
362 
363 
365 
366  if (m_runInEndJob) {
367 
368  readQtResults();
369 
370  if (m_verbose) {
371 
372  std::cout << "\n L1TEMUEventInfoClient::endRun\n" << std::endl;
374  }
375  }
376 }
377 
378 
380 
381  std::cout << "\nSummary report " << std::endl;
382 
383  // summary content
384 
386 
387  std::cout
388  << "\nSummary content per system and object as filled in histogram\n "
389  << m_meReportSummaryMap->getName() << std::endl;
390 
391  if (!me) {
392 
393  std::cout << "\nNo histogram " << m_meReportSummaryMap->getName()
394  << "\nNo summary content per system and object as filled in histogram.\n "
395  << std::endl;
396  return;
397 
398  }
399 
400  TH2F* hist = me->getTH2F();
401 
402  const int nBinsX = hist->GetNbinsX();
403  const int nBinsY = hist->GetNbinsY();
404  std::cout << nBinsX << " " << nBinsY;
405 
406  std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
407  nBinsY));
408 
409 // for (int iBinX = 0; iBinX < nBinsX; iBinX++) {
410 // for (int iBinY = 0; iBinY < nBinsY; iBinY++) {
411 // meReportSummaryMap[iBinX][iBinY]
412 // = static_cast<int>(me->GetBinContent(iBinX + 1, iBinY + 1));
413 // }
414 // }
415 
416  std::cout << "\nL1 systems: " << m_nrL1Systems << " systems included\n"
417  << "\n Summary content size: " << (m_summaryContent.size())
418  << std::endl;
419 
420  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
421 
422  std::cout << std::setw(10) << m_systemLabel[iSys] << std::setw(10)
423  << m_systemLabelExt[iSys] << " \t" << m_systemMask[iSys]
424  << " \t" << std::setw(25) << " m_summaryContent["
425  << std::setw(2) << iSys << "] = " << meReportSummaryMap[0][iSys]
426  << std::endl;
427  }
428 
429  std::cout << "\n L1 trigger objects: " << m_nrL1Objects
430  << " objects included\n" << std::endl;
431 
432  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
433  + m_nrL1Objects; ++iMon) {
434 
435  std::cout << std::setw(20) << m_objectLabel[iMon - m_nrL1Systems]
436  << " \t" << m_objectMask[iMon - m_nrL1Systems] << " \t"
437  << std::setw(25) << " m_summaryContent[" << std::setw(2)
438  << iMon << "] = \t" << m_summaryContent[iMon] << std::endl;
439  }
440 
441  std::cout << std::endl;
442 
443  // quality tests
444 
445  std::cout << "\nQuality test results as filled in "
446  << "\n L1TEMU/EventInfo/reportSummaryContents\n"
447  << "\n Total number of quality tests: "
448  << (m_meReportSummaryContent.size()) << "\n" << std::endl;
449 
450  for (std::vector<MonitorElement*>::const_iterator itME =
451  m_meReportSummaryContent.begin(); itME
452  != m_meReportSummaryContent.end(); ++itME) {
453 
454  std::cout << std::setw(50) << (*itME)->getName() << " \t"
455  << std::setw(25) << (*itME)->getFloatValue() << std::endl;
456 
457  }
458 
459  std::cout << std::endl;
460 
461 }
462 
463 
464 
466 
467  m_dbe->setCurrentFolder("L1TEMU/EventInfo");
468 
469  // remove m_meReportSummary if it exists
470  if ((m_meReportSummary = m_dbe->get("L1TEMU/EventInfo/reportSummary"))) {
472  }
473 
474  // ...and book it again
475  m_meReportSummary = m_dbe->bookFloat("reportSummary");
476 
477  // initialize reportSummary to 1
478 
479  if (m_meReportSummary) {
481  }
482 
483  // define float histograms for reportSummaryContents (one histogram per quality test),
484  // initialize them to zero
485  // initialize also m_summaryContent to dqm::qstatus::DISABLED
486 
487  m_dbe->setCurrentFolder("L1TEMU/EventInfo/reportSummaryContents");
488 
489  char histoQT[100];
490 
491  // general counters:
492  // iAllQTest: all quality tests for all systems and objects
493  // iAllMon: all monitored systems and objects
494  int iAllQTest = 0;
495  int iAllMon = 0;
496 
497  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
498 
500 
501  const std::vector<std::string>& sysQtName =
503 
504  for (std::vector<std::string>::const_iterator itQtName =
505  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
506 
507  const std::string hStr = "L1TEMU_L1Sys_" +m_systemLabel[iMon] + "_" + (*itQtName);
508 
509  const char* cStr = hStr.c_str();
510  sprintf(histoQT, cStr);
511 
512  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
513  m_meReportSummaryContent[iAllQTest]->Fill(0.);
514 
515  iAllQTest++;
516  }
517 
518  iAllMon++;
519  }
520 
521 
522  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
523 
525 
526  const std::vector<std::string>& objQtName =
528 
529  for (std::vector<std::string>::const_iterator itQtName =
530  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
531 
532  const std::string hStr = "L1TEMU_L1Obj_" + m_objectLabel[iMon] + "_"
533  + (*itQtName);
534 
535  const char* cStr = hStr.c_str();
536  sprintf(histoQT, cStr);
537 
538  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
539  m_meReportSummaryContent[iAllQTest]->Fill(0.);
540 
541  iAllQTest++;
542  }
543 
544  iAllMon++;
545 
546  }
547 
548  m_dbe->setCurrentFolder("L1TEMU/EventInfo");
549 
550  if ((m_meReportSummaryMap = m_dbe->get("L1TEMU/EventInfo/reportSummaryMap"))) {
552  }
553 
554  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
555 
556  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
557 
558  m_meReportSummaryMap = m_dbe->book2D("reportSummaryMap",
559  "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
560 
563 
564  m_meReportSummaryMap->setBinLabel(1, " ", 1);
565  m_meReportSummaryMap->setBinLabel(2, " ", 1);
566 
567  for (int iBin = 0; iBin < nBinsY; ++iBin) {
568 
569  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
570  }
571 
572 }
573 
574 
576 
577  // initialize summary content, summary sum and ReportSummaryContent float histograms
578  // for all L1 systems and L1 objects
579 
580  for (std::vector<int>::iterator it = m_summaryContent.begin(); it
581  != m_summaryContent.end(); ++it) {
582 
583  (*it) = dqm::qstatus::DISABLED;
584 
585  }
586 
587  m_summarySum = 0.;
588 
589  for (std::vector<MonitorElement*>::iterator itME =
590  m_meReportSummaryContent.begin(); itME
591  != m_meReportSummaryContent.end(); ++itME) {
592 
593  (*itME)->Fill(0.);
594 
595  }
596 
597 
598  // general counters:
599  // iAllQTest: all quality tests for all systems and objects
600  // iAllMon: all monitored systems and objects
601  int iAllQTest = 0;
602  int iAllMon = 0;
603 
604 
605  // quality tests for all L1 systems
606 
607  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
608 
609  // get the reports for each quality test
610 
611  const std::vector<std::string>& sysQtName =
613  const std::vector<std::string>& sysQtHist =
615  const std::vector<unsigned int>& sysQtSummaryEnabled =
617 
618  // pro system counter for quality tests
619  int iSysQTest = 0;
620 
621  for (std::vector<std::string>::const_iterator itQtName =
622  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
623 
624  // get results, status and message
625 
626  MonitorElement* qHist = m_dbe->get(sysQtHist[iSysQTest]);
627 
628  if (qHist) {
629  const std::vector<QReport*> qtVec = qHist->getQReports();
630  const std::string hName = qHist->getName();
631 
632  if (m_verbose) {
633 
634  std::cout << "\nNumber of quality tests "
635  << " for histogram " << sysQtHist[iSysQTest]
636  << ": " << qtVec.size() << "\n" << std::endl;
637  }
638 
639  const QReport* sysQReport = qHist->getQReport(*itQtName);
640  if (sysQReport) {
641  const float sysQtResult = sysQReport->getQTresult();
642  const int sysQtStatus = sysQReport->getStatus();
643  const std::string& sysQtMessage = sysQReport->getMessage();
644 
645  if (m_verbose) {
646  std::cout << "\n" << (*itQtName) << " quality test:"
647  << "\n result: " << sysQtResult
648  << "\n status: " << sysQtStatus
649  << "\n message: " << sysQtMessage << "\n"
650  << "\nFilling m_meReportSummaryContent["
651  << iAllQTest << "] with value "
652  << sysQtResult << "\n" << std::endl;
653  }
654 
655  m_meReportSummaryContent[iAllQTest]->Fill(sysQtResult);
656 
657  // for the summary map, keep the highest status value ("ERROR") of all tests
658  // which are considered for the summary plot
659  if (sysQtSummaryEnabled[iSysQTest]) {
660 
661  if (sysQtStatus > m_summaryContent[iAllMon]) {
662  m_summaryContent[iAllMon] = sysQtStatus;
663  }
664 
665  m_summarySum += sysQtResult;
666  }
667 
668 
669  } else {
670 
671  // for the summary map, if the test was not found but it is assumed to be
672  // considered for the summary plot, set it to dqm::qstatus::INVALID
673 
674  int sysQtStatus = dqm::qstatus::INVALID;
675 
676  if (sysQtSummaryEnabled[iSysQTest]) {
677 
678  if (sysQtStatus > m_summaryContent[iAllMon]) {
679  m_summaryContent[iAllMon] = sysQtStatus;
680  }
681  }
682 
683  m_meReportSummaryContent[iAllQTest]->Fill(0.);
684 
685  if (m_verbose) {
686 
687  std::cout << "\n" << (*itQtName)
688  << " quality test not found\n" << std::endl;
689  }
690  }
691 
692  } else {
693  // for the summary map, if the histogram was not found but it is assumed
694  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
695 
696  int sysQtStatus = dqm::qstatus::INVALID;
697 
698  if (sysQtSummaryEnabled[iSysQTest]) {
699 
700  if (sysQtStatus > m_summaryContent[iAllMon]) {
701  m_summaryContent[iAllMon] = sysQtStatus;
702  }
703  }
704 
705  m_meReportSummaryContent[iAllQTest]->Fill(0.);
706 
707  if (m_verbose) {
708 
709  std::cout << "\nHistogram " << sysQtHist[iSysQTest]
710  << " not found\n" << std::endl;
711  }
712 
713  }
714 
715  // increase counters for quality tests
716  iSysQTest++;
717  iAllQTest++;
718 
719  }
720 
721  iAllMon++;
722 
723  }
724 
725  // quality tests for all L1 objects
726 
727  for (unsigned int iObj = 0; iObj < m_nrL1Objects; ++iObj) {
728 
729  // get the reports for each quality test
730 
731  const std::vector<std::string>& objQtName =
733  const std::vector<std::string>& objQtHist =
735  const std::vector<unsigned int>& objQtSummaryEnabled =
737 
738  // pro object counter for quality tests
739  int iObjQTest = 0;
740 
741  for (std::vector<std::string>::const_iterator itQtName =
742  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
743 
744  // get results, status and message
745 
746  MonitorElement* qHist = m_dbe->get(objQtHist[iObjQTest]);
747 
748  if (qHist) {
749  const std::vector<QReport*> qtVec = qHist->getQReports();
750  const std::string hName = qHist->getName();
751 
752  if (m_verbose) {
753 
754  std::cout << "\nNumber of quality tests "
755  << " for histogram " << objQtHist[iObjQTest]
756  << ": " << qtVec.size() << "\n" << std::endl;
757  }
758 
759  const QReport* objQReport = qHist->getQReport(*itQtName);
760  if (objQReport) {
761  const float objQtResult = objQReport->getQTresult();
762  const int objQtStatus = objQReport->getStatus();
763  const std::string& objQtMessage = objQReport->getMessage();
764 
765  if (m_verbose) {
766  std::cout << "\n" << (*itQtName) << " quality test:"
767  << "\n result: " << objQtResult
768  << "\n status: " << objQtStatus
769  << "\n message: " << objQtMessage << "\n"
770  << "\nFilling m_meReportSummaryContent["
771  << iAllQTest << "] with value "
772  << objQtResult << "\n" << std::endl;
773  }
774 
775  m_meReportSummaryContent[iAllQTest]->Fill(objQtResult);
776 
777  // for the summary map, keep the highest status value ("ERROR") of all tests
778  // which are considered for the summary plot
779  if (objQtSummaryEnabled[iObjQTest]) {
780 
781  if (objQtStatus > m_summaryContent[iAllMon]) {
782  m_summaryContent[iAllMon] = objQtStatus;
783  }
784 
785  m_summarySum += objQtResult;
786  }
787 
788  } else {
789 
790  // for the summary map, if the test was not found but it is assumed to be
791  // considered for the summary plot, set it to dqm::qstatus::INVALID
792 
793  int objQtStatus = dqm::qstatus::INVALID;
794 
795  if (objQtSummaryEnabled[iObjQTest]) {
796 
797  if (objQtStatus > m_summaryContent[iAllMon]) {
798  m_summaryContent[iAllMon] = objQtStatus;
799  }
800  }
801 
802  m_meReportSummaryContent[iAllQTest]->Fill(0.);
803 
804  if (m_verbose) {
805 
806  std::cout << "\n" << (*itQtName)
807  << " quality test not found\n" << std::endl;
808  }
809 
810  }
811 
812  } else {
813  // for the summary map, if the histogram was not found but it is assumed
814  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
815 
816  int objQtStatus = dqm::qstatus::INVALID;
817 
818  if (objQtSummaryEnabled[iObjQTest]) {
819 
820  if (objQtStatus > m_summaryContent[iAllMon]) {
821  m_summaryContent[iAllMon] = objQtStatus;
822  }
823  }
824 
825  m_meReportSummaryContent[iAllQTest]->Fill(0.);
826 
827  if (m_verbose) {
828  std::cout << "\nHistogram " << objQtHist[iObjQTest]
829  << " not found\n" << std::endl;
830  }
831 
832  }
833 
834  // increase counters for quality tests
835  iObjQTest++;
836  iAllQTest++;
837  }
838 
839  iAllMon++;
840 
841  }
842 
843 
844 
845  // reportSummary value
847  if (m_meReportSummary) {
849  }
850 
851  // fill the ReportSummaryMap for L1 systems (bin 1 on X)
852  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
853 
854  double summCont = static_cast<double>(m_summaryContent[iSys]);
855  m_meReportSummaryMap->setBinContent(1, iSys + 1, summCont);
856  }
857 
858  // fill the ReportSummaryMap for L1 objects (bin 2 on X)
859  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
860  + m_nrL1Objects; ++iMon) {
861 
862  double summCont = static_cast<double>(m_summaryContent[iMon]);
863  m_meReportSummaryMap->setBinContent(2, iMon - m_nrL1Systems + 1, summCont);
864 
865  }
866 
867 }
868 
869 
870 
void bookHistograms()
book histograms
const std::string & getName(void) const
get name of ME
std::vector< int > m_objectMask
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to &lt;qtname&gt; (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
Float_t m_reportSummary
summary report
std::vector< edm::ParameterSet > m_l1Objects
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void readQtResults()
read quality test results
void endRun(const edm::Run &, const edm::EventSetup &)
end run
std::vector< std::vector< std::string > > m_objectQualityTestHist
virtual ~L1TEMUEventInfoClient()
Destructor.
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
begin luminosity block
std::vector< std::string > m_maskL1Systems
const std::string & getMessage(void) const
get message attached to test
Definition: QReport.h:24
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:654
void Fill(long long x)
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
std::vector< int > m_systemMask
MonitorElement * m_meReportSummary
a summary report
std::vector< edm::ParameterSet > m_l1Systems
int iEvent
Definition: GenABIO.cc:243
static const int INVALID
const T & max(const T &a, const T &b)
size_t m_nrL1Objects
number of L1 trigger objects
void removeElement(const std::string &name)
Definition: DQMStore.cc:2572
L1TEMUEventInfoClient(const edm::ParameterSet &)
Constructor.
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
end luminosity block
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
static const int DISABLED
std::vector< std::string > m_systemLabel
size_t m_nrL1Systems
number of L1 trigger systems
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
std::vector< std::vector< std::string > > m_systemQualityTestName
void beginRun(const edm::Run &, const edm::EventSetup &)
begin run
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< std::vector< std::string > > m_systemQualityTestHist
std::vector< std::vector< std::string > > m_objectQualityTestName
void dumpContentMonitorElements()
dump the content of the monitoring elements defined in this module
float getQTresult(void) const
get test result i.e. prob value
Definition: QReport.h:20
std::vector< std::string > m_systemFolder
void initialize()
private methods
tuple cout
Definition: gather_cfg.py:121
bool m_verbose
input parameters
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< int > m_summaryContent
std::vector< std::string > m_maskL1Objects
std::vector< std::string > m_systemLabelExt
std::vector< std::string > m_objectLabel
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
Definition: Run.h:33
void analyze(const edm::Event &, const edm::EventSetup &)
analyze
MonitorElement * m_meReportSummaryMap
report summary map
std::vector< std::string > m_objectFolder