CMS 3D CMS Logo

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