32 trackingCertificationBooked_(
false),
33 trackingLSCertificationBooked_(
false),
35 allPixelFEDConnected_(
true),
38 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
53 TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
56 std::vector<edm::ParameterSet> TrackingGlobalQualityMEs =
57 pSet_.
getParameter<std::vector<edm::ParameterSet> >(
"TrackingGlobalQualityPSets");
58 for (
const auto& meQTset : TrackingGlobalQualityMEs) {
63 std::cout <<
"[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname <<
" in TrackingMEsMap"
65 TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
77 std::cout <<
"[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname <<
" in TrackingMEsMap"
79 TrackingLSMEsMap.insert(std::pair<std::string, TrackingLSMEs>(QTname, tracking_ls_mes));
88 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
99 std::cout <<
"[TrackingCertificationInfo::beginRun] starting .." << std::endl;
101 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo:: Begining of Run";
109 int nPixelFEDConnected_ = 0;
114 const int siPixelFeds = (siPixelFedIdMax - siPixelFedIdMin + 1);
118 runInfoRec->get(sumFED);
121 std::vector<int> FedsInIds = sumFED->
m_fed_in;
122 for (
auto fedID : FedsInIds) {
123 if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
125 ++nPixelFEDConnected_;
126 }
else if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
141 std::cout <<
"[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: "
149 if (!tracking_dir.empty())
157 hname =
"CertificationReportMap";
158 htitle =
"Tracking Certification Summary Map";
169 if (!tracking_dir.empty())
177 std::cout <<
"[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
178 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track" + meQTname);
180 std::cout <<
"[TrackingCertificationInfo::bookStatus] " << it->first <<
" exists ? " << it->second.TrackingFlag
189 std::cout <<
"[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: "
199 std::cout <<
"[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: "
207 if (!tracking_dir.empty())
214 if (!tracking_dir.empty())
223 std::cout <<
"[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
224 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track" + meQTname);
226 std::cout <<
"[TrackingCertificationInfo::bookStatus] " << it->first <<
" exists ? " << it->second.TrackingFlag
235 std::cout <<
"[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: "
247 edm::LogInfo(
"TrackingDaqInfo") <<
"TrackingDaqInfo::endLuminosityBlock";
262 std::cout <<
"[TrackingCertificationInfo::dqmEndJob]" << std::endl;
264 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo:: End Run";
274 std::cout <<
"[TrackingCertificationInfo::endRun] DONE" << std::endl;
289 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir
291 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir +
"/EventInfo/reportSummaryContents");
295 std::cout <<
"all_mes: " << all_mes.size() << std::endl;
305 if (
type ==
"pixel") {
306 it->second.TrackingFlag->Fill(
val);
309 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin <<
" val: " <<
val
311 th2d->SetBinContent(xbin + 1, 1,
val);
315 fval = fminf(fval,
val);
319 for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
324 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " <<
me->getName() << std::endl;
327 float val =
me->getFloatValue();
332 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first <<
" ["
333 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
337 if (
name.find(
type) != std::string::npos) {
339 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " <<
type
340 <<
" <---> name: " <<
name << std::endl;
341 it->second.TrackingFlag->Fill(
val);
343 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin <<
" val: " <<
val
346 th2d->SetBinContent(xbin + 1, 1,
val);
351 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first <<
" ["
352 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
355 fval = fminf(fval,
val);
359 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval
374 it->second.TrackingFlag->Reset();
388 it->second.TrackingFlag->Reset();
402 it->second.TrackingFlag->Fill(-1.0);
419 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
422 it->second.TrackingFlag->Fill(-1.0);
433 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
443 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir
447 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir
449 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir +
"/EventInfo/reportSummaryContents");
452 std::cout <<
"all_mes: " << all_mes.size() << std::endl;
454 for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
459 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " <<
me->getName() << std::endl;
462 float val =
me->getFloatValue();
464 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " <<
val << std::endl;
466 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
470 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first <<
" ["
471 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
476 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " <<
type << std::endl;
477 if (
name.find(
type) != std::string::npos) {
479 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " <<
type
480 <<
" <---> name: " <<
name << std::endl;
481 it->second.TrackingFlag->Fill(
val);
485 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first <<
" ["
486 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
492 float global_dqm_flag = 1.0;
493 std::string full_path = tracking_dir +
"/EventInfo/reportSummary";
498 std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag