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) {
86 int totalNrQualityTests = 0;
88 for (std::vector<edm::ParameterSet>::const_iterator itSystem =
m_l1Systems.begin(); itSystem !=
m_l1Systems.end();
94 m_systemDisable.push_back(itSystem->getParameter<
unsigned int>(
"SystemDisable"));
103 std::vector<edm::ParameterSet> qTests = itSystem->getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
104 size_t qtPerSystem = qTests.size();
106 std::vector<std::string> qtNames;
107 qtNames.reserve(qtPerSystem);
109 std::vector<std::string> qtFullPathHists;
110 qtFullPathHists.reserve(qtPerSystem);
112 std::vector<unsigned int> qtSumEnabled;
113 qtSumEnabled.reserve(qtPerSystem);
115 for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
116 totalNrQualityTests++;
118 qtNames.push_back(itQT->getParameter<
std::string>(
"QualityTestName"));
120 qtFullPathHists.push_back(itQT->getParameter<
std::string>(
"QualityTestHist"));
122 unsigned int qtEnabled = itQT->getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
124 qtSumEnabled.push_back(qtEnabled);
153 for (std::vector<edm::ParameterSet>::const_iterator itObject =
m_l1Objects.begin(); itObject !=
m_l1Objects.end();
157 m_objectDisable.push_back(itObject->getParameter<
unsigned int>(
"ObjectDisable"));
166 std::vector<edm::ParameterSet> qTests = itObject->getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
167 size_t qtPerObject = qTests.size();
169 std::vector<std::string> qtNames;
170 qtNames.reserve(qtPerObject);
172 std::vector<std::string> qtFullPathHists;
173 qtFullPathHists.reserve(qtPerObject);
175 std::vector<unsigned int> qtSumEnabled;
176 qtSumEnabled.reserve(qtPerObject);
178 for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
179 totalNrQualityTests++;
181 qtNames.push_back(itQT->getParameter<
std::string>(
"QualityTestName"));
183 qtFullPathHists.push_back(itQT->getParameter<
std::string>(
"QualityTestHist"));
185 unsigned int qtEnabled = itQT->getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
187 qtSumEnabled.push_back(qtEnabled);
210 book(ibooker, igetter);
214 std::cout <<
"\n L1TEventInfoClient::endLuminosityBlock\n" << std::endl;
221 book(ibooker, igetter);
226 std::cout <<
"\n L1TEventInfoClient::endRun\n" << std::endl;
232 std::cout <<
"\nSummary report " << std::endl;
243 <<
"\nNo summary content per system and object as filled in histogram.\n " << std::endl;
249 const int nBinsX = hist->GetNbinsX();
250 const int nBinsY = hist->GetNbinsY();
253 std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(nBinsY));
267 <<
m_systemDisable[iSys] <<
" \t" << std::setw(25) <<
" m_summaryContent[" << std::setw(2) << iSys
268 <<
"] = " << meReportSummaryMap[0][iSys] << std::endl;
273 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems +
m_nrL1Objects; ++iMon) {
275 <<
" \t" << std::setw(25) <<
" m_summaryContent[" << std::setw(2) << iMon <<
"] = \t" 283 std::cout <<
"\nQuality test results as filled in " 284 <<
"\n " <<
m_monitorDir <<
"/EventInfo/reportSummaryContents\n" 291 std::cout << std::setw(50) << (*itME)->getName() <<
" \t" << std::setw(25) << (*itME)->getFloatValue() << std::endl;
327 for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
345 for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
362 int nBinsY =
std::max(m_nrL1Systems, m_nrL1Objects);
381 for (
int iBin = 0; iBin < nBinsY; ++iBin) {
420 for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
427 const std::vector<QReport*> qtVec = qHist->
getQReports();
430 std::cout <<
"\nNumber of quality tests " 431 <<
" for histogram " << sysQtHist[iSysQTest] <<
": " << qtVec.size() <<
"\n" 437 const float sysQtResult = sysQReport->
getQTresult();
438 const int sysQtStatus = sysQReport->
getStatus();
443 << (*itQtName) <<
" quality test:" 444 <<
"\n result: " << sysQtResult <<
"\n status: " << sysQtStatus
445 <<
"\n message: " << sysQtMessage <<
"\n" 446 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << sysQtResult <<
"\n" 454 if (sysQtSummaryEnabled[iSysQTest]) {
468 if (sysQtSummaryEnabled[iSysQTest]) {
477 std::cout <<
"\n" << (*itQtName) <<
" quality test not found\n" << std::endl;
487 if (sysQtSummaryEnabled[iSysQTest]) {
496 std::cout <<
"\nHistogram " << sysQtHist[iSysQTest] <<
" not found\n" << std::endl;
520 for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
527 const std::vector<QReport*> qtVec = qHist->
getQReports();
530 std::cout <<
"\nNumber of quality tests " 531 <<
" for histogram " << objQtHist[iObjQTest] <<
": " << qtVec.size() <<
"\n" 537 const float objQtResult = objQReport->
getQTresult();
538 const int objQtStatus = objQReport->
getStatus();
543 << (*itQtName) <<
" quality test:" 544 <<
"\n result: " << objQtResult <<
"\n status: " << objQtStatus
545 <<
"\n message: " << objQtMessage <<
"\n" 546 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << objQtResult <<
"\n" 554 if (objQtSummaryEnabled[iObjQTest]) {
568 if (objQtSummaryEnabled[iObjQTest]) {
577 std::cout <<
"\n" << (*itQtName) <<
" quality test not found\n" << std::endl;
587 if (objQtSummaryEnabled[iObjQTest]) {
596 std::cout <<
"\nHistogram " << objQtHist[iObjQTest] <<
" not found\n" << std::endl;
621 for (
unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems +
m_nrL1Objects; ++iMon) {
std::vector< std::vector< std::string > > m_objectQualityTestHist
std::vector< std::vector< std::string > > m_systemQualityTestName
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
virtual TH2F * getTH2F() const
void initialize()
private methods
std::vector< edm::ParameterSet > m_l1Objects
std::vector< int > m_objectDisable
std::vector< edm::ParameterSet > m_l1Systems
MonitorElement * bookFloat(TString const &name)
L1TEventInfoClient(const edm::ParameterSet &)
Constructor.
std::vector< std::string > m_systemLabel
void setCurrentFolder(std::string const &fullpath)
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
const std::string & getName() const
get name of ME
std::vector< std::vector< std::string > > m_systemQualityTestHist
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
read quality test results
Float_t m_reportSummary
summary report
MonitorElement * m_meReportSummary
a summary report
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
size_t m_totalNrQtSummaryEnabled
static const int DISABLED
~L1TEventInfoClient() override
Destructor.
virtual 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)
const std::string & getMessage() const
get message attached to test
std::vector< QReport * > getQReports() const
get map of QReports
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< int > m_systemDisable
std::vector< std::string > m_objectLabel
std::vector< std::string > m_disableL1Objects
std::vector< std::string > m_disableL1Systems
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
std::vector< std::vector< std::string > > m_objectQualityTestName
size_t m_nrL1Objects
number of L1 trigger objects
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &, const edm::EventSetup &) override
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
size_t m_nrL1Systems
number of L1 trigger systems
float getQTresult() const
get test result i.e. prob value
MonitorElement * get(std::string const &path)
std::vector< int > m_summaryContent
void dumpContentMonitorElements(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
dump the content of the monitoring elements defined in this module
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
bool m_verbose
input parameters