DAQChannelMapConstants.h
Go to the documentation of this file.
1 /*
2  * File: DAQChannelMapConstants.h
3  * Author: denis
4  *
5  * Created on February 3, 2012, 1:46 PM
6  */
7 
8 #ifndef _DAQCHANNELMAPCONSTANTS_H
9 #define _DAQCHANNELMAPCONSTANTS_H
10 #include <stdint.h>
11 
12 namespace daqchannelmap { //!< DAQ Channel Map Package
13 
14  //<<Below I define the types to be used specifically in our new version of DAQChannelMap. Contemplate moving into own header file called DAQChannelMapConstants.h...
15 
16  /// The following unsigned ints represent the fields of bits in which we encode DAQ format information (dchan) and logical (physical) information (lchan).
17  /// dchan information has the following constituents: detector, diblock_number, dcm_number, feb_number(or dcm_link as it is defined
18  /// lchan information has the following constituents: detector, plane, cell.
19  typedef uint32_t dchan;
20  typedef uint32_t lchan;
21 
22  typedef uint32_t cell_t; // physical cell in module (replacing offline_cell_t)
23  typedef uint32_t fiber_t; // fiber input to FEB (replacing online_cell_t)
24 
25  /// Type for plane.
26  typedef uint32_t plane_t; // global plane (replacing offline_plane_t)
27 
28  /// Type for diblocks and blocks.
29  typedef uint32_t diblock_t; // Diblock number.
30  typedef uint32_t block_t; // Block number
31 
32  /// Type for DCM number, counts from 1.
33  typedef uint32_t dcm_id_t; // DCM number
34 
35  /// Type for DCM link port. Counts from 0.
36  typedef uint32_t feb_t; // FEB number (replacing dcm_link_t)
37 
38  /// Type for physical pixel on APD.
39  typedef uint32_t pixel_t;
40 
42  BLOCK_OFFSET = 0 ///< do we count blocks from 0 or 1
43  ,DIBLOCK_OFFSET = 1 ///< do we count diblocks from 0 or 1
44  };
45 
46 
47  // Public Enumerations
49  MIN_PIXEL = 0,
50  MAX_PIXEL = 31,
51  MIN_PORT = 0,
52  MAX_PORT = 63,
53  MIN_DCM = 1,
54  MAX_DCM = 12,
61  MAX_MC_DCMPLANE = 6, // Max plane for the NDOS muon catcher
62  MAX_MC_ND_DCMPLANE = 11 // Max plane for the NearDet muon catcher
63  };
64 
65  /// Shifts and masks for unique online channel
67  MASK_DETECTOR = 0xF0000000, //!< Detector ID, (4bit), valid range 1-4
68  MASK_DIBLOCK = 0x0FC00000, //!< Diblock ID, (6bit), valid range 1-15
69  MASK_DCMID = 0x003F0000, //!< DCM ID, (6bit), valid range 1-12
70  MASK_DCMPORT = 0x0000FF00, //!< DCM Link Port (8bit), valid range 0-63
71  MASK_PIXELID = 0x000000FF, //!< APD Pixel Number (8bit), valid range 0-31
72 
78  };
79 
80  /// Shifts and masks for unique offline channel
82  MASK_OFFLINE_DETECTOR = 0xF0000000, //!< Detector ID, (4bit), valid range 1-4
83  MASK_OFFLINE_PLANE = 0x0FFFFC00, //!< Plane Number,(18bit), valid range 0-930 (far det)
84  MASK_OFFLINE_CELL = 0x000003FF, //!< Cell Number, (10bit), valid range 1-384 (far det)
85 
89  };
90 
91  /// Types of Block
94  A_BLOCK = 1, //!< Identifier for an "A" type detector block (starts with X measuring plane)
95  B_BLOCK , //!< Identifier for a "B" type detector block (starts with Y measuring plane)
96  AFULL_BLOCK, //!< Identifier for an "AFULL" type detector block (starts with X measuring plane). 32 planes block
97  M_BLOCK, //!< NDOS Muon catcher Block
98  MC_ND_BLOCK, //!< NearDet Muon catcher Block
100  };
101 
102  /// Types of Diblock
104  MIN_DIBLOCK_TYPE = 1, //!< Identifier for diblocks of configuration A-B
105  AB_DIBLOCK = 1, //!< Identifier for diblocks of configuration A-B
106  BA_DIBLOCK , //!< Identifier for diblocks of configuration B-A
107  AA_DIBLOCK , //!< Identifier for diblocks of configuration A-A
108  AFULLAFULL_DIBLOCK, //!< Identifier for diblocks using a 32/32 configuration
109  MC_DIBLOCK, //!< Identifider for NDOS Muon catcher
110  MC_ND_DIBLOCK, //!< Identifider for NearDet Muon catcher
111  AAFULL_DIBLOCK, //!< Identifier for diblocks of configuration A-AFULL (31/32) - TESTBEAM
113  };
114 
115  /// Types of Detector View
117  INIT = 0,
118  X_VIEW = 1, //!< Identifier for the X measuring view of the detector (top)
119  Y_VIEW //!< Identifier for the Y measuring view of the detector (side)
120  };
121 
122  /// Types of Detector Plane
124  XZ_PLANE = 1,//!< Identifier for the horizontal plane
125  YZ_PLANE //!< Identifier for the vertical plane
126  };
127 
128  /// Size of the detectors in blocks
130  DetSize_IPND = 4, //!< Size of the IP/ND detector in blocks (4)
131  DetSize_NDOS = 8, //!< Size of the NDOS detector in blocks (6)
132  DetSize_NEARDET = 8, //!< Size of the Near detector in blocks (6)
133  DetSize_FARDET = 30, //!< Size of the Far detector in blocks (30)
134  DetSize_FARDET_16K = 32, //!< Size of the Far detector in blocks (32)
135  DetSize_FARDET_17K = 32, //!< Size of the Far detector in blocks (32)
140  };
141 
143  NUM_DIBLOCK_IPND = 2 //!< Size of the IP/ND detector in diblocks
144  ,NUM_DIBLOCK_NDOS = 4 //!< Size of the NDOS detector in diblocks including muon catcher
145  ,NUM_DIBLOCK_NEARDET = 4 //!< Size of the Near detector in diblocks including muon catcher
146  ,NUM_DIBLOCK_FARDET = 15 //!< Size of the Far detector in diblocks
147  ,NUM_DIBLOCK_FARDET_16K = 16 //!< Size of the Far detector in diblocks
148  ,NUM_DIBLOCK_FARDET_17K = 17 //!< Size of the Far detector in diblocks
153  };
154 
158  NUM_CELLS = 32,
160 
166 
170 
173 
190 
200 
209 
218 
227 
236 
237  NULL_TERM = 0x0,
238  TERM_CHAR = 0xFDFCFBFA
239  };
240 
241 }// end of namespace daqchannelmap
242 
243 #endif /* _DAQCHANNELMAPCONSTANTS_H */
244 
DetBlockSizes
Size of the detectors in blocks.
NDOS Muon catcher Block.
Identifier for the vertical plane.
Identifier for a "B" type detector block (starts with Y measuring plane)
Identifier for diblocks of configuration A-AFULL (31/32) - TESTBEAM.
APD Pixel Number (8bit), valid range 0-31.
DetBlock_TYPE
Types of Block.
Identifider for NearDet Muon catcher.
Size of the Near detector in diblocks including muon catcher.
uint32_t pixel_t
Type for physical pixel on APD.
do we count diblocks from 0 or 1
Size of the Far detector in blocks (30)
Plane Number,(18bit), valid range 0-930 (far det)
Size of the Near detector in blocks (6)
Size of the Far detector in diblocks.
Identifier for the Y measuring view of the detector (side)
Identifier for the horizontal plane.
Size of the Far detector in blocks (32)
Detector ID, (4bit), valid range 1-4.
Diblock ID, (6bit), valid range 1-15.
Identifier for diblocks of configuration B-A.
Detector ID, (4bit), valid range 1-4.
DCM ID, (6bit), valid range 1-12.
Size of the NDOS detector in blocks (6)
Size of the Far detector in diblocks.
Identifier for the X measuring view of the detector (top)
Identifier for an "AFULL" type detector block (starts with X measuring plane). 32 planes block...
uint32_t feb_t
Type for DCM link port. Counts from 0.
do we count blocks from 0 or 1
Identifier for an "A" type detector block (starts with X measuring plane)
Size of the Far detector in diblocks.
Size of the IP/ND detector in diblocks.
Identifier for diblocks using a 32/32 configuration.
Cell Number, (10bit), valid range 1-384 (far det)
uint32_t dcm_id_t
Type for DCM number, counts from 1.
uint32_t plane_t
Type for plane.
Identifier for diblocks of configuration A-B.
NearDet Muon catcher Block.
Identifider for NDOS Muon catcher.
DetView_TYPE
Types of Detector View.
Identifier for diblocks of configuration A-A.
OfflineChanMASKS
Shifts and masks for unique offline channel.
DCM Link Port (8bit), valid range 0-63.
uint32_t diblock_t
Type for diblocks and blocks.
DetPlane_TYPE
Types of Detector Plane.
DAQChanMASKS
Shifts and masks for unique online channel.
Identifier for diblocks of configuration A-B.
DiBlock_TYPE
Types of Diblock.
uint32_t dchan
< DAQ Channel Map Package
Size of the IP/ND detector in blocks (4)
Size of the NDOS detector in diblocks including muon catcher.
Size of the Far detector in blocks (32)