TestBeamDAQChannelMap.h
Go to the documentation of this file.
1 #ifndef TESTBEAMDAQCHANNELMAP_H
2 #define TESTBEAMDAQCHANNELMAP_H
3 
4 #include "DAQChannelMap/DAQChannelMap.h"
5 //#include "DAQChannelMap/TestBeamDAQChannelMapConstants.h"
6 
7 namespace daqchannelmap {
8 
10  // TestBeam specific functions and mapping.
11  public:
12  dchan encodeDChan(lchan logicalchan) const;
13  lchan encodeLChan(dchan daqchan) const;
14 
15  block_t computeBlock(lchan logicalchan) const;
16  plane_t computePlaneInBlock(lchan logicalchan) const;
17  unsigned int computeModule(lchan logicalchan) const;
18  fiber_t computeFiberInModule(dchan daqchan) const;
19 
20  DetView_TYPE getView(dchan daqchan) const;
21  unsigned int getTotalNumberOfDiblocks() const;
22  unsigned int getNumberOfDCM(DiBlock_TYPE dbt) const;
24 
25  public:
27  virtual ~TestBeamDAQChannelMap();
28 
29  private:
30 
31  // New functions to be used in new code.
32  dcm_id_t computeDCM(plane_t plane, fiber_t fiber) const;
33  feb_t computeFEB(plane_t plane, fiber_t fiber) const;
34  pixel_t computePixel(fiber_t fiber) const;
36  cell_t computeCell(dcm_id_t dcm, feb_t feb, pixel_t pixel) const;
37  pixel_t FiberToPixel(fiber_t fiber) const;
38  fiber_t PixelToFiber(pixel_t pixel) const;
39 
40  bool printBinary(uint32_t) const;
41  bool printHex(uint32_t) const;
42  };
43 }
44 #endif
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
DetView_TYPE getView(dchan daqchan) const
Which view (X or Y) does this daq channel readout?
plane_t computePlane(diblock_t diblock, dcm_id_t dcm, feb_t feb) const
lchan encodeLChan(dchan daqchan) const
Convert a DAQ channel ID to a logical channel id.
uint32_t pixel_t
Type for physical pixel on APD.
DiBlock_TYPE getDiBlockType(dchan chan) const
What format is the diblock? Only relevant in NDOS.
pixel_t computePixel(fiber_t fiber) const
fiber_t PixelToFiber(pixel_t pixel) const
plane_t computePlaneInBlock(lchan logicalchan) const
Which global plane in this lchan in?
dchan encodeDChan(lchan logicalchan) const
Convert a logical channel ID to a DAQ channel id.
unsigned int computeModule(lchan logicalchan) const
Which module in this lchan in?
uint32_t feb_t
Type for DCM link port. Counts from 0.
block_t computeBlock(lchan logicalchan) const
Which block is this lchan in?
dcm_id_t computeDCM(plane_t plane, fiber_t fiber) const
unsigned int getNumberOfDCM(DiBlock_TYPE dbt) const
How many DCMs does this diblock have?
pixel_t FiberToPixel(fiber_t fiber) const
uint32_t dcm_id_t
Type for DCM number, counts from 1.
fiber_t computeFiberInModule(dchan daqchan) const
Which fiber does this dchan readout?
uint32_t plane_t
Type for plane.
DetView_TYPE
Types of Detector View.
cell_t computeCell(dcm_id_t dcm, feb_t feb, pixel_t pixel) const
uint32_t diblock_t
Type for diblocks and blocks.
unsigned int getTotalNumberOfDiblocks() const
How many diblocks does the detector have?
bool printBinary(uint32_t) const
DiBlock_TYPE
Types of Diblock.
uint32_t dchan
< DAQ Channel Map Package
feb_t computeFEB(plane_t plane, fiber_t fiber) const