18 : m_verbose(parSet.getUntrackedParameter<
bool>(
"verbose",
false)),
19 m_monitorDir(parSet.getUntrackedParameter<
std::
string>(
"monitorDir",
"")),
20 m_histDir(parSet.getUntrackedParameter<
std::
string>(
"histDir",
"")),
21 m_runInEventLoop(parSet.getUntrackedParameter<
bool>(
"runInEventLoop",
false)),
22 m_runInEndLumi(parSet.getUntrackedParameter<
bool>(
"runInEndLumi",
false)),
23 m_runInEndRun(parSet.getUntrackedParameter<
bool>(
"runInEndRun",
false)),
24 m_runInEndJob(parSet.getUntrackedParameter<
bool>(
"runInEndJob",
false)),
27 m_disableTrackObjects(parSet.getParameter<
std::
vector<
std::
string> >(
"DisableTrackObjects")),
28 m_disableHitObjects(parSet.getParameter<
std::
vector<
std::
string> >(
"DisableHitObjects")),
31 m_disableNoisyStrip(parSet.getParameter<
std::
vector<
std::
string> >(
"DisableNoisyStrip")),
32 m_disableDeadStrip(parSet.getParameter<
std::
vector<
std::
string> >(
"DisableDeadStrip")),
37 m_totalNrQtSummaryEnabled(0) {
65 int totalNrQualityTests = 0;
73 m_trackDisable.push_back(itTrack.getParameter<
unsigned int>(
"SystemDisable"));
81 std::vector<edm::ParameterSet> qTests = itTrack.getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
82 size_t qtPerSystem = qTests.size();
84 std::vector<std::string> qtNames;
85 qtNames.reserve(qtPerSystem);
87 std::vector<std::string> qtFullPathHists;
88 qtFullPathHists.reserve(qtPerSystem);
90 std::vector<unsigned int> qtSumEnabled;
91 qtSumEnabled.reserve(qtPerSystem);
94 std::cout <<
"\nLooping over track quality tests" << std::endl;
95 for (
const auto& itQT : qTests) {
96 totalNrQualityTests++;
98 qtNames.push_back(itQT.getParameter<
std::string>(
"QualityTestName"));
101 qtFullPathHists.push_back(itQT.getParameter<
std::string>(
"QualityTestHist"));
103 std::cout << qtFullPathHists.back() << std::endl;
105 unsigned int qtEnabled = itQT.getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
107 qtSumEnabled.push_back(qtEnabled);
139 m_hitDisable.push_back(itObject.getParameter<
unsigned int>(
"HitDisable"));
147 std::vector<edm::ParameterSet> qTests = itObject.getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
148 size_t qtPerObject = qTests.size();
150 std::vector<std::string> qtNames;
151 qtNames.reserve(qtPerObject);
153 std::vector<std::string> qtFullPathHists;
154 qtFullPathHists.reserve(qtPerObject);
156 std::vector<unsigned int> qtSumEnabled;
157 qtSumEnabled.reserve(qtPerObject);
160 std::cout <<
"\nLooping over hit quality tests" << std::endl;
161 for (
const auto& itQT : qTests) {
162 totalNrQualityTests++;
164 qtNames.push_back(itQT.getParameter<
std::string>(
"QualityTestName"));
167 qtFullPathHists.push_back(itQT.getParameter<
std::string>(
"QualityTestHist"));
169 std::cout << qtFullPathHists.back() << std::endl;
171 unsigned int qtEnabled = itQT.getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
173 qtSumEnabled.push_back(qtEnabled);
204 m_noisyDisable.push_back(itNoisy.getParameter<
unsigned int>(
"NoisyDisable"));
212 std::vector<edm::ParameterSet> qTests = itNoisy.getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
213 size_t qtPerNoisy = qTests.size();
215 std::vector<std::string> qtNames;
216 qtNames.reserve(qtPerNoisy);
218 std::vector<std::string> qtFullPathHists;
219 qtFullPathHists.reserve(qtPerNoisy);
221 std::vector<unsigned int> qtSumEnabled;
222 qtSumEnabled.reserve(qtPerNoisy);
225 std::cout <<
"\nLooping over noisy quality tests" << std::endl;
226 for (
const auto& itQT : qTests) {
227 totalNrQualityTests++;
229 qtNames.push_back(itQT.getParameter<
std::string>(
"QualityTestName"));
231 qtFullPathHists.push_back(itQT.getParameter<
std::string>(
"QualityTestHist"));
233 std::cout << qtFullPathHists.back() << std::endl;
235 unsigned int qtEnabled = itQT.getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
237 qtSumEnabled.push_back(qtEnabled);
268 m_deadDisable.push_back(itDead.getParameter<
unsigned int>(
"DeadDisable"));
276 std::vector<edm::ParameterSet> qTests = itDead.getParameter<std::vector<edm::ParameterSet> >(
"QualityTests");
277 size_t qtPerDead = qTests.size();
279 std::vector<std::string> qtNames;
280 qtNames.reserve(qtPerDead);
282 std::vector<std::string> qtFullPathHists;
283 qtFullPathHists.reserve(qtPerDead);
285 std::vector<unsigned int> qtSumEnabled;
286 qtSumEnabled.reserve(qtPerDead);
289 std::cout <<
"\nLooping over dead quality tests" << std::endl;
290 for (
const auto& itQT : qTests) {
291 totalNrQualityTests++;
293 qtNames.push_back(itQT.getParameter<
std::string>(
"QualityTestName"));
295 qtFullPathHists.push_back(itQT.getParameter<
std::string>(
"QualityTestHist"));
297 std::cout << qtFullPathHists.back() << std::endl;
299 unsigned int qtEnabled = itQT.getParameter<
unsigned int>(
"QualityTestSummaryEnabled");
301 qtSumEnabled.push_back(qtEnabled);
324 std::cout <<
"\nInside void L1TEMTFEventInfoClient::dqmEndLuminosityBlock" << std::endl;
326 book(ibooker, igetter);
330 std::cout <<
"\n L1TEMTFEventInfoClient::endLuminosityBlock\n" << std::endl;
338 std::cout <<
"\nInside void L1TEMTFEventInfoClient::dqmEndJob" << std::endl;
339 book(ibooker, igetter);
344 std::cout <<
"\n L1TEMTFEventInfoClient::endRun\n" << std::endl;
351 std::cout <<
"\nSummary report " << std::endl;
364 <<
"\nNo summary content per system and object as filled in histogram.\n " << std::endl;
368 TH2F*
hist =
me->getTH2F();
370 const int nBinsX =
hist->GetNbinsX();
371 const int nBinsY =
hist->GetNbinsY();
375 std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(nBinsY));
388 for (
unsigned int iTrackObj = 0; iTrackObj <
m_nrTrackObjects; ++iTrackObj) {
393 <<
m_trackDisable[iTrackObj] <<
" \t" << std::setw(25) <<
" m_summaryContent[" << std::setw(2)
394 << iTrackObj <<
"] = " << meReportSummaryMap[0][iTrackObj] << std::endl;
413 std::cout <<
"\nQuality test results as filled in " 414 <<
"\n " <<
m_monitorDir <<
"/EventInfo/reportSummaryContents\n" 420 std::cout << std::setw(50) << itME->getName() <<
" \t" << std::setw(25) << itME->getFloatValue() << std::endl;
429 std::cout <<
"\nInside void L1TEMTFEventInfoClient::book" << std::endl;
436 std::cout <<
"Ran ibooker.setCurrentFolder(dirEventInfo;" << std::endl;
441 std::cout <<
"Ran m_meReportSummary = ibooker.bookFloat" << std::endl;
447 std::cout <<
"Initializing reportSummary to 1" << std::endl;
450 std::cout <<
"Ran m_meReportSummary->Fill(1);" << std::endl;
459 std::cout <<
"Ran ibooker.setCurrentFolder(dirEventInfo" << std::endl;
468 std::cout <<
" * iMon = " << iMon << std::endl;
472 std::cout <<
"Ran m_summaryContent.push_back(dqm::qstatus::DISABLED);" << std::endl;
476 std::cout <<
"Ran const std::vector<std::string>& trackObjQtName = m_trackQualityTestName[iMon];" << std::endl;
478 for (
const auto& itQtName : trackObjQtName) {
481 <<
", (itQtName) = " << (itQtName) << std::endl;
485 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
493 std::cout <<
" - Ran m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));" << std::endl;
496 std::cout <<
" - Ran m_meReportSummaryContent[iAllQTest]->Fill(0.);" << std::endl;
504 std::cout <<
" * iMon = " << iMon << std::endl;
510 for (
const auto& itQtName : objQtName) {
513 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
521 std::cout <<
" - Ran m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));" << std::endl;
524 std::cout <<
" - Ran m_meReportSummaryContent[iAllQTest]->Fill(0.);" << std::endl;
536 for (
const auto& itQtName : objQtName) {
539 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
557 for (
const auto& itQtName : objQtName) {
560 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
574 std::cout <<
"Setting current folder to " << dirEventInfo << std::endl;
577 std::cout <<
"Ran ibooker.setCurrentFolder(dirEventInfo);" << std::endl;
584 ibooker.
book2D(
"reportSummaryMap_EMTF",
"reportSummaryMap_EMTF", 2, 1, 3, nBinsY, 1, nBinsY + 1);
586 "reportSummaryMap_chamberStrip",
"reportSummaryMap_chamberStrip", 2, 1, 3, nBinsYStrip, 1, nBinsYStrip + 1);
615 const std::vector<std::string> suffix_name = {
"-4/2",
"-4/1",
"-3/2",
"-3/1",
"-2/2",
"-2/1",
"-1/3",
616 "-1/2",
"-1/1b",
"-1/1a",
"+1/1a",
"+1/1b",
"+1/2",
"+1/3",
617 "+2/1",
"+2/2",
"+3/1",
"+3/2",
"+4/1",
"+4/2"};
618 for (
int iBin = 0; iBin < nBinsYStrip; ++iBin) {
628 std::cout <<
"\nInside L1TEMTFEventInfoClient::readQtResults" << std::endl;
648 for (
unsigned int iTrackObj = 0; iTrackObj <
m_nrTrackObjects; ++iTrackObj) {
656 int iTrackObjQTest = 0;
658 for (
const auto& itQtName : trackObjQtName) {
662 std::cout <<
" itQtName = " << (itQtName) << std::endl;
667 const std::vector<QReport*> qtVec = qHist->
getQReports();
673 std::cout <<
" - Number of quality tests" 675 <<
" for histogram " << trackObjQtHist[iTrackObjQTest] <<
": " << qtVec.size() <<
"\n" 679 const QReport* sysQReport = qHist->getQReport(itQtName);
681 const float trackObjQtResult = sysQReport->
getQTresult();
682 const int trackObjQtStatus = sysQReport->
getStatus();
687 << (itQtName) <<
" quality test:" 688 <<
"\n result: " << trackObjQtResult <<
"\n status: " << trackObjQtStatus
689 <<
"\n message: " << trackObjQtMessage <<
"\n" 690 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << trackObjQtResult
699 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
713 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
722 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
731 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
740 std::cout <<
"\nHistogram " << trackObjQtHist[iTrackObjQTest] <<
" not found\n" << std::endl;
753 for (
unsigned int iHitObj = 0; iHitObj <
m_nrHitObjects; ++iHitObj) {
761 int iHitObjQTest = 0;
763 for (
const auto& itQtName : hitObjQtName) {
769 const std::vector<QReport*> qtVec = qHist->
getQReports();
772 std::cout <<
"\nNumber of quality tests " 773 <<
" for histogram " << hitObjQtHist[iHitObjQTest] <<
": " << qtVec.size() <<
"\n" 778 const float hitObjQtResult = objQReport->
getQTresult();
779 const int hitObjQtStatus = objQReport->
getStatus();
784 << (itQtName) <<
" quality test:" 785 <<
"\n result: " << hitObjQtResult <<
"\n status: " << hitObjQtStatus
786 <<
"\n message: " << hitObjQtMessage <<
"\n" 787 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << hitObjQtResult <<
"\n" 795 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
809 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
818 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
827 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
836 std::cout <<
"\nHistogram " << hitObjQtHist[iHitObjQTest] <<
" not found\n" << std::endl;
847 for (
unsigned int iNoisyStrp = 0; iNoisyStrp <
m_nrNoisyStrip; ++iNoisyStrp) {
854 int iNoisyStrpQTest = 0;
856 for (
const auto& itQtName : noisyStrpQtName) {
861 const std::vector<QReport*> qtVec = qHist->
getQReports();
864 std::cout <<
"\nNumber of quality tests " 865 <<
" for histogram " << noisyStrpQtHist[iNoisyStrpQTest] <<
": " << qtVec.size() <<
"\n" 870 const float noisyStrpQtResult = objQReport->
getQTresult();
871 const int noisyStrpQtStatus = objQReport->
getStatus();
876 << (itQtName) <<
" quality test:" 877 <<
"\n result: " << noisyStrpQtResult <<
"\n status: " << noisyStrpQtStatus
878 <<
"\n message: " << noisyStrpQtMessage <<
"\n" 879 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << noisyStrpQtResult
888 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
901 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
910 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
919 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
928 std::cout <<
"\nHistogram " << noisyStrpQtHist[iNoisyStrpQTest] <<
" not found\n" << std::endl;
938 for (
unsigned int iDeadStrp = 0; iDeadStrp <
m_nrDeadStrip; ++iDeadStrp) {
945 int iDeadStrpQTest = 0;
947 for (
const auto& itQtName : deadStrpQtName) {
953 const std::vector<QReport*> qtVec = qHist->
getQReports();
956 std::cout <<
"\nNumber of quality tests " 957 <<
" for histogram " << deadStrpQtHist[iDeadStrpQTest] <<
": " << qtVec.size() <<
"\n" 962 const float deadStrpQtResult = objQReport->
getQTresult();
963 const int deadStrpQtStatus = objQReport->
getStatus();
968 << (itQtName) <<
" quality test:" 969 <<
"\n result: " << deadStrpQtResult <<
"\n status: " << deadStrpQtStatus
970 <<
"\n message: " << deadStrpQtMessage <<
"\n" 971 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << deadStrpQtResult
980 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
993 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
1002 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
1011 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
1020 std::cout <<
"\nHistogram " << deadStrpQtHist[iDeadStrpQTest] <<
" not found\n" << std::endl;
1037 for (
unsigned int iTrackObj = 0; iTrackObj <
m_nrTrackObjects; ++iTrackObj) {
void readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
read quality test results
std::vector< std::vector< std::string > > m_trackQualityTestName
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::vector< std::string > m_disableDeadStrip
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
std::vector< edm::ParameterSet > m_deadStrip
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
book histograms
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< std::string > m_disableTrackObjects
bool m_verbose
input parameters
float getQTresult() const
get test result i.e. prob value
std::vector< MonitorElementData::QReport * > getQReports() const
get map of QReports
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &, const edm::EventSetup &) override
std::vector< std::string > m_noisyLabel
size_t m_nrHitObjects
number of L1 trigger objects
std::vector< std::vector< std::string > > m_deadQualityTestHist
std::vector< std::vector< unsigned int > > m_deadQtSummaryEnabled
std::vector< int > m_deadDisable
def replace(string, replacements)
std::vector< std::string > m_deadLabel
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
end job
std::vector< std::vector< std::string > > m_hitQualityTestName
void initialize()
private methods
std::vector< edm::ParameterSet > m_hitObjects
MonitorElement * m_meReportSummary
a summary report
std::vector< std::vector< std::string > > m_noisyQualityTestName
std::vector< std::vector< unsigned int > > m_trackQtSummaryEnabled
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
std::vector< std::vector< std::string > > m_trackQualityTestHist
std::vector< std::vector< std::string > > m_hitQualityTestHist
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
static const int DISABLED
size_t m_nrDeadStrip
number of L1 trigger dead strips
size_t m_totalNrQtSummaryEnabled
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)
std::vector< std::vector< unsigned int > > m_hitQtSummaryEnabled
~L1TEMTFEventInfoClient() override
Destructor.
void dumpContentMonitorElements(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
dump the content of the monitoring elements defined in this module
std::vector< std::string > m_disableHitObjects
MonitorElement * m_meReportSummaryMap_chamberStrip
std::vector< std::string > m_trackLabel
const std::string & getMessage() const
get message attached to test
std::vector< int > m_trackDisable
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::vector< std::string > > m_noisyQualityTestHist
MonitorElement * m_meReportSummaryMap
report summary map
std::vector< std::vector< std::string > > m_deadQualityTestName
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< std::string > m_hitLabel
virtual MonitorElement * get(std::string const &fullpath) const
L1TEMTFEventInfoClient(const edm::ParameterSet &)
Constructor.
std::vector< edm::ParameterSet > m_trackObjects
const std::string & getName() const
get name of ME
Float_t m_reportSummary
summary report
std::vector< std::string > m_disableNoisyStrip
std::vector< int > m_noisyDisable
std::vector< int > m_summaryContent
int getStatus() const
get test status
std::vector< std::vector< unsigned int > > m_noisyQtSummaryEnabled
size_t m_nrTrackObjects
number of L1 trigger systems
std::vector< int > m_hitDisable
size_t m_nrNoisyStrip
number of L1 trigger noisy strips
std::vector< edm::ParameterSet > m_noisyStrip
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)