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_disableL1Systems(parSet.getParameter<std::vector<std::
string> >(
"DisableL1Systems")),
56 m_disableL1Objects(parSet.getParameter<std::vector<std::
string> >(
"DisableL1Objects")),
59 m_totalNrQtSummaryEnabled(0) {
96 int totalNrQualityTests = 0;
98 for (std::vector<edm::ParameterSet>::const_iterator itSystem =
110 for (std::vector<std::string>::const_iterator itSys =
119 std::vector < edm::ParameterSet > qTests = itSystem->getParameter<
120 std::vector<edm::ParameterSet> > (
"QualityTests");
121 size_t qtPerSystem = qTests.size();
123 std::vector < std::string > qtNames;
124 qtNames.reserve(qtPerSystem);
126 std::vector < std::string > qtFullPathHists;
127 qtFullPathHists.reserve(qtPerSystem);
129 std::vector<unsigned int> qtSumEnabled;
130 qtSumEnabled.reserve(qtPerSystem);
132 for (std::vector<edm::ParameterSet>::const_iterator itQT =
133 qTests.begin(); itQT != qTests.end(); ++itQT) {
135 totalNrQualityTests++;
138 itQT->getParameter<
std::string> (
"QualityTestName"));
140 qtFullPathHists.push_back(
141 itQT->getParameter<
std::string> (
"QualityTestHist"));
143 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
144 "QualityTestSummaryEnabled");
146 qtSumEnabled.push_back(qtEnabled);
176 for (std::vector<edm::ParameterSet>::const_iterator itObject =
185 for (std::vector<std::string>::const_iterator itObj =
194 std::vector < edm::ParameterSet > qTests = itObject->getParameter<
195 std::vector<edm::ParameterSet> > (
"QualityTests");
196 size_t qtPerObject = qTests.size();
198 std::vector < std::string > qtNames;
199 qtNames.reserve(qtPerObject);
201 std::vector < std::string > qtFullPathHists;
202 qtFullPathHists.reserve(qtPerObject);
204 std::vector<unsigned int> qtSumEnabled;
205 qtSumEnabled.reserve(qtPerObject);
207 for (std::vector<edm::ParameterSet>::const_iterator itQT =
208 qTests.begin(); itQT != qTests.end(); ++itQT) {
210 totalNrQualityTests++;
213 itQT->getParameter<
std::string> (
"QualityTestName"));
215 qtFullPathHists.push_back(
216 itQT->getParameter<
std::string> (
"QualityTestHist"));
218 unsigned int qtEnabled = itQT->getParameter<
unsigned int> (
219 "QualityTestSummaryEnabled");
221 qtSumEnabled.push_back(qtEnabled);
288 std::cout <<
"\n L1TEventInfoClient::endLuminosityBlock\n"
306 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
322 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
331 std::cout <<
"\nSummary report " << std::endl;
338 <<
"\nSummary content per system and object as filled in histogram\n "
344 <<
"\nNo summary content per system and object as filled in histogram.\n "
352 const int nBinsX = hist->GetNbinsX();
353 const int nBinsY = hist->GetNbinsY();
356 std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
374 <<
" \t" << std::setw(25) <<
" m_summaryContent["
375 << std::setw(2) << iSys <<
"] = " << meReportSummaryMap[0][iSys]
380 <<
" objects included\n" << std::endl;
382 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
387 << std::setw(25) <<
" m_summaryContent[" << std::setw(2)
395 std::cout <<
"\nQuality test results as filled in " <<
"\n "
397 <<
"\n Total number of quality tests: "
400 for (std::vector<MonitorElement*>::const_iterator itME =
404 std::cout << std::setw(50) << (*itME)->getName() <<
" \t"
405 << std::setw(25) << (*itME)->getFloatValue() << std::endl;
453 const std::vector<std::string>& sysQtName =
456 for (std::vector<std::string>::const_iterator itQtName =
457 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
461 const char* cStr = hStr.c_str();
462 sprintf(histoQT, cStr);
478 const std::vector<std::string>& objQtName =
481 for (std::vector<std::string>::const_iterator itQtName =
482 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
487 const char* cStr = hStr.c_str();
488 sprintf(histoQT, cStr);
508 int nBinsY =
std::max(m_nrL1Systems, m_nrL1Objects);
511 "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
515 "L1TEMU: L1 Emulator vs Data Report Summary Map");
519 "L1T: L1 Trigger Data Report Summary Map");
530 for (
int iBin = 0; iBin < nBinsY; ++iBin) {
552 for (std::vector<MonitorElement*>::iterator itME =
574 const std::vector<std::string>& sysQtName =
576 const std::vector<std::string>& sysQtHist =
578 const std::vector<unsigned int>& sysQtSummaryEnabled =
584 for (std::vector<std::string>::const_iterator itQtName =
585 sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
592 const std::vector<QReport*> qtVec = qHist->
getQReports();
597 std::cout <<
"\nNumber of quality tests "
598 <<
" for histogram " << sysQtHist[iSysQTest]
599 <<
": " << qtVec.size() <<
"\n" << std::endl;
604 const float sysQtResult = sysQReport->
getQTresult();
605 const int sysQtStatus = sysQReport->
getStatus();
609 std::cout <<
"\n" << (*itQtName) <<
" quality test:"
610 <<
"\n result: " << sysQtResult
611 <<
"\n status: " << sysQtStatus
612 <<
"\n message: " << sysQtMessage <<
"\n"
613 <<
"\nFilling m_meReportSummaryContent["
614 << iAllQTest <<
"] with value "
615 << sysQtResult <<
"\n" << std::endl;
622 if (sysQtSummaryEnabled[iSysQTest]) {
639 if (sysQtSummaryEnabled[iSysQTest]) {
651 <<
" quality test not found\n" << std::endl;
661 if (sysQtSummaryEnabled[iSysQTest]) {
672 std::cout <<
"\nHistogram " << sysQtHist[iSysQTest]
673 <<
" not found\n" << std::endl;
694 const std::vector<std::string>& objQtName =
696 const std::vector<std::string>& objQtHist =
698 const std::vector<unsigned int>& objQtSummaryEnabled =
704 for (std::vector<std::string>::const_iterator itQtName =
705 objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
712 const std::vector<QReport*> qtVec = qHist->
getQReports();
717 std::cout <<
"\nNumber of quality tests "
718 <<
" for histogram " << objQtHist[iObjQTest]
719 <<
": " << qtVec.size() <<
"\n" << std::endl;
724 const float objQtResult = objQReport->
getQTresult();
725 const int objQtStatus = objQReport->
getStatus();
729 std::cout <<
"\n" << (*itQtName) <<
" quality test:"
730 <<
"\n result: " << objQtResult
731 <<
"\n status: " << objQtStatus
732 <<
"\n message: " << objQtMessage <<
"\n"
733 <<
"\nFilling m_meReportSummaryContent["
734 << iAllQTest <<
"] with value "
735 << objQtResult <<
"\n" << std::endl;
742 if (objQtSummaryEnabled[iObjQTest]) {
758 if (objQtSummaryEnabled[iObjQTest]) {
770 <<
" quality test not found\n" << std::endl;
781 if (objQtSummaryEnabled[iObjQTest]) {
791 std::cout <<
"\nHistogram " << objQtHist[iObjQTest]
792 <<
" not found\n" << std::endl;
822 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.
const T & max(const T &a, const T &b)
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
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