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;
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
T getParameter(std::string const &) const
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
EndJob.
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
virtual void setCurrentFolder(std::string const &fullpath)
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Begin Run.
void fillDummyTrackingCertification(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
~TrackingCertificationInfo() override
Destructor.
void resetTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
#define DEFINE_FWK_MODULE(type)
void beginJob() override
BeginJob.
std::map< std::string, TrackingMEs > TrackingMEsMap
Kind kind() const
Get the type of the monitor element.
void fillTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
TrackingCertificationInfo(const edm::ParameterSet &ps)
Constructor.
Log< level::Error, false > LogError
std::vector< std::string > SubDetFolder
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
unsigned long long m_cacheID_
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
T const * product() const
MonitorElement * TrackingCertificationSummaryMap
MonitorElement * TrackingLSCertification
void fillDummyTrackingCertificationAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
virtual double getFloatValue() const
std::vector< int > m_fed_in
void fillTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
bool trackingLSCertificationBooked_
bool getData(T &iHolder) const
MonitorElement * TrackingCertification
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)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
virtual int getNbinsY() const
get # of bins in Y-axis
Log< level::Info, false > LogInfo
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
MonitorElement * TrackingFlag
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
bool allPixelFEDConnected_
virtual MonitorElement * get(std::string const &fullpath) const
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
MonitorElement * TrackingFlag
const SiStripDetCabling * detCabling_
bool trackingCertificationBooked_
std::string TopFolderName_
virtual int getNbinsX() const
get # of bins in X-axis
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
End Of Luminosity.
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)