22 enum { kEBTotalTowers = 2448, kEETotalTowers = 1584 };
30 EcalDQMTowerStatusPlot() :
cond::payloadInspector::PlotImage<
EcalDQMTowerStatus>(
"EcalDQMTowerStatus - map ") {
34 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
35 TH2F*
barrel =
new TH2F(
"EB",
"EB DQM Tower Status", 72, 0, 72, 34, -17, 17);
36 TH2F* endc_p =
new TH2F(
"EE+",
"EE+ DQM Tower Status", 22, 0, 22, 22, 0, 22);
37 TH2F* endc_m =
new TH2F(
"EE-",
"EE- DQM Tower Status", 22, 0, 22, 22, 0, 22);
39 auto iov = iovs.front();
41 unsigned int run = std::get<0>(iov);
42 double maxEB = 0, maxEE = 0;
46 if (
payload->barrelItems().empty())
49 if ((*payload).find(rawid) == (*payload).end())
58 if (maxEB < (*
payload)[rawid].getStatusCode())
59 maxEB = (*payload)[rawid].getStatusCode();
62 if (
payload->endcapItems().empty())
68 if ((*payload).find(rawid) == (*payload).end())
72 int side = rawid.
zside();
74 endc_m->Fill(ix, iy, (*
payload)[rawid].getStatusCode());
76 endc_p->Fill(ix, iy, (*
payload)[rawid].getStatusCode());
78 if (maxEE < (*
payload)[rawid].getStatusCode())
79 maxEE = (*payload)[rawid].getStatusCode();
85 TCanvas
canvas(
"CC map",
"CC map", 800, 800);
90 t1.DrawLatex(0.5, 0.96, Form(
"Ecal DQM Tower Status, IOV %i",
run));
93 TPad* padb =
new TPad(
"padb",
"padb", 0., 0.45, 1., 0.9);
95 TPad* padem =
new TPad(
"padem",
"padem", 0., 0., 0.45, 0.45);
97 TPad* padep =
new TPad(
"padep",
"padep", 0.55, 0., 1., 0.45);
100 TLine*
l =
new TLine(0., 0., 0., 0.);
104 barrel->SetMaximum(maxEB);
108 for (
int i = 0;
i < 17;
i++) {
109 Double_t
x = 4. + (
i * 4);
110 l =
new TLine(
x, -17.,
x, 17.);
114 l =
new TLine(0., 0., 72., 0.);
124 canvas.SaveAs(ImageName.c_str());
134 EcalDQMTowerStatusDiffPlot()
139 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
140 TH2F*
barrel =
new TH2F(
"EB",
"EB DQM Tower Status", 72, 0, 72, 34, -17, 17);
141 TH2F* endc_p =
new TH2F(
"EE+",
"EE+ DQM Tower Status", 22, 0, 22, 22, 0, 22);
142 TH2F* endc_m =
new TH2F(
"EE-",
"EE- DQM Tower Status", 22, 0, 22, 22, 0, 22);
144 unsigned int run[2], irun = 0;
145 float pEB[kEBTotalTowers], pEE[kEETotalTowers];
147 for (
auto const& iov : iovs) {
149 run[irun] = std::get<0>(iov);
153 if (
payload->barrelItems().empty())
157 if ((*payload).find(rawid) == (*payload).end())
160 float weight = (*payload)[rawid].getStatusCode();
169 unsigned int new_status = (*payload)[rawid].getStatusCode();
170 if (new_status != pEB[cellid]) {
173 if (new_status > pEB[cellid])
183 if (
payload->endcapItems().empty())
189 if ((*payload).find(rawid) == (*payload).end())
192 float weight = (*payload)[rawid].getStatusCode();
199 int side = rawid.
zside();
201 unsigned int new_status = (*payload)[rawid].getStatusCode();
202 if (new_status != pEE[cellid]) {
205 if (new_status > pEE[cellid])
211 endc_m->Fill(ix, iy, 0.05 + 0.95 * (tmp3 > 0));
213 endc_p->Fill(ix, iy, 0.05 + 0.95 * (tmp3 > 0));
223 TCanvas
canvas(
"CC map",
"CC map", 800, 800);
227 t1.SetTextSize(0.04);
228 t1.DrawLatex(0.5, 0.96, Form(
"Ecal DQM Tower Status (Diff), IOV %i vs %i",
run[0],
run[1]));
230 TPad* padb =
new TPad(
"padb",
"padb", 0., 0.45, 1., 0.9);
232 TPad* padem =
new TPad(
"padem",
"padem", 0., 0., 0.45, 0.45);
234 TPad* padep =
new TPad(
"padep",
"padep", 0.55, 0., 1., 0.45);
237 TLine*
l =
new TLine(0., 0., 0., 0.);
245 for (
int i = 0;
i < 17;
i++) {
246 Double_t
x = 4. + (
i * 4);
247 l =
new TLine(
x, -17.,
x, 17.);
251 l =
new TLine(0., 0., 72., 0.);
261 canvas.SaveAs(ImageName.c_str());