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 
29 public:
30  EcalDQMChannelStatusEBMap() :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 
36  TH2F *ebmap = new TH2F("ebmap", "", MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA,-MAX_IETA, MAX_IETA);//drawing the whole map (barels)
37  TH2F *ebmap_coarse = new TH2F("ebmap_coarse", "", MAX_IPHI / 20, 0,MAX_IPHI, 2, -MAX_IETA, MAX_IETA); //drawing the halves (18 by 2)
38  Int_t ebcount = 0;
39  unsigned int run = 0;
40  // for ( auto const & iov: iovs) {
41  auto iov = iovs.front();
42  std::shared_ptr < EcalDQMChannelStatus > payload = fetchPayload(std::get < 1 > (iov));
43  run = std::get < 0 > (iov);
44 
45  if (payload.get()) {
46  // looping over the EB channels, via the dense-index, mapped into EBDetId's
47  if (payload->barrelItems().empty())
48  return false;
49  for (int cellid = EBDetId::MIN_HASH;cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
50 
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 /*******************************************************
139  2d plot of ECAL Endcap DQM channel status of 1 IOV
140 *******************************************************/
141 class EcalDQMChannelStatusEEMap: public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
142  public:
143  EcalDQMChannelStatusEEMap(): 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 
149  //TH2F *eemap = new TH2F("eemap","", 2*IX_MAX, IX_MIN, 2*IX_MAX+1, IY_MAX, IY_MIN, IY_MAX+IY_MIN);
150  TH2F *eemap = new TH2F("eemap", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX,0, IY_MAX);
151  TH2F *eemap_coarse = new TH2F("eemap_coarse", "", 2, 0, 2 * IX_MAX, 1,0, IY_MAX);
152  TH2F *eetemp = new TH2F("eetemp", "", 2 * IX_MAX, 0, 2 * IX_MAX, IY_MAX,0, IY_MAX);
153 
154  Int_t eecount = 0;
155  unsigned int run = 0;
156  auto iov = iovs.front();
157  std::shared_ptr < EcalDQMChannelStatus > payload = fetchPayload(std::get < 1 > (iov));
158  run = std::get < 0 > (iov);//Time_t parameter
159 
160  if (payload.get()) {
161 
162  if (payload->endcapItems().empty())
163  return false;
164 
165  // looping over the EE channels
166  for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
167  for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++)
168  for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++)
169 
170  if (EEDetId::validDetId(ix, iy, iz)) {
171 
172  EEDetId myEEId = EEDetId(ix, iy, iz,EEDetId::XYMODE);
173  uint32_t rawid = myEEId.rawId();
174  // check the existence of ECAL channel status, for a given ECAL endcap channel
175  if (payload->find(rawid) == payload->end())
176  continue;
177  // if (!(*payload)[rawid].getEncodedStatusCode()) continue;
178  float weight =(float) (*payload)[rawid].getStatusCode();
179  if (iz == -1) {
180  // eemap->Fill(ix, iy, weight);
181  eemap->Fill(ix - 1, iy - 1, weight);
182  if (weight > 0) {
183  eecount++;
184  eemap_coarse->Fill(ix - 1, iy - 1);
185  }
186  } else {
187  // eemap->Fill(ix+IX_MAX, iy, weight);
188  eemap->Fill(ix + IX_MAX - 1, iy - 1, weight);
189  if (weight > 0) {
190  eecount++;
191  eemap_coarse->Fill(ix + IX_MAX - 1, iy - 1);
192  }
193  }
194  } // validDetId
195 
196  } // payload
197 
198  gStyle->SetOptStat(0);
199  //set the background color to white
200  gStyle->SetFillColor(10);
201  gStyle->SetFrameFillColor(10);
202  gStyle->SetCanvasColor(10);
203  gStyle->SetPadColor(10);
204  gStyle->SetTitleFillColor(0);
205  gStyle->SetStatColor(10);
206  //dont put a colored frame around the plots
207  gStyle->SetFrameBorderMode(0);
208  gStyle->SetCanvasBorderMode(0);
209  gStyle->SetPadBorderMode(0);
210  //use the primary color palette
211  gStyle->SetPalette(1);
212 
213  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
214  Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
215  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
216  Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
217  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
218  gStyle->SetNumberContours(NCont);
219 
220  // set the EE contours
221  for (Int_t i = 1; i <= IX_MAX; i++) {
222  for (Int_t j = 1; j <= IY_MAX; j++) {
223  if (EEDetId::validDetId(i, j, 1)) {
224  // eetemp->SetBinContent(i + 1, j + 1, 2);
225  // eetemp->SetBinContent(i + IX_MAX + 1, j +1, 2);
226  eetemp->SetBinContent(i, j, 2);
227  eetemp->SetBinContent(i + IX_MAX, j, 2);
228  }
229  }
230  }
231 
232  eetemp->SetFillColor(920);
233  TCanvas c1("c1", "c1", 1200, 600);
234  c1.SetGridx(1);
235  c1.SetGridy(1);
236 
237  TLatex t1;
238  t1.SetNDC();
239  t1.SetTextAlign(26);
240  t1.SetTextSize(0.06);
241 
242  eetemp->GetXaxis()->SetNdivisions(40, kFALSE);
243  eetemp->GetYaxis()->SetNdivisions(20, kFALSE);
244  eetemp->GetXaxis()->SetLabelSize(0.00);
245  eetemp->GetYaxis()->SetLabelSize(0.00);
246  eetemp->GetXaxis()->SetTickLength(0.01);
247  eetemp->GetYaxis()->SetTickLength(0.01);
248  eetemp->SetMaximum(1.15);
249 
250  eemap->GetXaxis()->SetNdivisions(40, kFALSE);
251  eemap->GetYaxis()->SetNdivisions(20, kFALSE);
252  eemap->GetXaxis()->SetLabelSize(0.00);
253  eemap->GetYaxis()->SetLabelSize(0.00);
254  eemap->GetXaxis()->SetTickLength(0.01);
255  eemap->GetYaxis()->SetTickLength(0.01);
256  eemap->SetMaximum(15);
257 
258  eetemp->Draw("box");
259  eemap->Draw("same,colz");
260 
261  eemap_coarse->SetMarkerSize(2);
262  eemap_coarse->Draw("same,text");
263 
264  t1.SetTextColor(1);
265  t1.SetTextSize(0.055);
266  t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status, IOV %i", run));
267 
268  char txt[80];
269  Double_t prop = (Double_t) eecount / kEEChannels * 100.;
270  sprintf(txt, "%d/14648 (%4.3f%%)", eecount, prop);
271  t1.SetTextColor(2);
272  t1.SetTextSize(0.045);
273  t1.DrawLatex(0.5, 0.91, txt);
274  t1.SetTextColor(1);
275  t1.SetTextSize(0.05);
276  t1.DrawLatex(0.14, 0.84, "EE-");
277  t1.DrawLatex(0.86, 0.84, "EE+");
278 
279  std::string ImageName(m_imageFileName);
280  c1.SaveAs(ImageName.c_str());
281  return true;
282 
283  }
284 
285 };
286 
287 
288 /**********************************************************************
289  2d plot of ECAL barrel DQM channel status difference between 2 IOVs
290 ***********************************************************************/
291 class EcalDQMChannelStatusEBDiff : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
292 
293  public:
294  EcalDQMChannelStatusEBDiff() : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL Barrel DQM channel status difference") {
295  setSingleIov(false);
296  }
297  bool fill( const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs ) override{
298 
299  TH2F *ebmap = new TH2F("ebmap","",MAX_IPHI, 0, MAX_IPHI, 2*MAX_IETA, -MAX_IETA, MAX_IETA);
300  TH2F *ebmap_coarse = new TH2F("ebmap_coarse","",MAX_IPHI/20, 0, MAX_IPHI, 2,-MAX_IETA, MAX_IETA);
301  Int_t ebcount = 0;
302  unsigned int run[2], irun = 0, status[kEBChannels];
303  for ( auto const & iov: iovs) {
304 
305  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload( std::get<1>(iov) );
306  if( payload.get() ){
307  // looping over the EB channels, via the dense-index, mapped into EBDetId's
308  if (payload->barrelItems().empty())
309  return false;
310 
311  run[irun] = std::get<0>(iov);
312 
313  for(int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
314 
315  uint32_t rawid = EBDetId::unhashIndex(cellid);
316  // check the existence of ECAL channel status, for a given ECAL barrel channel
317  if (payload->find(rawid) == payload->end())
318  continue;
319 
320  if(irun == 0) {
321  status[cellid] = (*payload)[rawid].getStatusCode();
322  }else {
323 
324  unsigned int new_status = (*payload)[rawid].getStatusCode();
325  if(new_status != status[cellid]) {
326  int tmp3 = 0;
327 
328  if (new_status > status[cellid])
329  tmp3 = 1;
330  else
331  tmp3 = -1;
332 
333  Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5;
334  Double_t eta = (Double_t)(EBDetId(rawid)).ieta();
335  if(eta > 0.)
336  eta = eta - 0.5; // 0.5 to 84.5
337  else
338  eta = eta + 0.5; // -84.5 to -0.5
339 
340  ebmap->Fill(phi, eta, 0.05 + 0.95 * (tmp3>0));
341  ebcount++;
342  ebmap_coarse->Fill(phi, eta, tmp3);
343  }
344  }
345  } // loop over cellid
346  irun++;
347  } // if payload.get()
348  else
349  return false;
350  } // loop over IOV's
351 
352  gStyle->SetOptStat(0);
353  //set the background color to white
354  gStyle->SetFillColor(10);
355  gStyle->SetFrameFillColor(10);
356  gStyle->SetCanvasColor(10);
357  gStyle->SetPadColor(10);
358  gStyle->SetTitleFillColor(0);
359  gStyle->SetStatColor(10);
360  //dont put a colored frame around the plots
361  gStyle->SetFrameBorderMode(0);
362  gStyle->SetCanvasBorderMode(0);
363  gStyle->SetPadBorderMode(0);
364  //use the primary color palette
365  gStyle->SetPalette(1);
366 
367  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
368  Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
369  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
370  Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
371  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
372  gStyle->SetNumberContours(NCont);
373 
374  TCanvas c1("c1","c1", 1200, 700);
375  c1.SetGridx(1);
376  c1.SetGridy(1);
377 
378  TLatex t1;
379  t1.SetNDC();
380  t1.SetTextAlign(26);
381  t1.SetTextSize(0.06);
382 
383  ebmap->SetXTitle("i#phi");
384  ebmap->SetYTitle("i#eta");
385  ebmap->GetXaxis()->SetNdivisions(-418,kFALSE);
386  ebmap->GetYaxis()->SetNdivisions(-1702,kFALSE);
387  ebmap->GetXaxis()->SetLabelSize(0.03);
388  ebmap->GetYaxis()->SetLabelSize(0.03);
389  ebmap->GetXaxis()->SetTickLength(0.01);
390  ebmap->GetYaxis()->SetTickLength(0.01);
391  ebmap->SetMaximum(1.15);
392 
393  c1.cd();
394  ebmap->Draw("colz");
395 
396  ebmap_coarse->SetMarkerSize(1.3);
397  ebmap_coarse->Draw("text,same");
398 
399  t1.SetTextSize(0.05);
400  t1.DrawLatex(0.5, 0.96, Form("EB DQM Channel Status (Diff), IOV: %i vs %i", run[0], run[1]));
401 
402  char txt[80];
403  sprintf(txt,"Net difference: %d channel(s)",ebcount);
404  t1.SetTextColor(2);
405  t1.SetTextSize(0.045);
406  t1.DrawLatex(0.5, 0.91, txt);
407 
408  std::string ImageName(m_imageFileName);
409  c1.SaveAs(ImageName.c_str());
410  return true;
411  }// fill method
412  };
413 
414 
415 /************************************************************************
416  2d plot of ECAL endcaps DQM channel status difference between 2 IOVs
417  ************************************************************************/
418  class EcalDQMChannelStatusEEDiff : public cond::payloadInspector::PlotImage<EcalDQMChannelStatus> {
419 
420  public:
421  EcalDQMChannelStatusEEDiff() : cond::payloadInspector::PlotImage<EcalDQMChannelStatus>("ECAL Endcaps DQM channel status difference") {
422  setSingleIov( true );
423  }
424 
425  bool fill( const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs ) override{
426 
427  TH2F *eemap = new TH2F("eemap","", 2*IX_MAX, 0, 2*IX_MAX, IY_MAX, 0, IY_MAX);
428  TH2F *eemap_coarse = new TH2F("eemap_coarse","", 2, 0, 2*IX_MAX, 1, 0, IY_MAX);
429  TH2F *eetemp = new TH2F("eetemp","", 2*IX_MAX, 0, 2*IX_MAX, IY_MAX, 0, IY_MAX);
430  Int_t eecount = 0;
431  unsigned int run[2], irun = 0, status[kEEChannels];
432  for ( auto const & iov: iovs) {
433  std::shared_ptr<EcalDQMChannelStatus> payload = fetchPayload( std::get<1>(iov) );
434  run[irun] = std::get<0>(iov);
435  if( payload.get() ){
436  if (payload->endcapItems().empty())
437  return false;
438 
439  // looping over the EE channels
440  for(int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
441  for(int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
442  for(int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
443  if(EEDetId::validDetId(ix, iy, iz)) {
444  EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE);
445  uint32_t rawid = myEEId.rawId();
446  int channel = myEEId.hashedIndex();
447  // check the existence of ECAL channel status, for a given ECAL endcap channel
448  if (payload->find(rawid) == payload->end())
449  continue;
450 
451  if(irun == 0) {
452  status[channel] = (*payload)[rawid].getStatusCode();
453  }else {
454  unsigned int new_status = (*payload)[rawid].getStatusCode();
455  if(new_status != status[channel]) {
456  int tmp3 = 0;
457  if (new_status > status[channel])
458  tmp3 = 1;
459  else
460  tmp3 = -1;
461 
462  if(iz == -1) {
463  eemap->Fill(ix -1, iy -1, 0.05 + 0.95 * (tmp3>0));
464  eecount++;
465  eemap_coarse->Fill(ix -1, iy -1, tmp3);
466  }else {
467  eemap->Fill(ix + IX_MAX -1, iy -1, 0.05 + 0.95 * (tmp3>0));
468  eecount++;
469  eemap_coarse->Fill(ix + IX_MAX -1, iy -1, tmp3);
470  } // z side
471  } // any difference ?
472  } // 2nd IOV, fill the plots
473  } // validDetId
474  irun++;
475  }// get the payload
476  }// loop over payloads
477 
478  gStyle->SetOptStat(0);
479  //set the background color to white
480  gStyle->SetFillColor(10);
481  gStyle->SetFrameFillColor(10);
482  gStyle->SetCanvasColor(10);
483  gStyle->SetPadColor(10);
484  gStyle->SetTitleFillColor(0);
485  gStyle->SetStatColor(10);
486  //dont put a colored frame around the plots
487  gStyle->SetFrameBorderMode(0);
488  gStyle->SetCanvasBorderMode(0);
489  gStyle->SetPadBorderMode(0);
490  //use the primary color palette
491  gStyle->SetPalette(1);
492 
493  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
494  Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
495  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
496  Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
497  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
498  gStyle->SetNumberContours(NCont);
499 
500  // set the EE contours
501  for (Int_t i = 1; i <= IX_MAX; i++) {
502  for (Int_t j = 1; j <= IY_MAX; j++) {
503  if(EEDetId::validDetId(i, j, 1)) {
504  eetemp->SetBinContent(i, j, 2);
505  eetemp->SetBinContent(i + IX_MAX, j, 2);
506  }
507  }
508  }
509 
510  eetemp->SetFillColor(920);
511  TCanvas c1("c1","c1", 1200, 600);
512  c1.SetGridx(1);
513  c1.SetGridy(1);
514 
515  TLatex t1;
516  t1.SetNDC();
517  t1.SetTextAlign(26);
518  t1.SetTextSize(0.06);
519 
520  eetemp->GetXaxis()->SetNdivisions(40,kFALSE);
521  eetemp->GetYaxis()->SetNdivisions(20,kFALSE);
522  eetemp->GetXaxis()->SetLabelSize(0.00);
523  eetemp->GetYaxis()->SetLabelSize(0.00);
524  eetemp->GetXaxis()->SetTickLength(0.01);
525  eetemp->GetYaxis()->SetTickLength(0.01);
526  eetemp->SetMaximum(1.15);
527 
528  eemap->GetXaxis()->SetNdivisions(40,kFALSE);
529  eemap->GetYaxis()->SetNdivisions(20,kFALSE);
530  eemap->GetXaxis()->SetLabelSize(0.00);
531  eemap->GetYaxis()->SetLabelSize(0.00);
532  eemap->GetXaxis()->SetTickLength(0.01);
533  eemap->GetYaxis()->SetTickLength(0.01);
534  eemap->SetMaximum(1.15);
535 
536  eetemp->Draw("box");
537  eemap->Draw("same,colz");
538 
539  eemap_coarse->SetMarkerSize(2);
540  eemap_coarse->Draw("same,text");
541 
542  t1.SetTextColor(1);
543  t1.SetTextSize(0.055);
544  t1.DrawLatex(0.5, 0.96, Form("EE DQM Channel Status (Diff), IOV %i vs %i", run[0], run[1]));
545 
546  char txt[80];
547  sprintf(txt,"Net difference: %d channel(s)",eecount);
548  t1.SetTextColor(2);
549  t1.SetTextSize(0.045);
550  t1.DrawLatex(0.5, 0.91, txt);
551  t1.SetTextColor(1);
552  t1.SetTextSize(0.05);
553  t1.DrawLatex(0.14, 0.84, "EE-");
554  t1.DrawLatex(0.86, 0.84, "EE+");
555 
556  std::string ImageName(m_imageFileName);
557  c1.SaveAs(ImageName.c_str());
558  return true;
559  }// fill method
560  };
561 
562 
563 
564 
565 
566 
567 
568 }//close namespace
569 
570 // Register the classes as boost python plugin
572  PAYLOAD_INSPECTOR_CLASS( EcalDQMChannelStatusEBMap );
573  PAYLOAD_INSPECTOR_CLASS (EcalDQMChannelStatusEEMap);
574  PAYLOAD_INSPECTOR_CLASS (EcalDQMChannelStatusEBDiff);
575  PAYLOAD_INSPECTOR_CLASS (EcalDQMChannelStatusEEDiff);
576 
577 }
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
static const int XYMODE
Definition: EEDetId.h:335
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
Definition: weight.py:1
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
static const int MIN_HASH
Definition: EBDetId.h:149
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
def green(string)
int hashedIndex() const
Definition: EEDetId.h:183
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
Definition: plugin.cc:24