Public Member Functions | Public Attributes | List of all members
daqchannelmap::HardwareDisplay Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/DAQChannelMap/cxx/include/HardwareDisplay.h"

Public Member Functions

void SetupDet (int det)
 
void SetupNDOS ()
 
void SetupNearDet ()
 
void SetupFarDet ()
 
void SetupTestBeam ()
 
void DAQToXY (unsigned int db, unsigned int dcm, unsigned int feb, unsigned int pix, unsigned int *ix, unsigned int *iy)
 
void XYToDAQ (unsigned int *db, unsigned int *dcm, unsigned int *feb, unsigned int *pix, unsigned int ix, unsigned int iy)
 
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)
 
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 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)
 
void DiblockXY (unsigned int db, unsigned int *ix, unsigned int *iy)
 
void DCMXY (unsigned int dcm, unsigned int *ix, unsigned int *iy)
 
void FEBXY (unsigned int feb, unsigned int *ix, unsigned int *iy)
 
void PixXY (unsigned int pix, unsigned int *ix, unsigned int *iy)
 
void XYDiblock (unsigned int *db, unsigned int ix)
 
void XYDCM (unsigned int *dcm, unsigned int iy)
 
void XYFEB (unsigned int *feb, unsigned int ix, unsigned int iy)
 
void XYPix (unsigned int *pix, unsigned int ix, unsigned int iy)
 

Public Attributes

unsigned int fDetId
 DAQ detector ID. More...
 
unsigned int fNdiblocks
 Number of diblocks in detector. More...
 
unsigned int fNdcmTop
 Number of DMC's per diblock on top of detector. More...
 
unsigned int fNdcmSide
 Number of DMC's per diblock on side of detector. More...
 
unsigned int fNfebCols
 Number of FEB columns in a DCM. More...
 
unsigned int fNfebRows
 Number of FEB rows in a DCM. More...
 
unsigned int fNpixCols
 Number of pixel columns in an FEB. More...
 
unsigned int fNpixRows
 Number of pixel rows in an FEB. More...
 
unsigned int fNxPerDB
 Width of 1 diblock. More...
 
unsigned int fNyPerDCM
 Height of 1 DCM. More...
 
unsigned int fNplanes
 Number of planes in the detector. More...
 
unsigned int fNplanesPerBL
 Number of planes per block. More...
 
unsigned int fNxcells
 Width of detector in units of cells. More...
 
unsigned int fNycells
 Height of detector in units of cells. More...
 
unsigned int fXmax
 Width of entire view. More...
 
unsigned int fYmax
 Height of entire view. More...
 
unsigned int fNcellPerMod
 Number of cells per module. More...
 

Detailed Description

Map hardware addresses to a set of x,y pairs for display

Definition at line 14 of file HardwareDisplay.h.

Member Function Documentation

void HardwareDisplay::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 
)

................................................................. Convert a DAQ address to a plane number within a block / module / global cell address

Parameters
block- on return, block number 0...27
pinb- on return, plane number within a block (0...31)
view- on return, X measuring (vertical) or Y measuring (horizontal)
module- on return, Module number 0...11
cell- on return, Global cell number 0...nmodule*32
db- input DAQ diblock address
dcm- input DAQ DCM address
feb- input DAQ FEB address
pix- input DAQ APD pixel address

Definition at line 305 of file HardwareDisplay.cpp.

References daqchannelmap::DAQChannelMap::computeBlock(), daqchannelmap::DAQChannelMap::computePlaneInBlock(), daqchannelmap::DAQChannelMap::encodeDChan(), daqchannelmap::DAQChannelMap::encodeLChan(), daqchannelmap::DAQChannelMap::getCell(), daqchannelmap::DAQChannelMap::getInstance(), and daqchannelmap::DAQChannelMap::getView().

Referenced by om::PlotClickHandler::FEButcInfo(), om::PlotClickHandler::HwDCMHistogramInfo(), om::PlotClickHandler::HwDetHistogramInfo(), and om::FEBRateAnalysis::StoreContent().

314 {
317 
318  unsigned int dchan = cmap->encodeDChan(fDetId, db, dcm, feb, pix);
319  unsigned int lchan = cmap->encodeLChan(dchan);
320 
321  *block = cmap->computeBlock(lchan);
322  *pinb = cmap->computePlaneInBlock(lchan);
323  *cell = cmap->getCell(lchan);
324  *view = cmap->getView(dchan);
325  *module = ((*cell)/fNcellPerMod);
326 }
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
unsigned int fDetId
DAQ detector ID.
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
unsigned int fNcellPerMod
Number of cells per module.
block
print "ROW IS " print row
Definition: elec2geo.py:31
static DAQChannelMap * getInstance(int detID)
cmap::CMap class source code
Definition: CMap.cxx:17
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
virtual block_t computeBlock(lchan logicalchan) const =0
Which block is this lchan in?
uint32_t dchan
< DAQ Channel Map Package
virtual plane_t computePlaneInBlock(lchan logicalchan) const =0
Which global plane in this lchan in?
void HardwareDisplay::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 
)

................................................................. Convert a DAQ address to a global plane / module / global cell address

Parameters
block- on return, block number 0...27
plane- on return, global plane number (0...nblock*32)
view- on return, X measuring (vertical) or Y measuring (horizontal)
module- on return, Module number 0...11
cell- on return, Global cell number 0...nmodule*32
db- input DAQ diblock address
dcm- input DAQ DCM address
feb- input DAQ FEB address
pix- input DAQ APD pixel address

Definition at line 280 of file HardwareDisplay.cpp.

References daqchannelmap::DAQChannelMap::computeBlock(), daqchannelmap::DAQChannelMap::encodeDChan(), daqchannelmap::DAQChannelMap::encodeLChan(), daqchannelmap::DAQChannelMap::getCell(), daqchannelmap::DAQChannelMap::getInstance(), daqchannelmap::DAQChannelMap::getPlane(), and daqchannelmap::DAQChannelMap::getView().

Referenced by om::PlotClickHandler::FEButcInfo(), om::PlotClickHandler::HwDCMHistogramInfo(), and om::PlotClickHandler::HwDetHistogramInfo().

289 {
292 
293  unsigned int dchan = cmap->encodeDChan(fDetId, db, dcm, feb, pix);
294  unsigned int lchan = cmap->encodeLChan(dchan);
295 
296  *block = cmap->computeBlock(lchan);
297  *plane = cmap->getPlane(lchan);
298  *cell = cmap->getCell(lchan);
299  *view = cmap->getView(dchan);
300  *module = ((*cell)/fNcellPerMod);
301 }
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
unsigned int fDetId
DAQ detector ID.
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
unsigned int fNcellPerMod
Number of cells per module.
block
print "ROW IS " print row
Definition: elec2geo.py:31
static DAQChannelMap * getInstance(int detID)
plane_t getPlane(lchan logicalchan) const
Decode the plane number from an lchan.
cmap::CMap class source code
Definition: CMap.cxx:17
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
virtual block_t computeBlock(lchan logicalchan) const =0
Which block is this lchan in?
uint32_t dchan
< DAQ Channel Map Package
void HardwareDisplay::DAQToXY ( unsigned int  db,
unsigned int  dcm,
unsigned int  feb,
unsigned int  pix,
unsigned int ix,
unsigned int iy 
)

................................................................. Assign an x,y display location to a DAQ hardware address

Parameters
db- diblock number 1...14
dcm- DCM number 1...12
feb- FEB number 0...63
pix- pixel number 0...31
ix- On return, the x display location assigned
iy- On return, the y display location assigned

Definition at line 190 of file HardwareDisplay.cpp.

References x1, submit_syst::x2, y1, and submit_syst::y2.

Referenced by evd::RawDataDrawer::RawDigitHardware(), and om::RawEventUnpacker::UnpackNanoSlice().

196 {
197  unsigned int x1, x2, x3, x4;
198  unsigned int y1, y2, y3, y4;
199 
200  this->DiblockXY(db, &x1, &y1);
201  this->DCMXY (dcm, &x2, &y2);
202  this->FEBXY (feb, &x3, &y3);
203  this->PixXY (pix, &x4, &y4);
204 
205  *ix = x1+x2+x3+x4;
206  *iy = y1+y2+y3+y4;
207 }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
void DiblockXY(unsigned int db, unsigned int *ix, unsigned int *iy)
void FEBXY(unsigned int feb, unsigned int *ix, unsigned int *iy)
void DCMXY(unsigned int dcm, unsigned int *ix, unsigned int *iy)
void PixXY(unsigned int pix, unsigned int *ix, unsigned int *iy)
void HardwareDisplay::DCMXY ( unsigned int  dcm,
unsigned int ix,
unsigned int iy 
)

................................................................. Get the lower left hand corner on the display for a DCM

Parameters
DCM: DCM number, 1...12
ix: On return, x pixel location within a Diblock block
iy: On return, y pixel location within a Diblock block

Definition at line 151 of file HardwareDisplay.cpp.

Referenced by om::MicroErrors::GetMicroSliceSummary(), OnMonAnaHistosFEB_IssueRates(), and OnMonAnaHistosPIX().

154 {
155  *ix = 0;
156  *iy = fYmax - dcm*fNyPerDCM;
157 }
unsigned int fYmax
Height of entire view.
unsigned int fNyPerDCM
Height of 1 DCM.
void HardwareDisplay::DiblockXY ( unsigned int  db,
unsigned int ix,
unsigned int iy 
)

................................................................. Get the lower left hand corner on the display for a Diblock

Parameters
db: Diblock number, 1-14...
ix: On return, x pixel location within the whole display
iy: On return, y pixel location within the whole display

Definition at line 140 of file HardwareDisplay.cpp.

References febshutoff_auto::db.

Referenced by om::MicroErrors::GetMicroSliceSummary(), OnMonAnaHistosFEB_IssueRates(), and OnMonAnaHistosPIX().

143 {
144  //*ix = fNxPerDB*(db-1); // diblocks numbered L to R
145  *ix = fNxPerDB*(fNdiblocks - db); // diblocks numbered R to L
146  *iy = 0;
147 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fNdiblocks
Number of diblocks in detector.
void HardwareDisplay::FEBXY ( unsigned int  feb,
unsigned int ix,
unsigned int iy 
)

................................................................. Get the lower left hand corner on the display for an FEB

Parameters
FEB: FEB number, 0...63
ix: On return, x pixel location within a DCM block
iy: On return, y pixel location within a DCM block

Definition at line 161 of file HardwareDisplay.cpp.

Referenced by BuildMetricsTree_OnMon(), om::NanoErrors::GetNanoSliceSummary(), om::HitMaps::GetNanoSliceSummary(), OnMonAnaHistosFEB_IssueRates(), and OnMonAnaHistosPIX().

164 {
165  *ix = (feb%fNfebCols)*fNpixCols;
166  *iy = ((fNfebRows - 1) - feb/fNfebCols)*fNpixRows;
167 }
unsigned int fNfebRows
Number of FEB rows in a DCM.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::PixXY ( unsigned int  pix,
unsigned int ix,
unsigned int iy 
)

................................................................. Get the location of a pixel on the display inside an FEB

Parameters
pix- Pixel number 0...31
ix- On return, x display location within an FEB
iy- On return, y display location within an FEB

Definition at line 171 of file HardwareDisplay.cpp.

References submit_syst::x, and submit_syst::y.

Referenced by BuildMetricsTree_OnMon(), om::NanoErrors::GetNanoSliceSummary(), om::HitMaps::GetNanoSliceSummary(), OnMonAnaHistosFEB_IssueRates(), and OnMonAnaHistosPIX().

174 {
175  static unsigned int x[32] = {
176  3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2,
177  1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0
178  };
179  static unsigned int y[32] = {
180  1,0,3,2,5,4,7,6, 1,0,3,2,5,4,6,7,
181  7,6,4,5,2,3,0,1, 6,7,4,5,2,3,0,1
182  };
183 
184  *ix = x[pix];
185  *iy = y[pix];
186 }
void HardwareDisplay::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 
)

................................................................. Convert a global plane and cell address to a DAQ address

Parameters
plane- input global plane number, 0...nblock*32
pinb- on return, plane number within a block (0...31)
view- on return, X measuring (vertical) or Y measuring (horizontal)
module- on return, Module number 0...11
cell- input global cell number 0...nmodule*32
db- input DAQ diblock address
block- on return block address
dcm- on return, DAQ DCM address
feb- on return, DAQ FEB address
pix- on return, DAQ APD pixel address

Definition at line 330 of file HardwareDisplay.cpp.

References getBrightness::cell, daqchannelmap::DAQChannelMap::computeBlock(), daqchannelmap::DAQChannelMap::computePlaneInBlock(), daqchannelmap::DAQChannelMap::encodeDChan(), daqchannelmap::DAQChannelMap::encodeLChan(), daqchannelmap::DAQChannelMap::getDCM(), daqchannelmap::DAQChannelMap::getDiBlock(), daqchannelmap::DAQChannelMap::getFEB(), daqchannelmap::DAQChannelMap::getInstance(), daqchannelmap::DAQChannelMap::getPixel(), and daqchannelmap::DAQChannelMap::getView().

Referenced by om::PlotClickHandler::HwPCHistogramInfoX(), and om::PlotClickHandler::HwPCHistogramInfoY().

340 {
343 
344  unsigned int lchan = cmap->encodeLChan(fDetId, plane, cell);
345  unsigned int dchan = cmap->encodeDChan(lchan);
346 
347  *pinb = cmap->computePlaneInBlock(lchan);
348  *view = cmap->getView(dchan);
349  *db = cmap->getDiBlock(dchan);
350  *block = cmap->computeBlock(lchan);
351  *dcm = cmap->getDCM (dchan);
352  *feb = cmap->getFEB(dchan);
353  *pix = cmap->getPixel (dchan);
354  *module = ((cell)/fNcellPerMod);
355 }
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
unsigned int fDetId
DAQ detector ID.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
unsigned int fNcellPerMod
Number of cells per module.
block
print "ROW IS " print row
Definition: elec2geo.py:31
static DAQChannelMap * getInstance(int detID)
pixel_t getPixel(dchan daqchan) const
Decode the pixel id from a dchan.
cmap::CMap class source code
Definition: CMap.cxx:17
dcm_id_t getDCM(dchan daqchan) const
Decode the dcm ID from a dchan.
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
virtual block_t computeBlock(lchan logicalchan) const =0
Which block is this lchan in?
uint32_t dchan
< DAQ Channel Map Package
virtual plane_t computePlaneInBlock(lchan logicalchan) const =0
Which global plane in this lchan in?
diblock_t getDiBlock(dchan daqchan) const
Decode the diblock ID from a dchan.
feb_t getFEB(dchan daqchan) const
Decode the feb id from a dchan.
void HardwareDisplay::SetupDet ( int  det)

................................................................. Configure the mapping for a detector

Parameters
det: Detector ID following NovaDAQConventions

Definition at line 16 of file HardwareDisplay.cpp.

References om::cerr, allTimeWatchdog::endl, cmf::kFARDET, novadaq::cnv::kNDOS, cmf::kNEARDET, and novadaq::cnv::kTESTBEAM.

Referenced by chaninfo::BadChanValidate::BadChansFromOM(), BuildMetricsTree_OnMon(), evd::HardwarePad::Config(), om::UTCLabel::DCMLabels(), om::UTCLabel::FEBLabels(), om::FEBRateAnalysis::FEBRateAnalysis(), om::FEBRatesByDiblock::FEBRatesByDiblock(), om::HitMaps::HitMaps(), om::MicroErrors::MicroErrors(), om::NanoErrors::NanoErrors(), OnMonAnaHistosFEB_IssueRates(), OnMonAnaHistosPIX(), om::PlotClickHandler::PlotClickHandler(), evd::RawDataDrawer::RawDigitHardware(), and om::RawEventUnpacker::RawEventUnpacker().

16  {
17  switch (det) {
18  case kNDOS: this->SetupNDOS(); break;
19  case kNEARDET: this->SetupNearDet(); break;
20  case kFARDET: this->SetupFarDet(); break;
21  case kTESTBEAM:this->SetupTestBeam();break;
22  default:
23  std::cerr << __FILE__ << " : " << __LINE__
24  << " Invalid detector type " << det
25  << std::endl;
26  abort();
27  }
28 }
OStream cerr
Definition: OStream.cxx:7
Prototype Near Detector on the surface at FNAL.
void HardwareDisplay::SetupFarDet ( )

Definition at line 86 of file HardwareDisplay.cpp.

References cmf::kFARDET.

87 {
88  fDetId = kFARDET;
89 
90  fNdiblocks = 14;
91  fNdcmTop = 6;
92  fNdcmSide = 6;
93  fNfebCols = 16;
94  fNfebRows = 4;
95  fNpixCols = 4;
96  fNpixRows = 8;
97 
100 
103 
104  fNplanesPerBL = 32;
105  fNplanes = 2*fNplanesPerBL*fNdiblocks; // 32 planes per block
106  fNxcells = 32*12; // 32 cells / module, 12 modules
107  fNycells = 32*12; // 32 cells / module, 12 modules
108  fNcellPerMod = 32;
109 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fXmax
Width of entire view.
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
unsigned int fDetId
DAQ detector ID.
unsigned int fNcellPerMod
Number of cells per module.
unsigned int fNdiblocks
Number of diblocks in detector.
unsigned int fNfebRows
Number of FEB rows in a DCM.
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
unsigned int fNycells
Height of detector in units of cells.
unsigned int fNplanes
Number of planes in the detector.
unsigned int fYmax
Height of entire view.
unsigned int fNxcells
Width of detector in units of cells.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNyPerDCM
Height of 1 DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNplanesPerBL
Number of planes per block.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::SetupNDOS ( )

Definition at line 32 of file HardwareDisplay.cpp.

References novadaq::cnv::kNDOS.

33 {
34  fDetId = kNDOS;
35 
36  fNdiblocks = 4;
37  fNdcmTop = 1;
38  fNdcmSide = 2;
39  fNfebCols = 16;
40  fNfebRows = 4;
41  fNpixCols = 4;
42  fNpixRows = 8;
43 
46 
49 
50  fNplanesPerBL = 31;
51  fNplanes = 2*fNplanesPerBL*fNdiblocks; // 31 planes per block
52  fNxcells = 32*2; // 32 cells / module, 2 modules
53  fNycells = 32*3; // 32 cells / module, 3 modules
54  fNcellPerMod = 32;
55 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fXmax
Width of entire view.
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
unsigned int fDetId
DAQ detector ID.
unsigned int fNcellPerMod
Number of cells per module.
unsigned int fNdiblocks
Number of diblocks in detector.
unsigned int fNfebRows
Number of FEB rows in a DCM.
Prototype Near Detector on the surface at FNAL.
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
unsigned int fNycells
Height of detector in units of cells.
unsigned int fNplanes
Number of planes in the detector.
unsigned int fYmax
Height of entire view.
unsigned int fNxcells
Width of detector in units of cells.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNyPerDCM
Height of 1 DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNplanesPerBL
Number of planes per block.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::SetupNearDet ( )

Definition at line 59 of file HardwareDisplay.cpp.

References cmf::kNEARDET.

60 {
61  fDetId = kNEARDET;
62 
63  fNdiblocks = 4;
64  fNdcmTop = 2;
65  fNdcmSide = 2;
66  fNfebCols = 16;
67  fNfebRows = 4;
68  fNpixCols = 4;
69  fNpixRows = 8;
70 
73 
76 
77  fNplanesPerBL = 32;
78  fNplanes = 2*fNplanesPerBL*fNdiblocks; // 32 planes per block
79  fNxcells = 32*3; // 32 cells / module, 3 modules
80  fNycells = 32*3; // 32 cells / module, 3 modules
81  fNcellPerMod = 32;
82 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fXmax
Width of entire view.
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
unsigned int fDetId
DAQ detector ID.
unsigned int fNcellPerMod
Number of cells per module.
unsigned int fNdiblocks
Number of diblocks in detector.
unsigned int fNfebRows
Number of FEB rows in a DCM.
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
unsigned int fNycells
Height of detector in units of cells.
unsigned int fNplanes
Number of planes in the detector.
unsigned int fYmax
Height of entire view.
unsigned int fNxcells
Width of detector in units of cells.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNyPerDCM
Height of 1 DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNplanesPerBL
Number of planes per block.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::SetupTestBeam ( )

Definition at line 113 of file HardwareDisplay.cpp.

References novadaq::cnv::kTESTBEAM.

114 {
115  fDetId = kTESTBEAM;
116 
117  fNdiblocks = 1;
118  fNdcmTop = 1; // really 3
119  fNdcmSide = 2; // really 3 - Need to make NdcmTop+NdcmSide = 3 for XYDCM function
120  fNfebCols = 16;
121  fNfebRows = 4;
122  fNpixCols = 4;
123  fNpixRows = 8;
124 
127 
130 
131  fNplanesPerBL = 32;
132  fNplanes = 2*fNplanesPerBL*fNdiblocks-1; // 2*32*1 - 1
133  fNxcells = 32*2; // 32 cells / module, 2 modules
134  fNycells = 32*2; // 32 cells / module, 2 modules
135  fNcellPerMod = 32;
136 
137 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fXmax
Width of entire view.
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
unsigned int fDetId
DAQ detector ID.
unsigned int fNcellPerMod
Number of cells per module.
unsigned int fNdiblocks
Number of diblocks in detector.
unsigned int fNfebRows
Number of FEB rows in a DCM.
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
unsigned int fNycells
Height of detector in units of cells.
unsigned int fNplanes
Number of planes in the detector.
unsigned int fYmax
Height of entire view.
unsigned int fNxcells
Width of detector in units of cells.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNyPerDCM
Height of 1 DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNplanesPerBL
Number of planes per block.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::XYDCM ( unsigned int dcm,
unsigned int  iy 
)

................................................................. Map a y display location to a diblock address

Parameters
dcm: on return, the DCM address (1...14)
iy: input y display location

Definition at line 224 of file HardwareDisplay.cpp.

Referenced by om::PlotClickHandler::HwDetDoubleClick(), and om::FEBRateAnalysis::StoreContent().

226 {
227  *dcm = (fNdcmTop + fNdcmSide) - iy/fNyPerDCM;
228 }
unsigned int fNdcmSide
Number of DMC&#39;s per diblock on side of detector.
unsigned int fNdcmTop
Number of DMC&#39;s per diblock on top of detector.
unsigned int fNyPerDCM
Height of 1 DCM.
void HardwareDisplay::XYDiblock ( unsigned int db,
unsigned int  ix 
)

................................................................. Map an x display location to a diblock address

Parameters
db: on return, the diblock address (1...14)
ix: input x display location

Definition at line 215 of file HardwareDisplay.cpp.

Referenced by om::PlotClickHandler::HwDetDoubleClick(), and om::FEBRateAnalysis::StoreContent().

217 {
218  //*db = 1 + ix/fNxPerDB; // diblocks numbered L to R
219  *db = fNdiblocks - ix/fNxPerDB; //diblocks numbered R to L
220 }
unsigned int fNxPerDB
Width of 1 diblock.
unsigned int fNdiblocks
Number of diblocks in detector.
void HardwareDisplay::XYFEB ( unsigned int feb,
unsigned int  ix,
unsigned int  iy 
)

................................................................. Map a x,y display location to a diblock address

Parameters
feb: on return, the FEB address (1...14)
ix: input x display location
iy: input y display location

Definition at line 232 of file HardwareDisplay.cpp.

References x1, and y1.

Referenced by chaninfo::BadChanValidate::BadChansFromOM(), and om::FEBRateAnalysis::StoreContent().

235 {
236  unsigned int x1 = (ix%fNxPerDB)/fNpixCols;
237  unsigned int y1 = (iy%fNyPerDCM)/fNpixRows;
238 
239  *feb = fNfebCols*(fNfebRows - 1 - y1) + x1;
240 }
unsigned int fNxPerDB
Width of 1 diblock.
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
unsigned int fNfebRows
Number of FEB rows in a DCM.
unsigned int fNfebCols
Number of FEB columns in a DCM.
unsigned int fNyPerDCM
Height of 1 DCM.
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::XYPix ( unsigned int pix,
unsigned int  ix,
unsigned int  iy 
)

................................................................. Map an x,y display location to a pixel address

Parameters
pix: on return, the pixel address (1...14)
ix: input x display location
iy: input y display location

Definition at line 244 of file HardwareDisplay.cpp.

References P, x1, and y1.

Referenced by chaninfo::BadChanValidate::BadChansFromOM(), and om::FEBRateAnalysis::StoreContent().

247 {
248  static unsigned int P[8][4] = {{30,22,9,1},
249  {31,23,8,0},
250  {28,20,11,3},
251  {29,21,10,2},
252  {26,18,13,5},
253  {27,19,12,4},
254  {24,17,14,7},
255  {25,16,15,6}};
256 
257  unsigned int x1 = ix%fNpixCols;
258  unsigned int y1 = iy%fNpixRows;
259 
260  *pix = P[y1][x1];
261 }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
#define P(a, b, c, d, e, x)
unsigned int fNpixCols
Number of pixel columns in an FEB.
unsigned int fNpixRows
Number of pixel rows in an FEB.
void HardwareDisplay::XYToDAQ ( unsigned int db,
unsigned int dcm,
unsigned int feb,
unsigned int pix,
unsigned int  ix,
unsigned int  iy 
)

................................................................. Map an x,y location on the display to a DAQ hardware address

Parameters
db- on return, the diblock address
dcm- on return, the DCM address
feb- on return, the FEB address
pix- on return, the pixel address
ix- input x display location
iy- input y display location

Definition at line 265 of file HardwareDisplay.cpp.

Referenced by om::PlotClickHandler::HwDCMHistogramInfo(), and om::PlotClickHandler::HwDetHistogramInfo().

271 {
272  this->XYDiblock(db, ix);
273  this->XYDCM (dcm, iy);
274  this->XYFEB (feb, ix, iy);
275  this->XYPix (pix, ix, iy);
276 }
void XYPix(unsigned int *pix, unsigned int ix, unsigned int iy)
void XYDCM(unsigned int *dcm, unsigned int iy)
void XYFEB(unsigned int *feb, unsigned int ix, unsigned int iy)
void XYDiblock(unsigned int *db, unsigned int ix)

Member Data Documentation

unsigned int daqchannelmap::HardwareDisplay::fDetId

DAQ detector ID.

Definition at line 197 of file HardwareDisplay.h.

Referenced by om::FEBRateAnalysis::AnaFile().

unsigned int daqchannelmap::HardwareDisplay::fNcellPerMod

Number of cells per module.

Definition at line 213 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNdcmSide
unsigned int daqchannelmap::HardwareDisplay::fNdcmTop
unsigned int daqchannelmap::HardwareDisplay::fNdiblocks
unsigned int daqchannelmap::HardwareDisplay::fNfebCols

Number of FEB columns in a DCM.

Definition at line 201 of file HardwareDisplay.h.

Referenced by evd::RawDataDrawer::RawDigitHardware().

unsigned int daqchannelmap::HardwareDisplay::fNfebRows

Number of FEB rows in a DCM.

Definition at line 202 of file HardwareDisplay.h.

Referenced by evd::RawDataDrawer::RawDigitHardware().

unsigned int daqchannelmap::HardwareDisplay::fNpixCols

Number of pixel columns in an FEB.

Definition at line 203 of file HardwareDisplay.h.

Referenced by evd::RawDataDrawer::RawDigitHardware().

unsigned int daqchannelmap::HardwareDisplay::fNpixRows

Number of pixel rows in an FEB.

Definition at line 204 of file HardwareDisplay.h.

Referenced by evd::RawDataDrawer::RawDigitHardware().

unsigned int daqchannelmap::HardwareDisplay::fNplanes

Number of planes in the detector.

Definition at line 207 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNplanesPerBL

Number of planes per block.

Definition at line 208 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNxcells

Width of detector in units of cells.

Definition at line 209 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNxPerDB

Width of 1 diblock.

Definition at line 205 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNycells

Height of detector in units of cells.

Definition at line 210 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fNyPerDCM

Height of 1 DCM.

Definition at line 206 of file HardwareDisplay.h.

unsigned int daqchannelmap::HardwareDisplay::fXmax

Width of entire view.

Definition at line 211 of file HardwareDisplay.h.

Referenced by evd::HardwarePad::Config(), and evd::RawDataDrawer::RawDigitHardware().

unsigned int daqchannelmap::HardwareDisplay::fYmax

Height of entire view.

Definition at line 212 of file HardwareDisplay.h.

Referenced by evd::HardwarePad::Config(), and evd::RawDataDrawer::RawDigitHardware().


The documentation for this class was generated from the following files: