31 trackingCertificationBooked_(
false),
32 trackingLSCertificationBooked_(
false),
34 allPixelFEDConnected_(
true),
39 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 edm::LogInfo(
"TrackingCertificationInfo") <<
" inserting " << QTname <<
" in TrackingMEsMap" << std::endl;
64 TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
76 edm::LogInfo(
"TrackingCertificationInfo") <<
" inserting " << QTname <<
" in TrackingMEsMap" << std::endl;
77 TrackingLSMEsMap.insert(std::pair<std::string, TrackingLSMEs>(QTname, tracking_ls_mes));
86 edm::LogInfo(
"TrackingCertificationInfo") <<
"Deleting TrackingCertificationInfo ";
96 edm::LogInfo(
"TrackingCertificationInfo") <<
"beginRun starting .." << std::endl;
106 int nPixelFEDConnected_ = 0;
111 const int siPixelFeds = (siPixelFedIdMax - siPixelFedIdMin + 1);
118 for (
auto fedID : FedsInIds) {
119 if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
121 ++nPixelFEDConnected_;
122 }
else if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
146 if (!tracking_dir.empty())
154 hname =
"CertificationReportMap";
155 htitle =
"Tracking Certification Summary Map";
166 if (!tracking_dir.empty())
174 edm::LogInfo(
"TrackingCertificationInfo") <<
"bookStatus meQTname: " << meQTname << std::endl;
175 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track" + meQTname);
178 <<
"bookStatus " << it->first <<
" exists ? " << it->second.TrackingFlag << std::endl;
205 if (!tracking_dir.empty())
212 if (!tracking_dir.empty())
221 edm::LogInfo(
"TrackingCertificationInfo") <<
"bookStatus meQTname: " << meQTname << std::endl;
222 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track" + meQTname);
225 <<
"bookStatus " << it->first <<
" exists ? " << it->second.TrackingFlag << std::endl;
246 edm::LogInfo(
"TrackingCertificationInfo") <<
"endLuminosityBlock";
260 edm::LogInfo(
"TrackingCertificationInfo") <<
"dqmEndJob" << std::endl;
270 edm::LogInfo(
"TrackingCertificationInfo") <<
"[TrackingCertificationInfo::endRun] DONE" << std::endl;
277 edm::LogError(
"TrackingCertificationInfo") <<
"fillTrackingCertificationMEs : MEs missing " << std::endl;
286 <<
"fillTrackingCertificationMEs tracking_dir: " << tracking_dir << std::endl;
287 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir +
"/EventInfo/reportSummaryContents");
291 edm::LogInfo(
"TrackingCertificationInfo") <<
"all_mes: " << all_mes.size() << std::endl;
301 if (
type ==
"pixel") {
302 it->second.TrackingFlag->Fill(
val);
306 <<
"fillTrackingCertificationMEs xbin: " << xbin <<
" val: " <<
val << std::endl;
307 th2d->SetBinContent(xbin + 1, 1,
val);
311 fval = fminf(fval,
val);
315 for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
320 edm::LogInfo(
"TrackingCertificationInfo") <<
"fillTrackingCertificationMEs me: " <<
me->getName() << std::endl;
323 float val =
me->getFloatValue();
329 <<
"fillTrackingCertificationMEs ME: " << it->first <<
" [" << it->second.TrackingFlag->getFullname()
330 <<
"] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
333 if (
name.find(
type) != std::string::npos) {
336 <<
"fillTrackingCertificationMEs type: " <<
type <<
" <---> name: " <<
name << std::endl;
337 it->second.TrackingFlag->Fill(
val);
340 <<
"fillTrackingCertificationMEs xbin: " << xbin <<
" val: " <<
val << std::endl;
342 th2d->SetBinContent(xbin + 1, 1,
val);
348 <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first <<
" ["
349 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
352 fval = fminf(fval,
val);
357 <<
"fillTrackingCertificationMEs TrackingCertification: " << fval << std::endl;
371 it->second.TrackingFlag->Reset();
385 it->second.TrackingFlag->Reset();
399 it->second.TrackingFlag->Fill(-1.0);
416 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
419 it->second.TrackingFlag->Fill(-1.0);
430 edm::LogInfo(
"TrackingCertificationInfo") <<
"fillTrackingCertificationMEsAtLumi starting .." << std::endl;
441 <<
"fillTrackingCertificationMEsAtLumi tracking_dir: " << tracking_dir << std::endl;
445 <<
"fillTrackingCertificationMEsAtLumi tracking_dir: " << tracking_dir << std::endl;
446 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir +
"/EventInfo/reportSummaryContents");
449 edm::LogInfo(
"TrackingCertificationInfo") <<
"all_mes: " << all_mes.size() << std::endl;
451 for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
457 <<
"fillTrackingCertificationMEsAtLumi me: " <<
me->getName() << std::endl;
460 float val =
me->getFloatValue();
462 edm::LogInfo(
"TrackingCertificationInfo") <<
"fillTrackingCertificationMEsAtLumi val: " <<
val << std::endl;
464 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
469 <<
"fillTrackingCertificationMEsAtLumi ME: " << it->first <<
" ["
470 << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue()
475 edm::LogInfo(
"TrackingCertificationInfo") <<
"fillTrackingCertificationMEsAtLumi type: " <<
type << std::endl;
476 if (
name.find(
type) != std::string::npos) {
479 <<
"fillTrackingCertificationMEsAtLumi type: " <<
type <<
" <---> name: " <<
name << std::endl;
480 it->second.TrackingFlag->Fill(
val);
485 <<
"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";
499 <<
"fillTrackingCertificationMEsAtLumi global_dqm_flag: " << global_dqm_flag << std::endl;