28 EcalTPGCrystalStatusPlot()
33 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
37 int EBstat = 0, EEstat[2] = {0, 0};
39 auto iov = iovs.front();
41 unsigned int run = std::get<0>(iov);
52 Double_t
phi = (Double_t)
iphi - 0.5;
54 double val = (*payload)[
id.rawId()].getStatusCode();
62 int thesign =
sign == 1 ? 1 : -1;
63 for (
int ix = 1; ix <=
IX_MAX; ix++) {
64 for (
int iy = 1; iy <=
IY_MAX; iy++) {
68 double val = (*payload)[
id.rawId()].getStatusCode();
70 endc_p->Fill(ix, iy,
val);
74 endc_m->Fill(ix, iy,
val);
83 gStyle->SetPalette(1);
84 gStyle->SetOptStat(0);
95 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGCrystalStatus, IOV %i",
run));
99 float xmi[3] = {0.0, 0.0, 0.5};
100 float xma[3] = {1.0, 0.5, 1.0};
101 float ymi[3] = {0.47, 0.0, 0.0};
102 float yma[3] = {0.94, 0.47, 0.47};
103 TPad** pad =
new TPad*;
111 t1.DrawLatex(0.2, 0.94, Form(
"%i crystals", EBstat));
114 t1.DrawLatex(0.15, 0.92, Form(
"%i crystals", EEstat[0]));
117 t1.DrawLatex(0.15, 0.92, Form(
"%i crystals", EEstat[1]));
120 canvas.SaveAs(ImageName.c_str());
130 EcalTPGCrystalStatusDiff()
135 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
139 int EBstat = 0, EEstat[2] = {0, 0};
141 unsigned int run[2] = {0, 0}, irun = 0;
143 for (
auto const& iov : iovs) {
145 run[irun] = std::get<0>(iov);
156 Double_t
phi = (Double_t)
iphi - 0.5;
158 int channel =
id.hashedIndex();
159 double val = (*payload)[
id.rawId()].getStatusCode();
163 double diff =
val - vEB[channel];
173 int thesign =
sign == 1 ? 1 : -1;
174 for (
int ix = 1; ix <=
IX_MAX; ix++) {
175 for (
int iy = 1; iy <=
IY_MAX; iy++) {
179 int channel =
id.hashedIndex();
180 double val = (*payload)[
id.rawId()].getStatusCode();
184 double diff =
val - vEE[channel];
186 endc_p->Fill(ix, iy,
diff);
190 endc_m->Fill(ix, iy,
diff);
204 gStyle->SetPalette(1);
205 gStyle->SetOptStat(0);
214 t1.SetTextSize(0.05);
215 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGCrystalStatus, IOV %i - %i",
run[1],
run[0]));
219 float xmi[3] = {0.0, 0.0, 0.5};
220 float xma[3] = {1.0, 0.5, 1.0};
221 float ymi[3] = {0.47, 0.0, 0.0};
222 float yma[3] = {0.94, 0.47, 0.47};
223 std::vector<TPad*> pad;
225 pad.push_back(
new TPad(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], ymi[
obj], xma[
obj], yma[
obj]));
231 t1.DrawLatex(0.2, 0.94, Form(
"%i differences", EBstat));
234 t1.DrawLatex(0.15, 0.92, Form(
"%i differences", EEstat[0]));
237 t1.DrawLatex(0.15, 0.92, Form(
"%i differences", EEstat[1]));
240 canvas.SaveAs(ImageName.c_str());
250 EcalTPGCrystalStatusSummaryPlot()
255 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
256 auto iov = iovs.front();
257 std::shared_ptr<EcalTPGCrystalStatus>
payload =
259 unsigned int run = std::get<0>(iov);
267 align =
new TH2F(
"Ecal TPGCrystal Status Error Summary",
268 "EB/EE-/EE+ ErrorCount Total Number",
276 long unsigned int ebErrorCount = 0;
277 long unsigned int ee1ErrorCount = 0;
278 long unsigned int ee2ErrorCount = 0;
280 long unsigned int ebTotal = (
payload->barrelItems()).
size();
281 long unsigned int ee1Total = 0;
282 long unsigned int ee2Total = 0;
284 getBarrelErrorSummary<EcalTPGCrystalStatusCode>(
payload->barrelItems(), ebErrorCount);
285 getEndCapErrorSummary<EcalTPGCrystalStatusCode>(
286 payload->endcapItems(), ee1ErrorCount, ee2ErrorCount, ee1Total, ee2Total);
288 double row = NbRows - 0.5;
291 align->Fill(0.5, row, 1);
292 align->Fill(1.5, row, ebErrorCount);
293 align->Fill(2.5, row, ebTotal);
297 align->Fill(0.5, row, 2);
298 align->Fill(1.5, row, ee1ErrorCount);
299 align->Fill(2.5, row, ee1Total);
304 align->Fill(0.5, row, 3);
305 align->Fill(1.5, row, ee2ErrorCount);
306 align->Fill(2.5, row, ee2Total);
312 gStyle->SetPalette(1);
313 gStyle->SetOptStat(0);
314 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
318 t1.SetTextSize(0.04);
320 t1.DrawLatex(0.5, 0.96, Form(
"EcalTPGCrystalStatus Error Summary, IOV %i",
run));
322 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
329 align->GetXaxis()->SetTickLength(0.);
330 align->GetXaxis()->SetLabelSize(0.);
331 align->GetYaxis()->SetTickLength(0.);
332 align->GetYaxis()->SetLabelSize(0.);
335 canvas.SaveAs(ImageName.c_str());