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;
470 std::cout <<
" * iMon = " << iMon << std::endl;
474 std::cout <<
"Ran m_summaryContent.push_back(dqm::qstatus::DISABLED);" << std::endl;
478 std::cout <<
"Ran const std::vector<std::string>& trackObjQtName = m_trackQualityTestName[iMon];" << std::endl;
480 for (
const auto& itQtName : trackObjQtName) {
483 <<
", (itQtName) = " << (itQtName) << std::endl;
487 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
495 std::cout <<
" - Ran m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));" << std::endl;
498 std::cout <<
" - Ran m_meReportSummaryContent[iAllQTest]->Fill(0.);" << std::endl;
508 std::cout <<
" * iMon = " << iMon << std::endl;
514 for (
const auto& itQtName : objQtName) {
517 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
525 std::cout <<
" - Ran m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));" << std::endl;
528 std::cout <<
" - Ran m_meReportSummaryContent[iAllQTest]->Fill(0.);" << std::endl;
542 for (
const auto& itQtName : objQtName) {
545 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
564 for (
const auto& itQtName : objQtName) {
567 std::replace(m_mon_mod.begin(), m_mon_mod.end(),
'/',
'_');
582 std::cout <<
"Setting current folder to " << dirEventInfo << std::endl;
585 std::cout <<
"Ran ibooker.setCurrentFolder(dirEventInfo);" << std::endl;
592 ibooker.
book2D(
"reportSummaryMap_EMTF",
"reportSummaryMap_EMTF", 2, 1, 3, nBinsY, 1, nBinsY + 1);
594 "reportSummaryMap_chamberStrip",
"reportSummaryMap_chamberStrip", 2, 1, 3, nBinsYStrip, 1, nBinsYStrip + 1);
623 const std::vector<std::string> suffix_name = {
"-4/2",
"-4/1",
"-3/2",
"-3/1",
"-2/2",
"-2/1",
"-1/3",
624 "-1/2",
"-1/1b",
"-1/1a",
"+1/1a",
"+1/1b",
"+1/2",
"+1/3",
625 "+2/1",
"+2/2",
"+3/1",
"+3/2",
"+4/1",
"+4/2"};
626 for (
int iBin = 0; iBin < nBinsYStrip; ++iBin) {
636 std::cout <<
"\nInside L1TEMTFEventInfoClient::readQtResults" << std::endl;
656 for (
unsigned int iTrackObj = 0; iTrackObj <
m_nrTrackObjects; ++iTrackObj) {
664 int iTrackObjQTest = 0;
666 for (
const auto& itQtName : trackObjQtName) {
670 std::cout <<
" itQtName = " << (itQtName) << std::endl;
675 const std::vector<QReport*> qtVec = qHist->
getQReports();
681 std::cout <<
" - Number of quality tests"
683 <<
" for histogram " << trackObjQtHist[iTrackObjQTest] <<
": " << qtVec.size() <<
"\n"
687 const QReport* sysQReport = qHist->getQReport(itQtName);
689 const float trackObjQtResult = sysQReport->
getQTresult();
690 const int trackObjQtStatus = sysQReport->
getStatus();
695 << (itQtName) <<
" quality test:"
696 <<
"\n result: " << trackObjQtResult <<
"\n status: " << trackObjQtStatus
697 <<
"\n message: " << trackObjQtMessage <<
"\n"
698 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << trackObjQtResult
707 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
721 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
730 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
739 if (trackObjQtSummaryEnabled[iTrackObjQTest]) {
748 std::cout <<
"\nHistogram " << trackObjQtHist[iTrackObjQTest] <<
" not found\n" << std::endl;
761 for (
unsigned int iHitObj = 0; iHitObj <
m_nrHitObjects; ++iHitObj) {
769 int iHitObjQTest = 0;
771 for (
const auto& itQtName : hitObjQtName) {
777 const std::vector<QReport*> qtVec = qHist->
getQReports();
780 std::cout <<
"\nNumber of quality tests "
781 <<
" for histogram " << hitObjQtHist[iHitObjQTest] <<
": " << qtVec.size() <<
"\n"
786 const float hitObjQtResult = objQReport->
getQTresult();
787 const int hitObjQtStatus = objQReport->
getStatus();
792 << (itQtName) <<
" quality test:"
793 <<
"\n result: " << hitObjQtResult <<
"\n status: " << hitObjQtStatus
794 <<
"\n message: " << hitObjQtMessage <<
"\n"
795 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << hitObjQtResult <<
"\n"
803 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
817 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
826 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
835 if (hitObjQtSummaryEnabled[iHitObjQTest]) {
844 std::cout <<
"\nHistogram " << hitObjQtHist[iHitObjQTest] <<
" not found\n" << std::endl;
855 for (
unsigned int iNoisyStrp = 0; iNoisyStrp <
m_nrNoisyStrip; ++iNoisyStrp) {
862 int iNoisyStrpQTest = 0;
864 for (
const auto& itQtName : noisyStrpQtName) {
869 const std::vector<QReport*> qtVec = qHist->
getQReports();
872 std::cout <<
"\nNumber of quality tests "
873 <<
" for histogram " << noisyStrpQtHist[iNoisyStrpQTest] <<
": " << qtVec.size() <<
"\n"
878 const float noisyStrpQtResult = objQReport->
getQTresult();
879 const int noisyStrpQtStatus = objQReport->
getStatus();
884 << (itQtName) <<
" quality test:"
885 <<
"\n result: " << noisyStrpQtResult <<
"\n status: " << noisyStrpQtStatus
886 <<
"\n message: " << noisyStrpQtMessage <<
"\n"
887 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << noisyStrpQtResult
896 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
909 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
918 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
927 if (noisyStrpQtSummaryEnabled[iNoisyStrpQTest]) {
936 std::cout <<
"\nHistogram " << noisyStrpQtHist[iNoisyStrpQTest] <<
" not found\n" << std::endl;
946 for (
unsigned int iDeadStrp = 0; iDeadStrp <
m_nrDeadStrip; ++iDeadStrp) {
953 int iDeadStrpQTest = 0;
955 for (
const auto& itQtName : deadStrpQtName) {
961 const std::vector<QReport*> qtVec = qHist->
getQReports();
964 std::cout <<
"\nNumber of quality tests "
965 <<
" for histogram " << deadStrpQtHist[iDeadStrpQTest] <<
": " << qtVec.size() <<
"\n"
970 const float deadStrpQtResult = objQReport->
getQTresult();
971 const int deadStrpQtStatus = objQReport->
getStatus();
976 << (itQtName) <<
" quality test:"
977 <<
"\n result: " << deadStrpQtResult <<
"\n status: " << deadStrpQtStatus
978 <<
"\n message: " << deadStrpQtMessage <<
"\n"
979 <<
"\nFilling m_meReportSummaryContent[" << iAllQTest <<
"] with value " << deadStrpQtResult
988 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
1001 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
1010 std::cout <<
"\n" << (itQtName) <<
" quality test not found\n" << std::endl;
1019 if (deadStrpQtSummaryEnabled[iDeadStrpQTest]) {
1028 std::cout <<
"\nHistogram " << deadStrpQtHist[iDeadStrpQTest] <<
" not found\n" << std::endl;
1045 for (
unsigned int iTrackObj = 0; iTrackObj <
m_nrTrackObjects; ++iTrackObj) {