45 m_verbose(parSet.getUntrackedParameter<
bool>(
"verbose",
false)),
46 m_monitorDir(parSet.getUntrackedParameter<
std::
string>(
"monitorDir",
"")),
47 m_runInEventLoop(parSet.getUntrackedParameter<
bool>(
"runInEventLoop",
false)),
48 m_runInEndLumi(parSet.getUntrackedParameter<
bool>(
"runInEndLumi",
false)),
49 m_runInEndRun(parSet.getUntrackedParameter<
bool>(
"runInEndRun",
false)),
50 m_runInEndJob(parSet.getUntrackedParameter<
bool>(
"runInEndJob",
false)),
53 m_disableL1Systems(parSet.getParameter<
std::vector<
std::
string> >(
"DisableL1Systems")),
54 m_disableL1Objects(parSet.getParameter<
std::vector<
std::
string> >(
"DisableL1Objects")),
57 m_totalNrQtSummaryEnabled(0) {
91 int totalNrQualityTests = 0;
93 for (std::vector<edm::ParameterSet>::const_iterator itSystem =
105 for (std::vector<std::string>::const_iterator itSys =
114 std::vector < edm::ParameterSet > qTests = itSystem->getParameter<
115 std::vector<edm::ParameterSet> > (
"QualityTests");
116 size_t qtPerSystem = qTests.size();
118 std::vector < std::string > qtNames;
119 qtNames.reserve(qtPerSystem);
121 std::vector < std::string > qtFullPathHists;
122 qtFullPathHists.reserve(qtPerSystem);
124 std::vector<unsigned int> qtSumEnabled;
125 qtSumEnabled.reserve(qtPerSystem);
127 for (std::vector<edm::ParameterSet>::const_iterator itQT =
128 qTests.begin(); itQT != qTests.end(); ++itQT) {
130 totalNrQualityTests++;
133 itQT->getParameter<
std::string> (
"QualityTestName"));
135 qtFullPathHists.push_back(
136 itQT->getParameter<
std::string> (
"QualityTestHist"));
138 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
139 "QualityTestSummaryEnabled");
141 qtSumEnabled.push_back(qtEnabled);
171 for (std::vector<edm::ParameterSet>::const_iterator itObject =
180 for (std::vector<std::string>::const_iterator itObj =
189 std::vector < edm::ParameterSet > qTests = itObject->getParameter<
190 std::vector<edm::ParameterSet> > (
"QualityTests");
191 size_t qtPerObject = qTests.size();
193 std::vector < std::string > qtNames;
194 qtNames.reserve(qtPerObject);
196 std::vector < std::string > qtFullPathHists;
197 qtFullPathHists.reserve(qtPerObject);
199 std::vector<unsigned int> qtSumEnabled;
200 qtSumEnabled.reserve(qtPerObject);
202 for (std::vector<edm::ParameterSet>::const_iterator itQT =
203 qTests.begin(); itQT != qTests.end(); ++itQT) {
205 totalNrQualityTests++;
208 itQT->getParameter<
std::string> (
"QualityTestName"));
210 qtFullPathHists.push_back(
211 itQT->getParameter<
std::string> (
"QualityTestHist"));
213 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
214 "QualityTestSummaryEnabled");
216 qtSumEnabled.push_back(qtEnabled);
241 book(ibooker, igetter);
246 std::cout <<
"\n L1TEventInfoClient::endLuminosityBlock\n" 257 book(ibooker, igetter);
263 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
270 std::cout <<
"\nSummary report " << std::endl;
277 <<
"\nSummary content per system and object as filled in histogram\n " 283 <<
"\nNo summary content per system and object as filled in histogram.\n " 291 const int nBinsX = hist->GetNbinsX();
292 const int nBinsY = hist->GetNbinsY();
295 std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
313 <<
" \t" << std::setw(25) <<
" m_summaryContent[" 314 << std::setw(2) << iSys <<
"] = " << meReportSummaryMap[0][iSys]
319 <<
" objects included\n" << std::endl;
321 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
326 << std::setw(25) <<
" m_summaryContent[" << std::setw(2)
334 std::cout <<
"\nQuality test results as filled in " <<
"\n " 336 <<
"\n Total number of quality tests: " 339 for (std::vector<MonitorElement*>::const_iterator itME =
343 std::cout << std::setw(50) << (*itME)->getName() <<
" \t" 344 << std::setw(25) << (*itME)->getFloatValue() << std::endl;
389 const std::vector<std::string>& sysQtName =
392 for (std::vector<std::string>::const_iterator itQtName =
393 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
411 const std::vector<std::string>& objQtName =
414 for (std::vector<std::string>::const_iterator itQtName =
415 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
437 int nBinsY =
std::max(m_nrL1Systems, m_nrL1Objects);
440 "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
444 "L1TEMU: L1 Emulator vs Data Report Summary Map");
448 "L1T: L1 Trigger Data Report Summary Map");
459 for (
int iBin = 0; iBin < nBinsY; ++iBin) {
481 for (std::vector<MonitorElement*>::iterator itME =
503 const std::vector<std::string>& sysQtName =
505 const std::vector<std::string>& sysQtHist =
507 const std::vector<unsigned int>& sysQtSummaryEnabled =
513 for (std::vector<std::string>::const_iterator itQtName =
514 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
521 const std::vector<QReport*> qtVec = qHist->
getQReports();
525 std::cout <<
"\nNumber of quality tests " 526 <<
" for histogram " << sysQtHist[iSysQTest]
527 <<
": " << qtVec.size() <<
"\n" << std::endl;
532 const float sysQtResult = sysQReport->
getQTresult();
533 const int sysQtStatus = sysQReport->
getStatus();
537 std::cout <<
"\n" << (*itQtName) <<
" quality test:" 538 <<
"\n result: " << sysQtResult
539 <<
"\n status: " << sysQtStatus
540 <<
"\n message: " << sysQtMessage <<
"\n" 541 <<
"\nFilling m_meReportSummaryContent[" 542 << iAllQTest <<
"] with value " 543 << sysQtResult <<
"\n" << std::endl;
550 if (sysQtSummaryEnabled[iSysQTest]) {
567 if (sysQtSummaryEnabled[iSysQTest]) {
579 <<
" quality test not found\n" << std::endl;
589 if (sysQtSummaryEnabled[iSysQTest]) {
600 std::cout <<
"\nHistogram " << sysQtHist[iSysQTest]
601 <<
" not found\n" << std::endl;
622 const std::vector<std::string>& objQtName =
624 const std::vector<std::string>& objQtHist =
626 const std::vector<unsigned int>& objQtSummaryEnabled =
632 for (std::vector<std::string>::const_iterator itQtName =
633 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
640 const std::vector<QReport*> qtVec = qHist->
getQReports();
644 std::cout <<
"\nNumber of quality tests " 645 <<
" for histogram " << objQtHist[iObjQTest]
646 <<
": " << qtVec.size() <<
"\n" << std::endl;
651 const float objQtResult = objQReport->
getQTresult();
652 const int objQtStatus = objQReport->
getStatus();
656 std::cout <<
"\n" << (*itQtName) <<
" quality test:" 657 <<
"\n result: " << objQtResult
658 <<
"\n status: " << objQtStatus
659 <<
"\n message: " << objQtMessage <<
"\n" 660 <<
"\nFilling m_meReportSummaryContent[" 661 << iAllQTest <<
"] with value " 662 << objQtResult <<
"\n" << std::endl;
669 if (objQtSummaryEnabled[iObjQTest]) {
685 if (objQtSummaryEnabled[iObjQTest]) {
697 <<
" quality test not found\n" << std::endl;
708 if (objQtSummaryEnabled[iObjQTest]) {
718 std::cout <<
"\nHistogram " << objQtHist[iObjQTest]
719 <<
" not found\n" << std::endl;
749 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
std::vector< std::vector< std::string > > m_objectQualityTestHist
std::vector< std::vector< std::string > > m_systemQualityTestName
const std::string & getName(void) const
get name of ME
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
void initialize()
private methods
std::vector< edm::ParameterSet > m_l1Objects
std::vector< int > m_objectDisable
std::vector< edm::ParameterSet > m_l1Systems
L1TEventInfoClient(const edm::ParameterSet &)
Constructor.
std::vector< std::string > m_systemLabel
MonitorElement * get(const std::string &path)
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
end job
std::vector< std::string > m_systemLabelExt
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
book histograms
MonitorElement * m_meReportSummaryMap
report summary map
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)
std::vector< std::vector< std::string > > m_systemQualityTestHist
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
void readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
read quality test results
const std::string & getMessage(void) const
get message attached to test
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
Float_t m_reportSummary
summary report
MonitorElement * m_meReportSummary
a summary report
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
size_t m_totalNrQtSummaryEnabled
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
static const int DISABLED
~L1TEventInfoClient() override
Destructor.
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
void setCurrentFolder(const std::string &fullpath)
std::vector< QReport * > getQReports(void) const
get map of QReports
MonitorElement * book2D(Args &&...args)
std::vector< int > m_systemDisable
std::vector< std::string > m_objectLabel
std::vector< std::string > m_disableL1Objects
std::vector< std::string > m_disableL1Systems
std::vector< std::vector< std::string > > m_objectQualityTestName
size_t m_nrL1Objects
number of L1 trigger objects
float getQTresult(void) const
get test result i.e. prob value
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &, const edm::EventSetup &) override
size_t m_nrL1Systems
number of L1 trigger systems
MonitorElement * bookFloat(Args &&...args)
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void removeElement(Args &&...args)
std::vector< int > m_summaryContent
void dumpContentMonitorElements(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
dump the content of the monitoring elements defined in this module
bool m_verbose
input parameters