PlotClickHandler.cxx
Go to the documentation of this file.
2 #include <cstdio>
3 #include <cmath>
4 #include <iostream>
5 #include "TObject.h"
6 #include "TPad.h"
7 #include "TH1.h"
8 #include "TH2.h"
11 
12 #include "DAQChannelMap/DAQChannelMap.h"
13 #include "DAQChannelMap/HardwareDisplay.h"
14 
15 using namespace om;
16 
18  fHwMap(new daqchannelmap::HardwareDisplay)
19 {
20  fHwMap->SetupDet(GUIModel::Instance().Data().fDetector);
21 }
22 
23 //......................................................................
24 
26  if(fHwMap) {delete fHwMap; fHwMap = 0;}
27 }
28 
29 //......................................................................
30 
32 {
33  int decoded = this->DecodeClick();
34  if (decoded==0) return;
35 
36  if (plotopt.fHwLblDet) this->HwDetHistogramInfo();
37  else if (plotopt.fHwLblDCM) this->HwDCMHistogramInfo();
38  else if (plotopt.fHwLblPCX) this->HwPCHistogramInfoX();
39  else if (plotopt.fHwLblPCY) this->HwPCHistogramInfoY();
40  else if (fHistoName.find("FEBRatesVsHourDB") < fHistoName.length() ||
41  fHistoName.find("FEBHitsVsHourDB") < fHistoName.length())
42  this->FEButcInfo();
43  else if (fHistoName.find("DCMRatesVsHour") < fHistoName.length() ||
44  fHistoName.find("DCMHitsVsHour") < fHistoName.length() ||
45  fHistoName.find("EmptyDCMsVsHour") < fHistoName.length())
46  this->DCMutcInfo();
47  else this->DefaultHistogramInfo();
48 }
49 
50 //......................................................................
51 
53 {
54  int decoded = this->DecodeClick();
55  if (decoded==0) return;
56 
57  //
58  // Double clicks supported for detector view histograms. Other would
59  // be listed here...
60  //
61  if (plotopt.fHwLblDet) this->HwDetDoubleClick();
62 }
63 
64 //......................................................................
65 
67 {
68  //
69  // Get current histo name
70  //
72 
73  //
74  // Find out where the click occured
75  //
76  TObject* h = gPad->GetSelected();
77  if (h==0) return 0;
78 
79  fH1 = 0;
80  if (h->InheritsFrom(TH1::Class())) fH1 = (TH1*)h;
81  if (fH1==0) return 0;
82 
83  fH2 = 0;
84  if (h->InheritsFrom(TH2::Class())) fH2 = (TH2*)h;
85  if (fH2==0) return 0;
86 
87 
88  int px = gPad->GetEventX();
89  double xx = gPad->AbsPixeltoX(px);
90 
91  fX = gPad->PadtoX(xx);
92  if (fX<fH1->GetXaxis()->GetXmin()) return 0;
93  if (fX>fH1->GetXaxis()->GetXmax()) return 0;
94 
95  //
96  // Handle TH2s here. Do them first since ROOT defines TH2 as a
97  // subset of TH1's
98  //
99  fY = 0;
100  fYbin = 0;
101  if (fH2) {
102  int py = gPad->GetEventY();
103  double yy = gPad->AbsPixeltoY(py);
104 
105  fY = gPad->PadtoY(yy);
106 
107  double ymin = fH2->GetYaxis()->GetXmin();
108  if (fY<ymin) return 0;
109 
110  double ymax = fH2->GetYaxis()->GetXmax();
111  if (fY>ymax) return 0;
112 
113  fXbin = fH2->GetXaxis()->FindBin(fX);
114  fYbin = fH2->GetYaxis()->FindBin(fY);
115  return 1;
116  }
117  if (fH1) {
118  fXbin = fH1->GetXaxis()->FindBin(fX);
119  return 1;
120  }
121 
122  return 0;
123 }
124 
125 //......................................................................
126 
128 {
129  if (fH2) {
130  char buff[256];
131  sprintf(buff, "Histogram %s: bin %d,%d (x=%.3f,y=%.3f) content=%.3f",
132  fHistoName.c_str(), fXbin, fYbin, fX, fY,
133  fH2->GetBinContent(fXbin,fYbin));
135  return;
136  }
137  if (fH1) {
138  char buff[256];
139  sprintf(buff, "Histogram %s: Bin %d (x=%.3f) content=%.3f",
140  fHistoName.c_str(), fXbin, fX, fH1->GetBinContent(fXbin));
142  return;
143  }
144 }
145 
146 //......................................................................
147 
149 {
150  char buff[256];
151 
152  int ix = (int)floor(fX);
153  int iy = (int)floor(fY);
154 
155  unsigned int diblock, dcm, feb, pix;
156  unsigned int block, plane, view, module, cell;
157 
158  fHwMap->XYToDAQ(&diblock, &dcm, &feb, &pix, ix, iy);
159 
160  // For the NearDet we display global plane, for the FarDet & NDOS we
161  // display block and plane-in-block.
162 
163  if(GUIModel::Instance().Data().fDetector == kNEARDET) {
164 
165  // For NearDet
166  fHwMap->DAQToPlaneModCell(&block, &plane, &view, &module, &cell,
167  diblock, dcm, feb, pix);
168 
169  // Check that we are in an instrumented region
170  if (module<=2) {
171  const char* v = "?";
172  if (view==daqchannelmap::X_VIEW) v = "V";
173  if (view==daqchannelmap::Y_VIEW) v = "H";
174  sprintf(buff,
175  "%s: Contents = %e\n"
176  "[Plane %d %s / Module %d] "
177  "[DB %.2d / DCM %.2d / FEB %2d]",
178  fHistoName.c_str(),
179  fH2->GetBinContent(fXbin,fYbin),
180  plane,
181  v,
182  module,
183  diblock,
184  dcm,
185  feb);
186 
187  }
188  else {
189  sprintf(buff,
190  "%s: Contents = %e\n"
191  "[Plane n/a / Module n/a] "
192  "[DB %.2d / DCM %.2d / FEB %2d]",
193  fHistoName.c_str(),
194  fH2->GetBinContent(fXbin,fYbin),
195  diblock,
196  dcm,
197  feb);
198 
199  }
200  }
201  else {
202 
203  // For FarDet & NDOS
204  fHwMap->DAQToPlaneInBlockModCell(&block, &plane, &view, &module, &cell,
205  diblock, dcm, feb, pix);
206 
207  // Check that we are in an instrumented region
208  if (module<=11) {
209  const char* v = "?";
210  if (view==daqchannelmap::X_VIEW) v = "V";
211  if (view==daqchannelmap::Y_VIEW) v = "H";
212  sprintf(buff,
213  "%s: Contents = %e\n"
214  "[Block %.2d / Plane in block %d %s / Module %d] "
215  "[DB %.2d / DCM %.2d / FEB %2d]",
216  fHistoName.c_str(),
217  fH2->GetBinContent(fXbin,fYbin),
218  block,
219  plane,
220  v,
221  module,
222  diblock,
223  dcm,
224  feb);
225  }
226  else {
227  sprintf(buff,
228  "%s: Contents = %e\n"
229  "[Block %.2d / Plane n/a / Module n/a] "
230  "[DB %.2d / DCM %.2d / FEB %2d]",
231  fHistoName.c_str(),
232  fH2->GetBinContent(fXbin,fYbin),
233  block,
234  diblock,
235  dcm,
236  feb);
237  }
238 
239  }
240 
242 }
243 
244 //......................................................................
245 
247 {
248  char buff[256];
249 
250  int ix = (int)floor(fX);
251  int iy = (int)floor(fY);
252 
253  unsigned int diblock, dcm, feb, pix;
254  unsigned int block, plane, view, module, cell;
255 
256  fHwMap->XYToDAQ(&diblock, &dcm, &feb, &pix, ix, iy);
257 
258  //
259  // Figure out which diblock/dcm we are in. Histograms must conform
260  // to naming convention test_[db]_[dcm]
261  //
262  const char* nm = strchr(fHistoName.c_str(), '_');
263  if (nm!=NULL) {
264  ++nm;
265  unsigned int n = sscanf(nm,"%u_%u",&diblock,&dcm);
266  if (n!=2) {
267  std::cerr << "Bad histogram name decode " << fHistoName << std::endl;
268  diblock = 0;
269  dcm = 0;
270  }
271  }
272 
273  // For the NearDet we display global plane, for the FarDet & NDOS we
274  // display block and plane-in-block.
275 
276  if(GUIModel::Instance().Data().fDetector == kNEARDET) {
277 
278  // For NearDet
279  fHwMap->DAQToPlaneModCell(&block, &plane, &view, &module, &cell,
280  diblock, dcm, feb, pix);
281 
282  // Check that we are in an instrumented region
283  if (cell<=3*32) {
284  const char* v = "?";
285  if (view==daqchannelmap::X_VIEW) v = "V";
286  if (view==daqchannelmap::Y_VIEW) v = "H";
287  sprintf(buff,
288  "%s: Contents = %e\n"
289  "[Plane %d %s / Module %d / Cell %d] "
290  " [DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
291  fHistoName.c_str(),
292  fH2->GetBinContent(fXbin,fYbin),
293  plane,
294  v,
295  module,
296  cell,
297  diblock,
298  dcm,
299  feb,
300  pix);
301  }
302  else {
303  sprintf(buff,
304  "%s: Contents = %e"
305  "[Plane n/a / Module n/a / Cell n/a] "
306  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
307  fHistoName.c_str(),
308  fH2->GetBinContent(fXbin,fYbin),
309  diblock,
310  dcm,
311  feb,
312  pix);
313  }
314 
315  }
316  else {
317 
318  // For FarDet & NDOS
319  fHwMap->DAQToPlaneInBlockModCell(&block, &plane, &view, &module, &cell,
320  diblock, dcm, feb, pix);
321 
322  // Check that we are in an instrumented region
323  if (cell<=12*32) {
324  const char* v = "?";
325  if (view==daqchannelmap::X_VIEW) v = "V";
326  if (view==daqchannelmap::Y_VIEW) v = "H";
327  sprintf(buff,
328  "%s: Contents = %e\n"
329  "[Block %.2d / Plane in block %d %s / Module %d / Cell %d] "
330  " [DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
331  fHistoName.c_str(),
332  fH2->GetBinContent(fXbin,fYbin),
333  block,
334  plane,
335  v,
336  module,
337  cell,
338  diblock,
339  dcm,
340  feb,
341  pix);
342  }
343  else {
344  sprintf(buff,
345  "%s: Contents = %e"
346  "[Block %.2d / Plane n/a / Module n/a / Cell n/a] "
347  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
348  fHistoName.c_str(),
349  fH2->GetBinContent(fXbin,fYbin),
350  block,
351  diblock,
352  dcm,
353  feb,
354  pix);
355  }
356 
357  }
358 
360 }
361 
362 //......................................................................
363 
365 {
366  unsigned int diblock, block, dcm, feb, pix;
367  unsigned int plane, pinb, view, module, cell;
368 
369  plane = fH2->GetNbinsX() - fXbin;
370  cell = fH2->GetNbinsY() - fYbin;
371 
372  fHwMap->PlaneCellToDAQ(plane, &pinb, &view, &module, cell,
373  &diblock, &block, &dcm, &feb, &pix);
374 
375  char buff[256];
376 
377  // For the NearDet we display global plane, for the FarDet & NDOS we
378  // display block and plane-in-block.
379 
380  if(GUIModel::Instance().Data().fDetector == kNEARDET) {
381 
382  // For NearDet
383 
384  // Check to see if we clicked on a bin cooresponding to a plane in the
385  // other view (in which case db, dcm, etc. will be wrong.)
386  if(view == daqchannelmap::X_VIEW) {
387  sprintf(buff,
388  "%s: Contents = %e\n"
389  "[Plane %d V / Module %d / Cell %d] "
390  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
391  fHistoName.c_str(),
392  fH2->GetBinContent(fXbin,fYbin),
393  plane,
394  module,
395  cell,
396  diblock,
397  dcm,
398  feb,
399  pix);
400  }
401  else {
402  sprintf(buff,
403  "%s: Contents = %e\n"
404  "[Plane %dH]",
405  fHistoName.c_str(),
406  fH2->GetBinContent(fXbin,fYbin),
407  plane);
408  }
409 
410  }
411  else {
412 
413  // For FarDet & NDOS
414 
415  // Check to see if we clicked on a bin cooresponding to a plane in the
416  // other view (in which case db, dcm, etc. will be wrong.)
417  if(view == daqchannelmap::X_VIEW) {
418  sprintf(buff,
419  "%s: Contents = %e\n"
420  "[Block %.2d / Plane in block %d V / Module %d / Cell %d] "
421  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
422  fHistoName.c_str(),
423  fH2->GetBinContent(fXbin,fYbin),
424  block,
425  pinb,
426  module,
427  cell,
428  diblock,
429  dcm,
430  feb,
431  pix);
432  }
433  else {
434  sprintf(buff,
435  "%s: Contents = %e\n"
436  "[Plane %dH]",
437  fHistoName.c_str(),
438  fH2->GetBinContent(fXbin,fYbin),
439  plane);
440  }
441 
442  }
443 
445 }
446 
447 //......................................................................
448 
450 {
451  unsigned int diblock, block, dcm, feb, pix;
452  unsigned int plane, pinb, view, module, cell;
453 
454  plane = fH2->GetNbinsX() - fXbin;
455  cell = fYbin - 1;
456 
457  fHwMap->PlaneCellToDAQ(plane, &pinb, &view, &module, cell,
458  &diblock, &block, &dcm, &feb, &pix);
459 
460  char buff[256];
461 
462  // For the NearDet we display global plane, for the FarDet & NDOS we
463  // display block and plane-in-block.
464 
465  if(GUIModel::Instance().Data().fDetector == kNEARDET) {
466 
467  // For NearDet
468 
469  // Check to see if we clicked on a bin cooresponding to a plane in the
470  // other view (in which case db, dcm, etc. will be wrong.)
471  if(view == daqchannelmap::Y_VIEW) {
472  sprintf(buff,
473  "%s: Contents = %e\n"
474  "[Plane %d H / Module %d / Cell %d] "
475  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
476  fHistoName.c_str(),
477  fH2->GetBinContent(fXbin,fYbin),
478  plane,
479  module,
480  cell,
481  diblock,
482  dcm,
483  feb,
484  pix);
485  }
486  else {
487  sprintf(buff,
488  "%s: Contents = %e\n"
489  "[Plane %dV]",
490  fHistoName.c_str(),
491  fH2->GetBinContent(fXbin,fYbin),
492  plane);
493  }
494 
495  }
496  else {
497 
498  // For FarDet & NDOS
499 
500  // Check to see if we clicked on a bin cooresponding to a plane in the
501  // other view (in which case db, dcm, etc. will be wrong.)
502  if(view == daqchannelmap::Y_VIEW) {
503  sprintf(buff,
504  "%s: Contents = %e\n"
505  "[Block %.2d / Plane in block %d H / Module %d / Cell %d] "
506  "[DB %.2d / DCM %.2d / FEB %2d / PIX %2d]",
507  fHistoName.c_str(),
508  fH2->GetBinContent(fXbin,fYbin),
509  block,
510  pinb,
511  module,
512  cell,
513  diblock,
514  dcm,
515  feb,
516  pix);
517  }
518  else {
519  sprintf(buff,
520  "%s: Contents = %e\n"
521  "[Plane %dV]",
522  fHistoName.c_str(),
523  fH2->GetBinContent(fXbin,fYbin),
524  plane);
525  }
526 
527  }
528 
530 }
531 
532 //......................................................................
533 
535 {
536  unsigned int diblock, dcm, feb, pix;
537  unsigned int block, plane, view, module, cell;
538 
539  //
540  // Figure out which diblock we are in. Histograms must conform
541  // to naming convention test_[db]
542  //
543  const char* nm = strchr(fHistoName.c_str(), '_');
544  if (nm!=NULL) {
545  ++nm;
546  unsigned int n = sscanf(nm,"%u",&diblock);
547  if (n!=1) {
548  std::cerr << "Bad histogram name decode " << fHistoName << std::endl;
549  diblock = 0;
550  }
551  }
552 
553  char buff[256];
554 
555  dcm = (fYbin-1)/64+1;
556  feb = (fYbin-1)%64;
557  pix = 0; // pix is not used here so just set it to a throw away value
558 
559  // For the NearDet we display global plane, for the FarDet & NDOS we
560  // display block and plane-in-block.
561 
563 
564  // For NearDet
565 
566  fHwMap->DAQToPlaneModCell(&block, &plane, &view, &module, &cell,
567  diblock, dcm, feb, pix);
568 
569  const char* v = "?";
570  if (view==daqchannelmap::X_VIEW) v = "V";
571  if (view==daqchannelmap::Y_VIEW) v = "H";
572  sprintf(buff,
573  "%s: Contents = %e\n"
574  "[Plane %d %s / Module %d] "
575  "[DB %.2d / DCM %.2d / FEB %2d ]",
576  fHistoName.c_str(),
577  fH2->GetBinContent(fXbin,fYbin),
578  plane,
579  v,
580  module,
581  diblock,
582  dcm,
583  feb);
584 
585  }
586  else {
587 
588  // For FarDet & NDOS
589 
590  fHwMap->DAQToPlaneInBlockModCell(&block, &plane, &view, &module, &cell,
591  diblock, dcm, feb, pix);
592 
593  const char* v = "?";
594  if (view==daqchannelmap::X_VIEW) v = "V";
595  if (view==daqchannelmap::Y_VIEW) v = "H";
596  sprintf(buff,
597  "%s: Contents = %e\n"
598  "[Block %.2d / Plane in block %d %s / Module %d] "
599  "[DB %.2d / DCM %.2d / FEB %2d ]",
600  fHistoName.c_str(),
601  fH2->GetBinContent(fXbin,fYbin),
602  block,
603  plane,
604  v,
605  module,
606  diblock,
607  dcm,
608  feb);
609 
610  }
611 
613 }
614 
615 //......................................................................
616 
618 {
619  char buff[256];
620 
621  unsigned int diblock, dcm;
622 
623  diblock = (fYbin-1)/(fHwMap->fNdcmTop + fHwMap->fNdcmSide) + 1;
624  dcm = (fYbin-1)%(fHwMap->fNdcmTop + fHwMap->fNdcmSide) + 1;
625 
626  sprintf(buff,
627  "%s: Contents = %e\n"
628  "[DB %.2d / DCM %.2d ]",
629  fHistoName.c_str(),
630  fH2->GetBinContent(fXbin,fYbin),
631  diblock,
632  dcm);
633 
635 }
636 
637 //......................................................................
638 
640 {
641  int ix = (int)floor(fX);
642  int iy = (int)floor(fY);
643 
644  unsigned int diblock, dcm;
645  fHwMap->XYDiblock(&diblock, ix);
646  fHwMap->XYDCM (&dcm, iy);
647 
648  //
649  // Histograms which drill down to pixel views
650  //
651  const std::string DCMHitRateMap ("DCMHitRateMap");
652  const std::string DCMHitRateMapHighADC("DCMHitRateMapHighADC");
653  const std::string DCMHitRateMapLowADC ("DCMHitRateMapLowADC");
654  const std::string DCMHitRateMapMipADC ("DCMHitRateMapMipADC");
655  const std::string FEBHitRateMap ("FEBHitRateMap");
656  const std::string FEBHitRateMapHighADC("FEBHitRateMapHighADC");
657  const std::string FEBHitRateMapLowADC ("FEBHitRateMapLowADC");
658  const std::string FEBHitRateMapMipADC ("FEBHitRateMapMipADC");
659  const std::string PixelHitRateMap ("PixelHitRateMap");
660 
661  const std::string DCMHitMap ("DCMHitMap");
662  const std::string DCMHitMapHighADC("DCMHitMapHighADC");
663  const std::string DCMHitMapLowADC ("DCMHitMapLowADC");
664  const std::string DCMHitMapMipADC ("DCMHitMapMipADC");
665  const std::string FEBHitMap ("FEBHitMap");
666  const std::string FEBHitMapHighADC("FEBHitMapHighADC");
667  const std::string FEBHitMapLowADC ("FEBHitMapLowADC");
668  const std::string FEBHitMapMipADC ("FEBHitMapMipADC");
669  const std::string PixelHitMap ("PixelHitMap");
670 
671  const std::string TotADCFEBHitMap ("TotADCFEBHitMap");
672 
673  const std::string DPEbyPixelDCM ("DPEbyPixelDCM");
674  const std::string LSEbyPixelDCM ("LSEbyPixelDCM");
675  const std::string DbMbyPixelDCM ("DbMbyPixelDCM");
676  const std::string FEBFbyPixelDCM("FEBFbyPixelDCM");
677  const std::string FEBEbyPixelDCM("FEBEbyPixelDCM");
678  const std::string FIFObyPixelDCM("FIFObyPixelDCM");
679  const std::string TECCEnblbyPixelDCM("TECCEnblbyPixelDCM");
680  const std::string EDAQbyPixelDCM("EDAQbyPixelDCM");
681  const std::string DDEbyPixelDCM("DDEbyPixelDCM");
682  const std::string TECCErrbyPixelDCM("TECCErrbyPixelDCM");
683  const std::string ADCEbyPixelDCM("ADCEbyPixelDCM");
684  const std::string OFEbyPixelDCM ("OFEbyPixelDCM");
685  const std::string PEbyPixelDCM ("PEbyPixelDCM");
686  const std::string CEbyPixelDCM ("CEbyPixelDCM");
687 
688  const std::string BCbyDCM ("BCbyDCM");
689 
690 
691 
692  ///\todo: remove all of the hard-coded drill-down histos listed above
693  // and rename them according to the general scheme outlined below
694 
695  //
696  // Determine if histo is a drilldown histo from the name and set the
697  // current histogram to the appropriate DCM histo.
698  //
699 
700  bool drilldown = fHistoName.find("DET_dd") < fHistoName.length();
701 
702  if(drilldown) {
703  unsigned int pos = fHistoName.find("DET_dd");
704  std::string name = fHistoName.substr(0,pos);
705  char temp[256];
706  sprintf(temp, "DCM_%.2d_%.2d",diblock,dcm);
707  name += temp;
708  GUIModel::Instance().SetCurrentHistogram(name.c_str());
709  }
710 
711 
712  if (DCMHitMap == fHistoName ||
713  FEBHitMap == fHistoName ||
714  PixelHitMap == fHistoName) {
715  char hist[256];
716  sprintf(hist, "PixelsDCM_%.2d_%.2d",diblock,dcm);
718  return;
719  }
720  if (DCMHitMapHighADC == fHistoName ||
721  FEBHitMapHighADC == fHistoName) {
722  char hist[256];
723  sprintf(hist, "HighADCPixelsDCM_%.2d_%.2d",diblock,dcm);
725  return;
726  }
727  if (DCMHitMapLowADC == fHistoName ||
728  FEBHitMapLowADC == fHistoName) {
729  char hist[256];
730  sprintf(hist, "LowADCPixelsDCM_%.2d_%.2d",diblock,dcm);
732  return;
733  }
734  if (DCMHitMapMipADC == fHistoName ||
735  FEBHitMapMipADC == fHistoName) {
736  char hist[256];
737  sprintf(hist, "MipADCPixelsDCM_%.2d_%.2d",diblock,dcm);
739  return;
740  }
741  if (DCMHitRateMap == fHistoName ||
742  FEBHitRateMap == fHistoName ||
743  PixelHitRateMap == fHistoName) {
744  char hist[256];
745  sprintf(hist, "PixelsRateDCM_%.2d_%.2d",diblock,dcm);
747  return;
748  }
749  if (DCMHitRateMapHighADC == fHistoName ||
750  FEBHitRateMapHighADC == fHistoName) {
751  char hist[256];
752  sprintf(hist, "HighADCPixelsRateDCM_%.2d_%.2d",diblock,dcm);
754  return;
755  }
756  if (DCMHitRateMapLowADC == fHistoName ||
757  FEBHitRateMapLowADC == fHistoName) {
758  char hist[256];
759  sprintf(hist, "LowADCPixelsRateDCM_%.2d_%.2d",diblock,dcm);
761  return;
762  }
763  if (DCMHitRateMapMipADC == fHistoName ||
764  FEBHitRateMapMipADC == fHistoName) {
765  char hist[256];
766  sprintf(hist, "MipADCPixelsRateDCM_%.2d_%.2d",diblock,dcm);
768  return;
769  }
770 
771 
772  if (TotADCFEBHitMap == fHistoName) {
773  char hist[256];
774  sprintf(hist, "TotADCPixelsDCM_%.2d_%.2d",diblock,dcm);
776  return;
777  }
778 
779 
780  if (DPEbyPixelDCM == fHistoName) {
781  char hist[256];
782  sprintf(hist, "DPEperDCM_%.2d_%.2d",diblock,dcm);
784  return;
785  }
786  if (LSEbyPixelDCM == fHistoName) {
787  char hist[256];
788  sprintf(hist, "LSEperDCM_%.2d_%.2d",diblock,dcm);
790  return;
791  }
792  if (DbMbyPixelDCM == fHistoName) {
793  char hist[256];
794  sprintf(hist, "DbMperDCM_%.2d_%.2d",diblock,dcm);
796  return;
797  }
798  if (FEBFbyPixelDCM == fHistoName) {
799  char hist[256];
800  sprintf(hist, "FEBFperDCM_%.2d_%.2d",diblock,dcm);
802  return;
803  }
804  if (FEBEbyPixelDCM == fHistoName) {
805  char hist[256];
806  sprintf(hist, "FEBEperDCM_%.2d_%.2d",diblock,dcm);
808  return;
809  }
810  if (FIFObyPixelDCM == fHistoName) {
811  char hist[256];
812  sprintf(hist, "FIFOperDCM_%.2d_%.2d",diblock,dcm);
814  return;
815  }
816  if (TECCEnblbyPixelDCM == fHistoName) {
817  char hist[256];
818  sprintf(hist, "TECCEnblperDCM_%.2d_%.2d",diblock,dcm);
820  return;
821  }
822  if (EDAQbyPixelDCM == fHistoName) {
823  char hist[256];
824  sprintf(hist, "EDAQperDCM_%.2d_%.2d",diblock,dcm);
826  return;
827  }
828  if (DDEbyPixelDCM == fHistoName) {
829  char hist[256];
830  sprintf(hist, "DDEperDCM_%.2d_%.2d",diblock,dcm);
832  return;
833  }
834  if (TECCErrbyPixelDCM == fHistoName) {
835  char hist[256];
836  sprintf(hist, "TECCErrperDCM_%.2d_%.2d",diblock,dcm);
838  return;
839  }
840  if (ADCEbyPixelDCM == fHistoName) {
841  char hist[256];
842  sprintf(hist, "ADCEperDCM_%.2d_%.2d",diblock,dcm);
844  return;
845  }
846  if (OFEbyPixelDCM == fHistoName) {
847  char hist[256];
848  sprintf(hist, "OFEperDCM_%.2d_%.2d",diblock,dcm);
850  return;
851  }
852  if (PEbyPixelDCM == fHistoName) {
853  char hist[256];
854  sprintf(hist, "PEperDCM_%.2d_%.2d",diblock,dcm);
856  return;
857  }
858  if (CEbyPixelDCM == fHistoName) {
859  char hist[256];
860  sprintf(hist, "CEperDCM_%.2d_%.2d",diblock,dcm);
862  return;
863  }
864  if (BCbyDCM == fHistoName) {
865  char hist[256];
866  sprintf(hist, "BCperDCM_%.2d_%.2d",diblock,dcm);
868  return;
869  }
870 }
871 
872 ////////////////////////////////////////////////////////////////////////
void PlaneCellToDAQ(unsigned int plane, unsigned int *pinb, unsigned int *view, unsigned int *module, unsigned int cell, unsigned int *db, unsigned int *block, unsigned int *dcm, unsigned int *feb, unsigned int *pix)
const XML_Char * name
Definition: expat.h:151
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
void DoubleClick(const PlotOptions &plotopt)
Double_t xx
Definition: macro.C:12
void DAQToPlaneInBlockModCell(unsigned int *block, unsigned int *pinb, unsigned int *view, unsigned int *module, unsigned int *cell, unsigned int db, unsigned int dcm, unsigned int feb, unsigned int pix)
void XYDCM(unsigned int *dcm, unsigned int iy)
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
Detector_t fDetector
Definition: GUIModelData.h:34
static constexpr Double_t nm
Definition: Munits.h:133
OStream cerr
Definition: OStream.cxx:7
void XYToDAQ(unsigned int *db, unsigned int *dcm, unsigned int *feb, unsigned int *pix, unsigned int ix, unsigned int iy)
daqchannelmap::HardwareDisplay * fHwMap
Identifier for the Y measuring view of the detector (side)
Double_t ymax
Definition: plot.C:25
double fX
X position of click.
block
print "ROW IS " print row
Definition: elec2geo.py:31
static GUIModel & Instance()
Definition: GUIModel.cxx:11
std::string fHistoName
Name of Current Histogram.
double fY
Y position of click.
correl_xv GetXaxis() -> SetDecimals()
Identifier for the X measuring view of the detector (top)
bool fHwLblDet
Apply hardware label to detector-wide plot.
Definition: PlotOptions.h:51
void SetHistogramInfoText(const char *t)
Definition: GUIModel.cxx:129
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
bool fHwLblPCX
Apply hardware labels to plane/cell plot (X-view)
Definition: PlotOptions.h:54
void SingleClick(const PlotOptions &plotopt)
int fYbin
Y bin number of click.
bool fHwLblPCY
Apply hardware labels to plane/cell plot (Y-view)
Definition: PlotOptions.h:55
const char * Current() const
void SetCurrentHistogram(const char *h)
Definition: GUIModel.cxx:102
CurrentHistogram fCurrentHistogram
Definition: GUIModelData.h:37
void DAQToPlaneModCell(unsigned int *block, unsigned int *plane, unsigned int *view, unsigned int *module, unsigned int *cell, unsigned int db, unsigned int dcm, unsigned int feb, unsigned int pix)
bool fHwLblDCM
Apply hardware label to DCM plot.
Definition: PlotOptions.h:53
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
TH2 * fH2
2D histogram clicked on
Double_t ymin
Definition: plot.C:24
const GUIModelData & Data() const
Definition: GUIModel.h:15
int fXbin
X bin number of click.
void XYDiblock(unsigned int *db, unsigned int ix)
Online Monitoring package header.
TH1 * fH1
1D histogram clicked on
enum BeamMode string