Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:10:50

0001 /**
0002  * \class L1TEventInfoClient
0003  *
0004  *
0005  * Description: see header file.
0006  *
0007  *
0008  * \author: Vasile Mihai Ghete   - HEPHY Vienna
0009  *
0010  *
0011  */
0012 
0013 // this class header
0014 #include "DQM/L1TMonitorClient/interface/L1TEventInfoClient.h"
0015 
0016 // system include files
0017 #include <cstdio>
0018 #include <sstream>
0019 #include <fstream>
0020 #include <iostream>
0021 #include <iomanip>
0022 
0023 #include <cmath>
0024 #include <memory>
0025 
0026 #include <vector>
0027 #include <string>
0028 
0029 // user include files
0030 #include "FWCore/ServiceRegistry/interface/Service.h"
0031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0032 #include "FWCore/Framework/interface/EventSetup.h"
0033 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0034 #include "FWCore/Utilities/interface/Exception.h"
0035 
0036 #include "DQMServices/Core/interface/DQMStore.h"
0037 
0038 #include <TH2F.h>
0039 #include "TROOT.h"
0040 
0041 // constructor
0042 L1TEventInfoClient::L1TEventInfoClient(const edm::ParameterSet& parSet)
0043     : m_verbose(parSet.getUntrackedParameter<bool>("verbose", false)),
0044       m_monitorDir(parSet.getUntrackedParameter<std::string>("monitorDir", "")),
0045       m_runInEventLoop(parSet.getUntrackedParameter<bool>("runInEventLoop", false)),
0046       m_runInEndLumi(parSet.getUntrackedParameter<bool>("runInEndLumi", false)),
0047       m_runInEndRun(parSet.getUntrackedParameter<bool>("runInEndRun", false)),
0048       m_runInEndJob(parSet.getUntrackedParameter<bool>("runInEndJob", false)),
0049       m_l1Systems(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Systems")),
0050       m_l1Objects(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Objects")),
0051       m_disableL1Systems(parSet.getParameter<std::vector<std::string> >("DisableL1Systems")),
0052       m_disableL1Objects(parSet.getParameter<std::vector<std::string> >("DisableL1Objects")),
0053       m_nrL1Systems(0),
0054       m_nrL1Objects(0),
0055       m_totalNrQtSummaryEnabled(0) {
0056   initialize();
0057 }
0058 
0059 // destructor
0060 L1TEventInfoClient::~L1TEventInfoClient() {
0061   //empty
0062 }
0063 
0064 void L1TEventInfoClient::initialize() {
0065   if (m_verbose) {
0066     std::cout << "\nMonitor directory =             " << m_monitorDir << std::endl;
0067   }
0068 
0069   // L1 systems
0070 
0071   m_nrL1Systems = m_l1Systems.size();
0072 
0073   m_systemLabel.reserve(m_nrL1Systems);
0074   m_systemLabelExt.reserve(m_nrL1Systems);
0075   m_systemDisable.reserve(m_nrL1Systems);
0076 
0077   // on average five quality test per system - just a best guess
0078   m_systemQualityTestName.reserve(5 * m_nrL1Systems);
0079   m_systemQualityTestHist.reserve(5 * m_nrL1Systems);
0080   m_systemQtSummaryEnabled.reserve(5 * m_nrL1Systems);
0081 
0082   int indexSys = 0;
0083 
0084   int totalNrQualityTests = 0;
0085 
0086   for (std::vector<edm::ParameterSet>::const_iterator itSystem = m_l1Systems.begin(); itSystem != m_l1Systems.end();
0087        ++itSystem) {
0088     m_systemLabel.push_back(itSystem->getParameter<std::string>("SystemLabel"));
0089 
0090     m_systemLabelExt.push_back(itSystem->getParameter<std::string>("HwValLabel"));
0091 
0092     m_systemDisable.push_back(itSystem->getParameter<unsigned int>("SystemDisable"));
0093     // check the additional disable flag from m_disableL1Systems
0094     for (std::vector<std::string>::const_iterator itSys = m_disableL1Systems.begin(); itSys != m_disableL1Systems.end();
0095          ++itSys) {
0096       if (*itSys == m_systemLabel[indexSys]) {
0097         m_systemDisable[indexSys] = 1;
0098       }
0099     }
0100 
0101     std::vector<edm::ParameterSet> qTests = itSystem->getParameter<std::vector<edm::ParameterSet> >("QualityTests");
0102     size_t qtPerSystem = qTests.size();
0103 
0104     std::vector<std::string> qtNames;
0105     qtNames.reserve(qtPerSystem);
0106 
0107     std::vector<std::string> qtFullPathHists;
0108     qtFullPathHists.reserve(qtPerSystem);
0109 
0110     std::vector<unsigned int> qtSumEnabled;
0111     qtSumEnabled.reserve(qtPerSystem);
0112 
0113     for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
0114       totalNrQualityTests++;
0115 
0116       qtNames.push_back(itQT->getParameter<std::string>("QualityTestName"));
0117 
0118       qtFullPathHists.push_back(itQT->getParameter<std::string>("QualityTestHist"));
0119 
0120       unsigned int qtEnabled = itQT->getParameter<unsigned int>("QualityTestSummaryEnabled");
0121 
0122       qtSumEnabled.push_back(qtEnabled);
0123 
0124       if (qtEnabled) {
0125         m_totalNrQtSummaryEnabled++;
0126       }
0127     }
0128 
0129     m_systemQualityTestName.push_back(qtNames);
0130     m_systemQualityTestHist.push_back(qtFullPathHists);
0131     m_systemQtSummaryEnabled.push_back(qtSumEnabled);
0132 
0133     indexSys++;
0134   }
0135 
0136   // L1 objects
0137 
0138   //
0139   m_nrL1Objects = m_l1Objects.size();
0140 
0141   m_objectLabel.reserve(m_nrL1Objects);
0142   m_objectDisable.reserve(m_nrL1Objects);
0143 
0144   // on average five quality test per object - just a best guess
0145   m_objectQualityTestName.reserve(5 * m_nrL1Objects);
0146   m_objectQualityTestHist.reserve(5 * m_nrL1Objects);
0147   m_objectQtSummaryEnabled.reserve(5 * m_nrL1Objects);
0148 
0149   int indexObj = 0;
0150 
0151   for (std::vector<edm::ParameterSet>::const_iterator itObject = m_l1Objects.begin(); itObject != m_l1Objects.end();
0152        ++itObject) {
0153     m_objectLabel.push_back(itObject->getParameter<std::string>("ObjectLabel"));
0154 
0155     m_objectDisable.push_back(itObject->getParameter<unsigned int>("ObjectDisable"));
0156     // check the additional disable flag from m_disableL1Objects
0157     for (std::vector<std::string>::const_iterator itObj = m_disableL1Objects.begin(); itObj != m_disableL1Objects.end();
0158          ++itObj) {
0159       if (*itObj == m_objectLabel[indexObj]) {
0160         m_objectDisable[indexObj] = 1;
0161       }
0162     }
0163 
0164     std::vector<edm::ParameterSet> qTests = itObject->getParameter<std::vector<edm::ParameterSet> >("QualityTests");
0165     size_t qtPerObject = qTests.size();
0166 
0167     std::vector<std::string> qtNames;
0168     qtNames.reserve(qtPerObject);
0169 
0170     std::vector<std::string> qtFullPathHists;
0171     qtFullPathHists.reserve(qtPerObject);
0172 
0173     std::vector<unsigned int> qtSumEnabled;
0174     qtSumEnabled.reserve(qtPerObject);
0175 
0176     for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
0177       totalNrQualityTests++;
0178 
0179       qtNames.push_back(itQT->getParameter<std::string>("QualityTestName"));
0180 
0181       qtFullPathHists.push_back(itQT->getParameter<std::string>("QualityTestHist"));
0182 
0183       unsigned int qtEnabled = itQT->getParameter<unsigned int>("QualityTestSummaryEnabled");
0184 
0185       qtSumEnabled.push_back(qtEnabled);
0186 
0187       if (qtEnabled) {
0188         m_totalNrQtSummaryEnabled++;
0189       }
0190     }
0191 
0192     m_objectQualityTestName.push_back(qtNames);
0193     m_objectQualityTestHist.push_back(qtFullPathHists);
0194     m_objectQtSummaryEnabled.push_back(qtSumEnabled);
0195 
0196     indexObj++;
0197   }
0198 
0199   m_summaryContent.reserve(m_nrL1Systems + m_nrL1Objects);
0200   m_meReportSummaryContent.reserve(totalNrQualityTests);
0201 }
0202 
0203 void L1TEventInfoClient::dqmEndLuminosityBlock(DQMStore::IBooker& ibooker,
0204                                                DQMStore::IGetter& igetter,
0205                                                const edm::LuminosityBlock& lumiSeg,
0206                                                const edm::EventSetup& evSetup) {
0207   if (m_runInEndLumi) {
0208     book(ibooker, igetter);
0209     readQtResults(ibooker, igetter);
0210 
0211     if (m_verbose) {
0212       std::cout << "\n  L1TEventInfoClient::endLuminosityBlock\n" << std::endl;
0213       dumpContentMonitorElements(ibooker, igetter);
0214     }
0215   }
0216 }
0217 
0218 void L1TEventInfoClient::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
0219   book(ibooker, igetter);
0220 
0221   readQtResults(ibooker, igetter);
0222 
0223   if (m_verbose) {
0224     std::cout << "\n  L1TEventInfoClient::endRun\n" << std::endl;
0225     dumpContentMonitorElements(ibooker, igetter);
0226   }
0227 }
0228 
0229 void L1TEventInfoClient::dumpContentMonitorElements(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
0230   std::cout << "\nSummary report " << std::endl;
0231 
0232   // summary content
0233 
0234   MonitorElement* me = igetter.get(m_meReportSummaryMap->getName());
0235 
0236   std::cout << "\nSummary content per system and object as filled in histogram\n  " << m_meReportSummaryMap->getName()
0237             << std::endl;
0238 
0239   if (!me) {
0240     std::cout << "\nNo histogram " << m_meReportSummaryMap->getName()
0241               << "\nNo summary content per system and object as filled in histogram.\n  " << std::endl;
0242     return;
0243   }
0244 
0245   TH2F* hist = me->getTH2F();
0246 
0247   const int nBinsX = hist->GetNbinsX();
0248   const int nBinsY = hist->GetNbinsY();
0249   std::cout << nBinsX << " " << nBinsY;
0250 
0251   std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(nBinsY));
0252 
0253   //    for (int iBinX = 0; iBinX < nBinsX; iBinX++) {
0254   //        for (int iBinY = 0; iBinY < nBinsY; iBinY++) {
0255   //            meReportSummaryMap[iBinX][iBinY]
0256   //                    = static_cast<int>(me->GetBinContent(iBinX + 1, iBinY + 1));
0257   //        }
0258   //    }
0259 
0260   std::cout << "\nL1 systems: " << m_nrL1Systems << " systems included\n"
0261             << "\n Summary content size: " << (m_summaryContent.size()) << std::endl;
0262 
0263   for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
0264     std::cout << std::setw(10) << m_systemLabel[iSys] << std::setw(10) << m_systemLabelExt[iSys] << " \t"
0265               << m_systemDisable[iSys] << " \t" << std::setw(25) << " m_summaryContent[" << std::setw(2) << iSys
0266               << "] = " << meReportSummaryMap[0][iSys] << std::endl;
0267   }
0268 
0269   std::cout << "\n L1 trigger objects: " << m_nrL1Objects << " objects included\n" << std::endl;
0270 
0271   for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems + m_nrL1Objects; ++iMon) {
0272     std::cout << std::setw(20) << m_objectLabel[iMon - m_nrL1Systems] << " \t" << m_objectDisable[iMon - m_nrL1Systems]
0273               << " \t" << std::setw(25) << " m_summaryContent[" << std::setw(2) << iMon << "] = \t"
0274               << m_summaryContent[iMon] << std::endl;
0275   }
0276 
0277   std::cout << std::endl;
0278 
0279   // quality tests
0280 
0281   std::cout << "\nQuality test results as filled in "
0282             << "\n  " << m_monitorDir << "/EventInfo/reportSummaryContents\n"
0283             << "\n  Total number of quality tests: " << (m_meReportSummaryContent.size()) << "\n"
0284             << std::endl;
0285 
0286   for (std::vector<MonitorElement*>::const_iterator itME = m_meReportSummaryContent.begin();
0287        itME != m_meReportSummaryContent.end();
0288        ++itME) {
0289     std::cout << std::setw(50) << (*itME)->getName() << " \t" << std::setw(25) << (*itME)->getFloatValue() << std::endl;
0290   }
0291 
0292   std::cout << std::endl;
0293 }
0294 
0295 void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
0296   std::string dirEventInfo = m_monitorDir + "/EventInfo";
0297 
0298   ibooker.setCurrentFolder(dirEventInfo);
0299 
0300   // ...and book it again
0301   m_meReportSummary = ibooker.bookFloat("reportSummary");
0302 
0303   // initialize reportSummary to 1
0304 
0305   if (m_meReportSummary) {
0306     m_meReportSummary->Fill(1);
0307   }
0308 
0309   // define float histograms for reportSummaryContents (one histogram per quality test),
0310   // initialize them to zero
0311   // initialize also m_summaryContent to dqm::qstatus::DISABLED
0312 
0313   ibooker.setCurrentFolder(dirEventInfo + "/reportSummaryContents");
0314   // general counters:
0315   //   iAllQTest: all quality tests for all systems and objects
0316   //   iAllMon:   all monitored systems and objects
0317   int iAllQTest = 0;
0318   int iAllMon = 0;
0319 
0320   for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
0321     m_summaryContent.push_back(dqm::qstatus::DISABLED);
0322 
0323     const std::vector<std::string>& sysQtName = m_systemQualityTestName[iMon];
0324 
0325     for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
0326          ++itQtName) {
0327       const std::string hStr = m_monitorDir + "_L1Sys_" + m_systemLabel[iMon] + "_" + (*itQtName);
0328 
0329       m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
0330       m_meReportSummaryContent[iAllQTest]->Fill(0.);
0331 
0332       iAllQTest++;
0333     }
0334 
0335     iAllMon++;
0336   }
0337 
0338   for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
0339     m_summaryContent.push_back(dqm::qstatus::DISABLED);
0340 
0341     const std::vector<std::string>& objQtName = m_objectQualityTestName[iMon];
0342 
0343     for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
0344          ++itQtName) {
0345       const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_" + (*itQtName);
0346 
0347       m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
0348       m_meReportSummaryContent[iAllQTest]->Fill(0.);
0349 
0350       iAllQTest++;
0351     }
0352 
0353     iAllMon++;
0354   }
0355 
0356   ibooker.setCurrentFolder(dirEventInfo);
0357 
0358   // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
0359 
0360   int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
0361 
0362   m_meReportSummaryMap = ibooker.book2D("reportSummaryMap", "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
0363 
0364   if (m_monitorDir == "L1TEMU") {
0365     m_meReportSummaryMap->setTitle("L1TEMU: L1 Emulator vs Data Report Summary Map");
0366 
0367   } else if (m_monitorDir == "L1T") {
0368     m_meReportSummaryMap->setTitle("L1T: L1 Trigger Data Report Summary Map");
0369   } else {
0370     // do nothing
0371   }
0372 
0373   m_meReportSummaryMap->setAxisTitle("", 1);
0374   m_meReportSummaryMap->setAxisTitle("", 2);
0375 
0376   m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
0377   m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
0378 
0379   for (int iBin = 0; iBin < nBinsY; ++iBin) {
0380     m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
0381   }
0382 }
0383 
0384 void L1TEventInfoClient::readQtResults(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
0385   // initialize summary content, summary sum and ReportSummaryContent float histograms
0386   // for all L1 systems and L1 objects
0387 
0388   for (std::vector<int>::iterator it = m_summaryContent.begin(); it != m_summaryContent.end(); ++it) {
0389     (*it) = dqm::qstatus::DISABLED;
0390   }
0391 
0392   m_summarySum = 0.;
0393 
0394   for (std::vector<MonitorElement*>::iterator itME = m_meReportSummaryContent.begin();
0395        itME != m_meReportSummaryContent.end();
0396        ++itME) {
0397     (*itME)->Fill(0.);
0398   }
0399 
0400   // general counters:
0401   //   iAllQTest: all quality tests for all systems and objects
0402   //   iAllMon:   all monitored systems and objects
0403   int iAllQTest = 0;
0404   int iAllMon = 0;
0405 
0406   // quality tests for all L1 systems
0407 
0408   for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
0409     // get the reports for each quality test
0410 
0411     const std::vector<std::string>& sysQtName = m_systemQualityTestName[iSys];
0412     const std::vector<std::string>& sysQtHist = m_systemQualityTestHist[iSys];
0413     const std::vector<unsigned int>& sysQtSummaryEnabled = m_systemQtSummaryEnabled[iSys];
0414 
0415     // pro system counter for quality tests
0416     int iSysQTest = 0;
0417 
0418     for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
0419          ++itQtName) {
0420       // get results, status and message
0421 
0422       MonitorElement* qHist = igetter.get(sysQtHist[iSysQTest]);
0423 
0424       if (qHist) {
0425         const std::vector<QReport*> qtVec = qHist->getQReports();
0426 
0427         if (m_verbose) {
0428           std::cout << "\nNumber of quality tests "
0429                     << " for histogram " << sysQtHist[iSysQTest] << ": " << qtVec.size() << "\n"
0430                     << std::endl;
0431         }
0432 
0433         const QReport* sysQReport = qHist->getQReport(*itQtName);
0434         if (sysQReport) {
0435           const float sysQtResult = sysQReport->getQTresult();
0436           const int sysQtStatus = sysQReport->getStatus();
0437           const std::string& sysQtMessage = sysQReport->getMessage();
0438 
0439           if (m_verbose) {
0440             std::cout << "\n"
0441                       << (*itQtName) << " quality test:"
0442                       << "\n  result:  " << sysQtResult << "\n  status:  " << sysQtStatus
0443                       << "\n  message: " << sysQtMessage << "\n"
0444                       << "\nFilling m_meReportSummaryContent[" << iAllQTest << "] with value " << sysQtResult << "\n"
0445                       << std::endl;
0446           }
0447 
0448           m_meReportSummaryContent[iAllQTest]->Fill(sysQtResult);
0449 
0450           // for the summary map, keep the highest status value ("ERROR") of all tests
0451           // which are considered for the summary plot
0452           if (sysQtSummaryEnabled[iSysQTest]) {
0453             if (sysQtStatus > m_summaryContent[iAllMon]) {
0454               m_summaryContent[iAllMon] = sysQtStatus;
0455             }
0456 
0457             m_summarySum += sysQtResult;
0458           }
0459 
0460         } else {
0461           // for the summary map, if the test was not found but it is assumed to be
0462           // considered for the summary plot, set it to dqm::qstatus::INVALID
0463 
0464           int sysQtStatus = dqm::qstatus::INVALID;
0465 
0466           if (sysQtSummaryEnabled[iSysQTest]) {
0467             if (sysQtStatus > m_summaryContent[iAllMon]) {
0468               m_summaryContent[iAllMon] = sysQtStatus;
0469             }
0470           }
0471 
0472           m_meReportSummaryContent[iAllQTest]->Fill(0.);
0473 
0474           if (m_verbose) {
0475             std::cout << "\n" << (*itQtName) << " quality test not found\n" << std::endl;
0476           }
0477         }
0478 
0479       } else {
0480         // for the summary map, if the histogram was not found but it is assumed
0481         // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
0482 
0483         int sysQtStatus = dqm::qstatus::INVALID;
0484 
0485         if (sysQtSummaryEnabled[iSysQTest]) {
0486           if (sysQtStatus > m_summaryContent[iAllMon]) {
0487             m_summaryContent[iAllMon] = sysQtStatus;
0488           }
0489         }
0490 
0491         m_meReportSummaryContent[iAllQTest]->Fill(0.);
0492 
0493         if (m_verbose) {
0494           std::cout << "\nHistogram " << sysQtHist[iSysQTest] << " not found\n" << std::endl;
0495         }
0496       }
0497 
0498       // increase counters for quality tests
0499       iSysQTest++;
0500       iAllQTest++;
0501     }
0502 
0503     iAllMon++;
0504   }
0505 
0506   // quality tests for all L1 objects
0507 
0508   for (unsigned int iObj = 0; iObj < m_nrL1Objects; ++iObj) {
0509     // get the reports for each quality test
0510 
0511     const std::vector<std::string>& objQtName = m_objectQualityTestName[iObj];
0512     const std::vector<std::string>& objQtHist = m_objectQualityTestHist[iObj];
0513     const std::vector<unsigned int>& objQtSummaryEnabled = m_objectQtSummaryEnabled[iObj];
0514 
0515     // pro object counter for quality tests
0516     int iObjQTest = 0;
0517 
0518     for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
0519          ++itQtName) {
0520       // get results, status and message
0521 
0522       MonitorElement* qHist = igetter.get(objQtHist[iObjQTest]);
0523 
0524       if (qHist) {
0525         const std::vector<QReport*> qtVec = qHist->getQReports();
0526 
0527         if (m_verbose) {
0528           std::cout << "\nNumber of quality tests "
0529                     << " for histogram " << objQtHist[iObjQTest] << ": " << qtVec.size() << "\n"
0530                     << std::endl;
0531         }
0532 
0533         const QReport* objQReport = qHist->getQReport(*itQtName);
0534         if (objQReport) {
0535           const float objQtResult = objQReport->getQTresult();
0536           const int objQtStatus = objQReport->getStatus();
0537           const std::string& objQtMessage = objQReport->getMessage();
0538 
0539           if (m_verbose) {
0540             std::cout << "\n"
0541                       << (*itQtName) << " quality test:"
0542                       << "\n  result:  " << objQtResult << "\n  status:  " << objQtStatus
0543                       << "\n  message: " << objQtMessage << "\n"
0544                       << "\nFilling m_meReportSummaryContent[" << iAllQTest << "] with value " << objQtResult << "\n"
0545                       << std::endl;
0546           }
0547 
0548           m_meReportSummaryContent[iAllQTest]->Fill(objQtResult);
0549 
0550           // for the summary map, keep the highest status value ("ERROR") of all tests
0551           // which are considered for the summary plot
0552           if (objQtSummaryEnabled[iObjQTest]) {
0553             if (objQtStatus > m_summaryContent[iAllMon]) {
0554               m_summaryContent[iAllMon] = objQtStatus;
0555             }
0556 
0557             m_summarySum += objQtResult;
0558           }
0559 
0560         } else {
0561           // for the summary map, if the test was not found but it is assumed to be
0562           // considered for the summary plot, set it to dqm::qstatus::INVALID
0563 
0564           int objQtStatus = dqm::qstatus::INVALID;
0565 
0566           if (objQtSummaryEnabled[iObjQTest]) {
0567             if (objQtStatus > m_summaryContent[iAllMon]) {
0568               m_summaryContent[iAllMon] = objQtStatus;
0569             }
0570           }
0571 
0572           m_meReportSummaryContent[iAllQTest]->Fill(0.);
0573 
0574           if (m_verbose) {
0575             std::cout << "\n" << (*itQtName) << " quality test not found\n" << std::endl;
0576           }
0577         }
0578 
0579       } else {
0580         // for the summary map, if the histogram was not found but it is assumed
0581         // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
0582 
0583         int objQtStatus = dqm::qstatus::INVALID;
0584 
0585         if (objQtSummaryEnabled[iObjQTest]) {
0586           if (objQtStatus > m_summaryContent[iAllMon]) {
0587             m_summaryContent[iAllMon] = objQtStatus;
0588           }
0589         }
0590 
0591         m_meReportSummaryContent[iAllQTest]->Fill(0.);
0592 
0593         if (m_verbose) {
0594           std::cout << "\nHistogram " << objQtHist[iObjQTest] << " not found\n" << std::endl;
0595         }
0596       }
0597 
0598       // increase counters for quality tests
0599       iObjQTest++;
0600       iAllQTest++;
0601     }
0602 
0603     iAllMon++;
0604   }
0605 
0606   // reportSummary value
0607   m_reportSummary = m_summarySum / float(m_totalNrQtSummaryEnabled);
0608   if (m_meReportSummary) {
0609     m_meReportSummary->Fill(m_reportSummary);
0610   }
0611 
0612   // fill the ReportSummaryMap for L1 systems (bin 1 on X)
0613   for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
0614     double summCont = static_cast<double>(m_summaryContent[iSys]);
0615     m_meReportSummaryMap->setBinContent(1, iSys + 1, summCont);
0616   }
0617 
0618   // fill the ReportSummaryMap for L1 objects (bin 2 on X)
0619   for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems + m_nrL1Objects; ++iMon) {
0620     double summCont = static_cast<double>(m_summaryContent[iMon]);
0621     m_meReportSummaryMap->setBinContent(2, iMon - m_nrL1Systems + 1, summCont);
0622   }
0623 }