CMS 3D CMS Logo

EcalDQMChannelStatus_PayloadInspector.cc
Go to the documentation of this file.
4 
5 // the data format of the condition to be inspected
9 
10 #include <memory>
11 #include <sstream>
12 
13 #include "TStyle.h"
14 #include "TH2F.h"
15 #include "TCanvas.h"
16 #include "TLine.h"
17 #include "TLatex.h"
18 
19 namespace {
20  enum { kEBChannels = 61200, kEEChannels = 14648, NRGBs = 5, NCont = 255 };
21  enum { MIN_IETA = 1, MIN_IPHI = 1, MAX_IETA = 85, MAX_IPHI = 360 }; // barrel lower and upper bounds on eta and phi
22  enum { IX_MIN = 1, IY_MIN = 1, IX_MAX = 100, IY_MAX = 100 }; // endcaps lower and upper bounds on x and y
23 
24  /*******************************************************
25  2d plot of ECAL barrel DQM channel status of 1 IOV
26  *******************************************************/
27  class EcalDQMChannelStatusEBMap : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
28  public:
29  EcalDQMChannelStatusEBMap()
30  : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL Barrel DQM channel status") {
31  setSingleIov(true);
32  }
33 
34  bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs) override {
35  TH2F *ebmap = new TH2F(
36  "ebmap", "", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA); //drawing the whole map (barels)
37  TH2F *ebmap_coarse = new TH2F(
38  "ebmap_coarse", "", MAX_IPHI / 20, 0, MAX_IPHI, 2, -MAX_IETA, MAX_IETA); //drawing the halves (18 by 2)
39  Int_t ebcount = 0;
40  unsigned int run = 0;
41  // for ( auto const & iov: iovs) {
42  auto iov = iovs.front();
43  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload(std::get<1>(iov));
44  run = std::get<0>(iov);
45 
46  if (payload.get()) {
47  // looping over the EB channels, via the dense-index, mapped into EBDetId's
48  if (payload->barrelItems().empty())
49  return false;
50  for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
51  uint32_t rawid = EBDetId::unhashIndex(cellid);
52  // check the existence of ECAL channel status, for a given ECAL barrel channel
53  if (payload->find(rawid) == payload->end())
54  continue;
55  //if (!(*payload)[rawid].getEncodedStatusCode()) continue;
56  Double_t weight = (Double_t)(*payload)[rawid].getStatusCode();
57  Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5;
58  Double_t eta = (Double_t)(EBDetId(rawid)).ieta();
59  if (eta > 0.)
60  eta = eta - 0.5; // 0.5 to 84.5
61  else
62  eta = eta + 0.5; // -84.5 to -0.5
63 
64  ebmap->Fill(phi, eta, weight);
65  if (weight > 0) {
66  ebcount++;
67  ebmap_coarse->Fill(phi, eta);
68  }
69  } // loop over cellid
70  } // if payload.get()
71  else
72  return false;
73 
74  gStyle->SetOptStat(0);
75  //set the background color to white
76  gStyle->SetFillColor(10);
77  gStyle->SetFrameFillColor(10);
78  gStyle->SetCanvasColor(10);
79  gStyle->SetPadColor(10);
80  gStyle->SetTitleFillColor(0);
81  gStyle->SetStatColor(10);
82  //dont put a colored frame around the plots
83  gStyle->SetFrameBorderMode(0);
84  gStyle->SetCanvasBorderMode(0);
85  gStyle->SetPadBorderMode(0);
86  //use the primary color palette
87  gStyle->SetPalette(1);
88 
89  Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
90  Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
91  Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
92  Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
93  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
94  gStyle->SetNumberContours(NCont);
95 
96  TCanvas c1("c1", "c1", 1200, 700);
97  c1.SetGridx(1);
98  c1.SetGridy(1);
99 
100  TLatex t1;
101  t1.SetNDC();
102  t1.SetTextAlign(26);
103  t1.SetTextSize(0.06);
104 
105  ebmap->SetXTitle("i#phi");
106  ebmap->SetYTitle("i#eta");
107  ebmap->GetXaxis()->SetNdivisions(-418, kFALSE);
108  ebmap->GetYaxis()->SetNdivisions(-1702, kFALSE);
109  ebmap->GetXaxis()->SetLabelSize(0.03);
110  ebmap->GetYaxis()->SetLabelSize(0.03);
111  ebmap->GetXaxis()->SetTickLength(0.01);
112  ebmap->GetYaxis()->SetTickLength(0.01);
113  ebmap->SetMaximum(15);
114 
115  c1.cd();
116  ebmap->Draw("colz");
117 
118  ebmap_coarse->SetMarkerSize(1.3);
119  ebmap_coarse->Draw("text,same");
120 
121  t1.SetTextSize(0.05);
122  t1.DrawLatex(0.5, 0.96, Form("EB DQM Channel Status, IOV %i", run));
123 
124  char txt[80];
125  Double_t prop = (Double_t)ebcount / kEBChannels * 100.;
126  sprintf(txt, "%d/61200 (%4.3f%%)", ebcount, prop);
127  t1.SetTextColor(2);
128  t1.SetTextSize(0.045);
129  t1.DrawLatex(0.5, 0.91, txt);
130 
131  std::string ImageName(m_imageFileName);
132  c1.SaveAs(ImageName.c_str());
133  return true;
134  }
135  };
136 
137  /*******************************************************
138  2d plot of ECAL Endcap DQM channel status of 1 IOV
139 *******************************************************/
140  class EcalDQMChannelStatusEEMap : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
141  public:
142  EcalDQMChannelStatusEEMap()
143  : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL EndCaps DQM channel status") {
144  setSingleIov(true);
145  }
146 
147  bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs) override {
148  //TH2F *eemap = new TH2F("eemap","", 2*IX_MAX, IX_MIN, 2*IX_MAX+1, IY_MAX, IY_MIN, IY_MAX+IY_MIN);
149  TH2F *eemap = new TH2F("eemap", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX);
150  TH2F *eemap_coarse = new TH2F("eemap_coarse", "", 2, 0, 2 * IX_MAX, 1, 0, IY_MAX);
151  TH2F *eetemp = new TH2F("eetemp", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX);
152 
153  Int_t eecount = 0;
154  unsigned int run = 0;
155  auto iov = iovs.front();
156  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload(std::get<1>(iov));
157  run = std::get<0>(iov); //Time_t parameter
158 
159  if (payload.get()) {
160  if (payload->endcapItems().empty())
161  return false;
162 
163  // looping over the EE channels
164  for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
165  for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++)
166  for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++)
167 
168  if (EEDetId::validDetId(ix, iy, iz)) {
169  EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE);
170  uint32_t rawid = myEEId.rawId();
171  // check the existence of ECAL channel status, for a given ECAL endcap channel
172  if (payload->find(rawid) == payload->end())
173  continue;
174  // if (!(*payload)[rawid].getEncodedStatusCode()) continue;
175  float weight = (float)(*payload)[rawid].getStatusCode();
176  if (iz == -1) {
177  // eemap->Fill(ix, iy, weight);
178  eemap->Fill(ix - 1, iy - 1, weight);
179  if (weight > 0) {
180  eecount++;
181  eemap_coarse->Fill(ix - 1, iy - 1);
182  }
183  } else {
184  // eemap->Fill(ix+IX_MAX, iy, weight);
185  eemap->Fill(ix + IX_MAX - 1, iy - 1, weight);
186  if (weight > 0) {
187  eecount++;
188  eemap_coarse->Fill(ix + IX_MAX - 1, iy - 1);
189  }
190  }
191  } // validDetId
192 
193  } // payload
194 
195  gStyle->SetOptStat(0);
196  //set the background color to white
197  gStyle->SetFillColor(10);
198  gStyle->SetFrameFillColor(10);
199  gStyle->SetCanvasColor(10);
200  gStyle->SetPadColor(10);
201  gStyle->SetTitleFillColor(0);
202  gStyle->SetStatColor(10);
203  //dont put a colored frame around the plots
204  gStyle->SetFrameBorderMode(0);
205  gStyle->SetCanvasBorderMode(0);
206  gStyle->SetPadBorderMode(0);
207  //use the primary color palette
208  gStyle->SetPalette(1);
209 
210  Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
211  Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
212  Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
213  Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
214  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
215  gStyle->SetNumberContours(NCont);
216 
217  // set the EE contours
218  for (Int_t i = 1; i <= IX_MAX; i++) {
219  for (Int_t j = 1; j <= IY_MAX; j++) {
220  if (EEDetId::validDetId(i, j, 1)) {
221  // eetemp->SetBinContent(i + 1, j + 1, 2);
222  // eetemp->SetBinContent(i + IX_MAX + 1, j +1, 2);
223  eetemp->SetBinContent(i, j, 2);
224  eetemp->SetBinContent(i + IX_MAX, j, 2);
225  }
226  }
227  }
228 
229  eetemp->SetFillColor(920);
230  TCanvas c1("c1", "c1", 1200, 600);
231  c1.SetGridx(1);
232  c1.SetGridy(1);
233 
234  TLatex t1;
235  t1.SetNDC();
236  t1.SetTextAlign(26);
237  t1.SetTextSize(0.06);
238 
239  eetemp->GetXaxis()->SetNdivisions(40, kFALSE);
240  eetemp->GetYaxis()->SetNdivisions(20, kFALSE);
241  eetemp->GetXaxis()->SetLabelSize(0.00);
242  eetemp->GetYaxis()->SetLabelSize(0.00);
243  eetemp->GetXaxis()->SetTickLength(0.01);
244  eetemp->GetYaxis()->SetTickLength(0.01);
245  eetemp->SetMaximum(1.15);
246 
247  eemap->GetXaxis()->SetNdivisions(40, kFALSE);
248  eemap->GetYaxis()->SetNdivisions(20, kFALSE);
249  eemap->GetXaxis()->SetLabelSize(0.00);
250  eemap->GetYaxis()->SetLabelSize(0.00);
251  eemap->GetXaxis()->SetTickLength(0.01);
252  eemap->GetYaxis()->SetTickLength(0.01);
253  eemap->SetMaximum(15);
254 
255  eetemp->Draw("box");
256  eemap->Draw("same,colz");
257 
258  eemap_coarse->SetMarkerSize(2);
259  eemap_coarse->Draw("same,text");
260 
261  t1.SetTextColor(1);
262  t1.SetTextSize(0.055);
263  t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status, IOV %i", run));
264 
265  char txt[80];
266  Double_t prop = (Double_t)eecount / kEEChannels * 100.;
267  sprintf(txt, "%d/14648 (%4.3f%%)", eecount, prop);
268  t1.SetTextColor(2);
269  t1.SetTextSize(0.045);
270  t1.DrawLatex(0.5, 0.91, txt);
271  t1.SetTextColor(1);
272  t1.SetTextSize(0.05);
273  t1.DrawLatex(0.14, 0.84, "EE-");
274  t1.DrawLatex(0.86, 0.84, "EE+");
275 
276  std::string ImageName(m_imageFileName);
277  c1.SaveAs(ImageName.c_str());
278  return true;
279  }
280  };
281 
282  /**********************************************************************
283  2d plot of ECAL barrel DQM channel status difference between 2 IOVs
284 ***********************************************************************/
285  class EcalDQMChannelStatusEBDiff : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
286  public:
287  EcalDQMChannelStatusEBDiff()
288  : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL Barrel DQM channel status difference") {
289  setSingleIov(false);
290  }
291  bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs) override {
292  TH2F *ebmap = new TH2F("ebmap", "", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
293  TH2F *ebmap_coarse = new TH2F("ebmap_coarse", "", MAX_IPHI / 20, 0, MAX_IPHI, 2, -MAX_IETA, MAX_IETA);
294  Int_t ebcount = 0;
295  unsigned int run[2], irun = 0, status[kEBChannels];
296  for (auto const &iov : iovs) {
297  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload(std::get<1>(iov));
298  if (payload.get()) {
299  // looping over the EB channels, via the dense-index, mapped into EBDetId's
300  if (payload->barrelItems().empty())
301  return false;
302 
303  run[irun] = std::get<0>(iov);
304 
305  for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
306  uint32_t rawid = EBDetId::unhashIndex(cellid);
307  // check the existence of ECAL channel status, for a given ECAL barrel channel
308  if (payload->find(rawid) == payload->end())
309  continue;
310 
311  if (irun == 0) {
312  status[cellid] = (*payload)[rawid].getStatusCode();
313  } else {
314  unsigned int new_status = (*payload)[rawid].getStatusCode();
315  if (new_status != status[cellid]) {
316  int tmp3 = 0;
317 
318  if (new_status > status[cellid])
319  tmp3 = 1;
320  else
321  tmp3 = -1;
322 
323  Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5;
324  Double_t eta = (Double_t)(EBDetId(rawid)).ieta();
325  if (eta > 0.)
326  eta = eta - 0.5; // 0.5 to 84.5
327  else
328  eta = eta + 0.5; // -84.5 to -0.5
329 
330  ebmap->Fill(phi, eta, 0.05 + 0.95 * (tmp3 > 0));
331  ebcount++;
332  ebmap_coarse->Fill(phi, eta, tmp3);
333  }
334  }
335  } // loop over cellid
336  irun++;
337  } // if payload.get()
338  else
339  return false;
340  } // loop over IOV's
341 
342  gStyle->SetOptStat(0);
343  //set the background color to white
344  gStyle->SetFillColor(10);
345  gStyle->SetFrameFillColor(10);
346  gStyle->SetCanvasColor(10);
347  gStyle->SetPadColor(10);
348  gStyle->SetTitleFillColor(0);
349  gStyle->SetStatColor(10);
350  //dont put a colored frame around the plots
351  gStyle->SetFrameBorderMode(0);
352  gStyle->SetCanvasBorderMode(0);
353  gStyle->SetPadBorderMode(0);
354  //use the primary color palette
355  gStyle->SetPalette(1);
356 
357  Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
358  Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
359  Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
360  Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
361  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
362  gStyle->SetNumberContours(NCont);
363 
364  TCanvas c1("c1", "c1", 1200, 700);
365  c1.SetGridx(1);
366  c1.SetGridy(1);
367 
368  TLatex t1;
369  t1.SetNDC();
370  t1.SetTextAlign(26);
371  t1.SetTextSize(0.06);
372 
373  ebmap->SetXTitle("i#phi");
374  ebmap->SetYTitle("i#eta");
375  ebmap->GetXaxis()->SetNdivisions(-418, kFALSE);
376  ebmap->GetYaxis()->SetNdivisions(-1702, kFALSE);
377  ebmap->GetXaxis()->SetLabelSize(0.03);
378  ebmap->GetYaxis()->SetLabelSize(0.03);
379  ebmap->GetXaxis()->SetTickLength(0.01);
380  ebmap->GetYaxis()->SetTickLength(0.01);
381  ebmap->SetMaximum(1.15);
382 
383  c1.cd();
384  ebmap->Draw("colz");
385 
386  ebmap_coarse->SetMarkerSize(1.3);
387  ebmap_coarse->Draw("text,same");
388 
389  t1.SetTextSize(0.05);
390  t1.DrawLatex(0.5, 0.96, Form("EB DQM Channel Status (Diff), IOV: %i vs %i", run[0], run[1]));
391 
392  char txt[80];
393  sprintf(txt, "Net difference: %d channel(s)", ebcount);
394  t1.SetTextColor(2);
395  t1.SetTextSize(0.045);
396  t1.DrawLatex(0.5, 0.91, txt);
397 
398  std::string ImageName(m_imageFileName);
399  c1.SaveAs(ImageName.c_str());
400  return true;
401  } // fill method
402  };
403 
404  /************************************************************************
405  2d plot of ECAL endcaps DQM channel status difference between 2 IOVs
406  ************************************************************************/
407  class EcalDQMChannelStatusEEDiff : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
408  public:
409  EcalDQMChannelStatusEEDiff()
410  : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL Endcaps DQM channel status difference") {
411  setSingleIov(true);
412  }
413 
414  bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs) override {
415  TH2F *eemap = new TH2F("eemap", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX);
416  TH2F *eemap_coarse = new TH2F("eemap_coarse", "", 2, 0, 2 * IX_MAX, 1, 0, IY_MAX);
417  TH2F *eetemp = new TH2F("eetemp", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX, 0, IY_MAX);
418  Int_t eecount = 0;
419  unsigned int run[2], irun = 0, status[kEEChannels];
420  for (auto const &iov : iovs) {
421  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload(std::get<1>(iov));
422  run[irun] = std::get<0>(iov);
423  if (payload.get()) {
424  if (payload->endcapItems().empty())
425  return false;
426 
427  // looping over the EE channels
428  for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
429  for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++)
430  for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++)
431  if (EEDetId::validDetId(ix, iy, iz)) {
432  EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE);
433  uint32_t rawid = myEEId.rawId();
434  int channel = myEEId.hashedIndex();
435  // check the existence of ECAL channel status, for a given ECAL endcap channel
436  if (payload->find(rawid) == payload->end())
437  continue;
438 
439  if (irun == 0) {
440  status[channel] = (*payload)[rawid].getStatusCode();
441  } else {
442  unsigned int new_status = (*payload)[rawid].getStatusCode();
443  if (new_status != status[channel]) {
444  int tmp3 = 0;
445  if (new_status > status[channel])
446  tmp3 = 1;
447  else
448  tmp3 = -1;
449 
450  if (iz == -1) {
451  eemap->Fill(ix - 1, iy - 1, 0.05 + 0.95 * (tmp3 > 0));
452  eecount++;
453  eemap_coarse->Fill(ix - 1, iy - 1, tmp3);
454  } else {
455  eemap->Fill(ix + IX_MAX - 1, iy - 1, 0.05 + 0.95 * (tmp3 > 0));
456  eecount++;
457  eemap_coarse->Fill(ix + IX_MAX - 1, iy - 1, tmp3);
458  } // z side
459  } // any difference ?
460  } // 2nd IOV, fill the plots
461  } // validDetId
462  irun++;
463  } // get the payload
464  } // loop over payloads
465 
466  gStyle->SetOptStat(0);
467  //set the background color to white
468  gStyle->SetFillColor(10);
469  gStyle->SetFrameFillColor(10);
470  gStyle->SetCanvasColor(10);
471  gStyle->SetPadColor(10);
472  gStyle->SetTitleFillColor(0);
473  gStyle->SetStatColor(10);
474  //dont put a colored frame around the plots
475  gStyle->SetFrameBorderMode(0);
476  gStyle->SetCanvasBorderMode(0);
477  gStyle->SetPadBorderMode(0);
478  //use the primary color palette
479  gStyle->SetPalette(1);
480 
481  Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
482  Double_t red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
483  Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
484  Double_t blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
485  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
486  gStyle->SetNumberContours(NCont);
487 
488  // set the EE contours
489  for (Int_t i = 1; i <= IX_MAX; i++) {
490  for (Int_t j = 1; j <= IY_MAX; j++) {
491  if (EEDetId::validDetId(i, j, 1)) {
492  eetemp->SetBinContent(i, j, 2);
493  eetemp->SetBinContent(i + IX_MAX, j, 2);
494  }
495  }
496  }
497 
498  eetemp->SetFillColor(920);
499  TCanvas c1("c1", "c1", 1200, 600);
500  c1.SetGridx(1);
501  c1.SetGridy(1);
502 
503  TLatex t1;
504  t1.SetNDC();
505  t1.SetTextAlign(26);
506  t1.SetTextSize(0.06);
507 
508  eetemp->GetXaxis()->SetNdivisions(40, kFALSE);
509  eetemp->GetYaxis()->SetNdivisions(20, kFALSE);
510  eetemp->GetXaxis()->SetLabelSize(0.00);
511  eetemp->GetYaxis()->SetLabelSize(0.00);
512  eetemp->GetXaxis()->SetTickLength(0.01);
513  eetemp->GetYaxis()->SetTickLength(0.01);
514  eetemp->SetMaximum(1.15);
515 
516  eemap->GetXaxis()->SetNdivisions(40, kFALSE);
517  eemap->GetYaxis()->SetNdivisions(20, kFALSE);
518  eemap->GetXaxis()->SetLabelSize(0.00);
519  eemap->GetYaxis()->SetLabelSize(0.00);
520  eemap->GetXaxis()->SetTickLength(0.01);
521  eemap->GetYaxis()->SetTickLength(0.01);
522  eemap->SetMaximum(1.15);
523 
524  eetemp->Draw("box");
525  eemap->Draw("same,colz");
526 
527  eemap_coarse->SetMarkerSize(2);
528  eemap_coarse->Draw("same,text");
529 
530  t1.SetTextColor(1);
531  t1.SetTextSize(0.055);
532  t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status (Diff), IOV %i vs %i", run[0], run[1]));
533 
534  char txt[80];
535  sprintf(txt, "Net difference: %d channel(s)", eecount);
536  t1.SetTextColor(2);
537  t1.SetTextSize(0.045);
538  t1.DrawLatex(0.5, 0.91, txt);
539  t1.SetTextColor(1);
540  t1.SetTextSize(0.05);
541  t1.DrawLatex(0.14, 0.84, "EE-");
542  t1.DrawLatex(0.86, 0.84, "EE+");
543 
544  std::string ImageName(m_imageFileName);
545  c1.SaveAs(ImageName.c_str());
546  return true;
547  } // fill method
548  };
549 
550 } // namespace
551 
552 // Register the classes as boost python plugin
554  PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBMap);
555  PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEMap);
556  PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEBDiff);
557  PAYLOAD_INSPECTOR_CLASS(EcalDQMChannelStatusEEDiff);
558 }
mps_fire.i
i
Definition: mps_fire.py:355
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
kEEChannels
Definition: EcalFloatCondObjectContainerUtils.h:9
MAX_IPHI
Definition: EcalFloatCondObjectContainerUtils.h:14
IX_MAX
Definition: EcalFloatCondObjectContainerUtils.h:20
mps_update.status
status
Definition: mps_update.py:69
IY_MAX
Definition: EcalFloatCondObjectContainerUtils.h:21
EBDetId
Definition: EBDetId.h:17
PayloadInspector.h
EBDetId.h
EEDetId.h
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
PAYLOAD_INSPECTOR_CLASS
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
Definition: PayloadInspectorModule.h:10
EcalCondObjectContainer< EcalDQMStatusCode >
PayloadInspectorModule.h
electronCompare.red
red
Definition: electronCompare.py:135
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
PVValHelper::eta
Definition: PVValidationHelpers.h:69
MIN_IETA
Definition: EcalFloatCondObjectContainerUtils.h:11
jets_cff.payload
payload
Definition: jets_cff.py:34
PAYLOAD_INSPECTOR_MODULE
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
Definition: PayloadInspectorModule.h:8
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond
Definition: plugin.cc:23
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
Time.h
IY_MIN
Definition: EcalFloatCondObjectContainerUtils.h:19
cond::payloadInspector::PlotImage::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:840
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
MIN_IPHI
Definition: EcalFloatCondObjectContainerUtils.h:12
electronCompare.blue
blue
Definition: electronCompare.py:137
DDAxes::phi
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EEDetId::XYMODE
static const int XYMODE
Definition: EEDetId.h:335
cond::payloadInspector::PlotImpl::fill
virtual bool fill()=0
cond::payloadInspector::PlotImage
Definition: PayloadInspector.h:829
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EBDetId::MIN_HASH
static const int MIN_HASH
Definition: EBDetId.h:149
kEBChannels
Definition: EcalFloatCondObjectContainerUtils.h:9
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
IX_MIN
Definition: EcalFloatCondObjectContainerUtils.h:18
EcalDQMChannelStatus.h
weight
Definition: weight.py:1
MAX_IETA
Definition: EcalFloatCondObjectContainerUtils.h:13