19 #include <TDirectoryFile.h> 31 void dqmEndLuminosityBlock(DQMStore::IBooker &,
35 void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &)
override{};
47 m_fReportSummary = -1.0;
54 descriptions.
add(
"GEMDQMHarvester", desc);
62 refineSummaryHistogram(store);
64 store->setCurrentFolder(
"GEM/StatusDigi");
65 auto listME = store->getMEs();
67 for (
auto strName : listME) {
68 if (strName.find(
"vfatStatus_BC_") != std::string::npos) {
69 fillUnderOverflowBunchCrossing(store, strName);
76 std::string strNameSrc =
"reportSummaryMapPreliminary";
79 store->setCurrentFolder(strDirCurr);
81 MonitorElement *h3Curr = store->get(strDirCurr +
"/" + strNameSrc);
82 TH2F *h2New =
nullptr;
84 refineSummaryHistogramCore(h3Curr->
getTH3F(), strNewName, h2New);
85 store->book2D(strNewName, h2New);
87 store->bookFloat(
"reportSummary")->Fill(m_fReportSummary);
96 Int_t nNBinX = h3Src->GetNbinsX();
97 Int_t nNBinY = h3Src->GetNbinsY();
99 Float_t arrfBinX[128], arrfBinY[32];
101 Float_t fNumPass, fNumError, fNumTotal;
103 for (i = 0; i <= nNBinX; i++)
104 arrfBinX[i] = h3Src->GetXaxis()->GetBinLowEdge(i + 1);
105 for (i = 0; i <= nNBinY; i++)
106 arrfBinY[i] = h3Src->GetYaxis()->GetBinLowEdge(i + 1);
108 h2New =
new TH2F(strNewName.c_str(), h3Src->GetTitle(), nNBinX, arrfBinX, nNBinY, arrfBinY);
110 fNumTotal = fNumPass = fNumError = 0.0;
112 for (i = 0; i < nNBinX; i++) {
113 h2New->GetXaxis()->SetBinLabel(i + 1, h3Src->GetXaxis()->GetBinLabel(i + 1));
114 for (j = 0; j < nNBinY; j++) {
115 h2New->GetYaxis()->SetBinLabel(j + 1, h3Src->GetYaxis()->GetBinLabel(j + 1));
117 if (h3Src->GetBinContent(i + 1, j + 1, 2) != 0) {
118 h2New->SetBinContent(i + 1, j + 1, 2);
120 }
else if (h3Src->GetBinContent(i + 1, j + 1, 1) != 0) {
121 h2New->SetBinContent(i + 1, j + 1, 1);
129 if (fNumPass > 0.0 || fNumError > 0.0)
130 m_fReportSummary = fNumPass / fNumTotal;
136 store->setCurrentFolder(strDirCurr);
137 MonitorElement *h2Curr = store->get(strDirCurr +
"/" + strNameSrc);
142 for (Int_t
i = 0;
i < nNBinY;
i++) {
T getParameter(std::string const &) const
virtual int getNbinsY() const
get # of bins in Y-axis
~GEMDQMHarvester() override
void fillUnderOverflowBunchCrossing(edm::Service< DQMStore > &, std::string)
void refineSummaryHistogramCore(TH3F *, std::string &, TH2F *&, std::string strTmpPrefix="tmp_")
#define DEFINE_FWK_MODULE(type)
virtual int getNbinsX() const
get # of bins in X-axis
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
void refineSummaryHistogram(edm::Service< DQMStore > &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual double getBinContent(int binx) const
get content of bin (1-D)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
GEMDQMHarvester(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual TH3F * getTH3F() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override