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)),
51 m_l1Systems(parSet.getParameter<std::vector<edm::
ParameterSet> >(
"L1Systems")),
52 m_l1Objects(parSet.getParameter<std::vector<edm::
ParameterSet> >(
"L1Objects")),
53 m_disableL1Systems(parSet.getParameter<std::vector<std::
string> >(
"DisableL1Systems")),
54 m_disableL1Objects(parSet.getParameter<std::vector<std::
string> >(
"DisableL1Objects")),
57 m_totalNrQtSummaryEnabled(0) {
94 int totalNrQualityTests = 0;
96 for (std::vector<edm::ParameterSet>::const_iterator itSystem =
108 for (std::vector<std::string>::const_iterator itSys =
117 std::vector < edm::ParameterSet > qTests = itSystem->getParameter<
118 std::vector<edm::ParameterSet> > (
"QualityTests");
119 size_t qtPerSystem = qTests.size();
121 std::vector < std::string > qtNames;
122 qtNames.reserve(qtPerSystem);
124 std::vector < std::string > qtFullPathHists;
125 qtFullPathHists.reserve(qtPerSystem);
127 std::vector<unsigned int> qtSumEnabled;
128 qtSumEnabled.reserve(qtPerSystem);
130 for (std::vector<edm::ParameterSet>::const_iterator itQT =
131 qTests.begin(); itQT != qTests.end(); ++itQT) {
133 totalNrQualityTests++;
136 itQT->getParameter<
std::string> (
"QualityTestName"));
138 qtFullPathHists.push_back(
139 itQT->getParameter<
std::string> (
"QualityTestHist"));
141 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
142 "QualityTestSummaryEnabled");
144 qtSumEnabled.push_back(qtEnabled);
174 for (std::vector<edm::ParameterSet>::const_iterator itObject =
183 for (std::vector<std::string>::const_iterator itObj =
192 std::vector < edm::ParameterSet > qTests = itObject->getParameter<
193 std::vector<edm::ParameterSet> > (
"QualityTests");
194 size_t qtPerObject = qTests.size();
196 std::vector < std::string > qtNames;
197 qtNames.reserve(qtPerObject);
199 std::vector < std::string > qtFullPathHists;
200 qtFullPathHists.reserve(qtPerObject);
202 std::vector<unsigned int> qtSumEnabled;
203 qtSumEnabled.reserve(qtPerObject);
205 for (std::vector<edm::ParameterSet>::const_iterator itQT =
206 qTests.begin(); itQT != qTests.end(); ++itQT) {
208 totalNrQualityTests++;
211 itQT->getParameter<
std::string> (
"QualityTestName"));
213 qtFullPathHists.push_back(
214 itQT->getParameter<
std::string> (
"QualityTestHist"));
216 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
217 "QualityTestSummaryEnabled");
219 qtSumEnabled.push_back(qtEnabled);
286 std::cout <<
"\n L1TEventInfoClient::endLuminosityBlock\n"
304 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
320 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
329 std::cout <<
"\nSummary report " << std::endl;
336 <<
"\nSummary content per system and object as filled in histogram\n "
342 <<
"\nNo summary content per system and object as filled in histogram.\n "
350 const int nBinsX = hist->GetNbinsX();
351 const int nBinsY = hist->GetNbinsY();
354 std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
372 <<
" \t" << std::setw(25) <<
" m_summaryContent["
373 << std::setw(2) << iSys <<
"] = " << meReportSummaryMap[0][iSys]
378 <<
" objects included\n" << std::endl;
380 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
385 << std::setw(25) <<
" m_summaryContent[" << std::setw(2)
393 std::cout <<
"\nQuality test results as filled in " <<
"\n "
395 <<
"\n Total number of quality tests: "
398 for (std::vector<MonitorElement*>::const_iterator itME =
402 std::cout << std::setw(50) << (*itME)->getName() <<
" \t"
403 << std::setw(25) << (*itME)->getFloatValue() << std::endl;
448 const std::vector<std::string>& sysQtName =
451 for (std::vector<std::string>::const_iterator itQtName =
452 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
470 const std::vector<std::string>& objQtName =
473 for (std::vector<std::string>::const_iterator itQtName =
474 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
497 int nBinsY =
std::max(m_nrL1Systems, m_nrL1Objects);
500 "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
504 "L1TEMU: L1 Emulator vs Data Report Summary Map");
508 "L1T: L1 Trigger Data Report Summary Map");
519 for (
int iBin = 0; iBin < nBinsY; ++iBin) {
541 for (std::vector<MonitorElement*>::iterator itME =
563 const std::vector<std::string>& sysQtName =
565 const std::vector<std::string>& sysQtHist =
567 const std::vector<unsigned int>& sysQtSummaryEnabled =
573 for (std::vector<std::string>::const_iterator itQtName =
574 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
581 const std::vector<QReport*> qtVec = qHist->
getQReports();
586 std::cout <<
"\nNumber of quality tests "
587 <<
" for histogram " << sysQtHist[iSysQTest]
588 <<
": " << qtVec.size() <<
"\n" << std::endl;
593 const float sysQtResult = sysQReport->
getQTresult();
594 const int sysQtStatus = sysQReport->
getStatus();
598 std::cout <<
"\n" << (*itQtName) <<
" quality test:"
599 <<
"\n result: " << sysQtResult
600 <<
"\n status: " << sysQtStatus
601 <<
"\n message: " << sysQtMessage <<
"\n"
602 <<
"\nFilling m_meReportSummaryContent["
603 << iAllQTest <<
"] with value "
604 << sysQtResult <<
"\n" << std::endl;
611 if (sysQtSummaryEnabled[iSysQTest]) {
628 if (sysQtSummaryEnabled[iSysQTest]) {
640 <<
" quality test not found\n" << std::endl;
650 if (sysQtSummaryEnabled[iSysQTest]) {
661 std::cout <<
"\nHistogram " << sysQtHist[iSysQTest]
662 <<
" not found\n" << std::endl;
683 const std::vector<std::string>& objQtName =
685 const std::vector<std::string>& objQtHist =
687 const std::vector<unsigned int>& objQtSummaryEnabled =
693 for (std::vector<std::string>::const_iterator itQtName =
694 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
701 const std::vector<QReport*> qtVec = qHist->
getQReports();
706 std::cout <<
"\nNumber of quality tests "
707 <<
" for histogram " << objQtHist[iObjQTest]
708 <<
": " << qtVec.size() <<
"\n" << std::endl;
713 const float objQtResult = objQReport->
getQTresult();
714 const int objQtStatus = objQReport->
getStatus();
718 std::cout <<
"\n" << (*itQtName) <<
" quality test:"
719 <<
"\n result: " << objQtResult
720 <<
"\n status: " << objQtStatus
721 <<
"\n message: " << objQtMessage <<
"\n"
722 <<
"\nFilling m_meReportSummaryContent["
723 << iAllQTest <<
"] with value "
724 << objQtResult <<
"\n" << std::endl;
731 if (objQtSummaryEnabled[iObjQTest]) {
747 if (objQtSummaryEnabled[iObjQTest]) {
759 <<
" quality test not found\n" << std::endl;
770 if (objQtSummaryEnabled[iObjQTest]) {
780 std::cout <<
"\nHistogram " << objQtHist[iObjQTest]
781 <<
" not found\n" << std::endl;
811 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
void bookHistograms()
book histograms
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
void beginRun(const edm::Run &, const edm::EventSetup &)
begin run
L1TEventInfoClient(const edm::ParameterSet &)
Constructor.
std::vector< std::string > m_systemLabel
void readQtResults()
read quality test results
void endRun(const edm::Run &, const edm::EventSetup &)
end run
std::vector< std::string > m_systemLabelExt
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
const std::string & getMessage(void) const
get message attached to test
MonitorElement * bookFloat(const char *name)
Book float.
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
Float_t m_reportSummary
summary report
virtual ~L1TEventInfoClient()
Destructor.
MonitorElement * m_meReportSummary
a summary report
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
size_t m_totalNrQtSummaryEnabled
void removeElement(const std::string &name)
void analyze(const edm::Event &, const edm::EventSetup &)
analyze
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
static const int DISABLED
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
end luminosity block
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< int > m_systemDisable
std::vector< std::string > m_objectLabel
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
begin luminosity block
void dumpContentMonitorElements()
dump the content of the monitoring elements defined in this module
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
size_t m_nrL1Systems
number of L1 trigger systems
volatile std::atomic< bool > shutdown_flag false
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.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
std::vector< int > m_summaryContent
bool m_verbose
input parameters