CMS 3D CMS Logo

PipeAddrToTimeLookupTable.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EventFilter/SiStripRawToDigi
4 //
5 /*
6  Description: handles conversion of pipeline address to temporal location using a look-up table
7 */
8 //
9 // Original Author: A.-M. Magnan
10 // Created: 2009/11/23
11 //
12 
13 #ifndef EventFilter_SiStripRawToDigi_PipeAddrToTimeLookupTable_H
14 #define EventFilter_SiStripRawToDigi_PipeAddrToTimeLookupTable_H
15 
17 
18 namespace sistrip {
19 
20  //pipeline address for a given timeLocation (number between 0 and 191)
21  //return a number between 0 and 255
22  static const uint8_t PIPEADDR[APV_MAX_ADDRESS] = {
23  48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47,
24  45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110,
25  106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81,
26  83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76,
27  68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203,
28  201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242,
29  246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229,
30  231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168,
31  184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176};
32  //timeLoc for a given pipeline address (number between 0 and 255)
33  //return a number between 0 and 191 if valid.
34  //set 200 as invalid value.
35  static const uint8_t TIMELOC[256] = {
36  200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
37  200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 31, 30, 28, 29, 24, 25, 27, 26, 16, 17, 19, 18,
38  23, 22, 20, 21, 0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10, 95, 94,
39  92, 93, 88, 89, 91, 90, 80, 81, 83, 82, 87, 86, 84, 85, 64, 65, 67, 66, 71, 70, 68, 69,
40  79, 78, 76, 77, 72, 73, 75, 74, 32, 33, 35, 34, 39, 38, 36, 37, 47, 46, 44, 45, 40, 41,
41  43, 42, 63, 62, 60, 61, 56, 57, 59, 58, 48, 49, 51, 50, 55, 54, 52, 53, 200, 200, 200, 200,
42  200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
43  200, 200, 200, 200, 200, 200, 160, 161, 163, 162, 167, 166, 164, 165, 175, 174, 172, 173, 168, 169, 171, 170,
44  191, 190, 188, 189, 184, 185, 187, 186, 176, 177, 179, 178, 183, 182, 180, 181, 96, 97, 99, 98, 103, 102,
45  100, 101, 111, 110, 108, 109, 104, 105, 107, 106, 127, 126, 124, 125, 120, 121, 123, 122, 112, 113, 115, 114,
46  119, 118, 116, 117, 159, 158, 156, 157, 152, 153, 155, 154, 144, 145, 147, 146, 151, 150, 148, 149, 128, 129,
47  131, 130, 135, 134, 132, 133, 143, 142, 140, 141, 136, 137, 139, 138};
48 
50  public:
51  static const uint8_t pipelineAddress(const uint8_t aTimeLocation);
52  static const uint8_t timeLocation(const uint8_t aPipelineAddress);
53 
54  private:
55  };
56 
57  //FEDAddressConversion
58 
59  inline const uint8_t FEDAddressConversion::pipelineAddress(const uint8_t aTimeLocation) {
60  if (aTimeLocation < APV_MAX_ADDRESS)
61  return PIPEADDR[aTimeLocation];
62  else
63  return 0;
64  }
65 
66  inline const uint8_t FEDAddressConversion::timeLocation(const uint8_t aPipelineAddress) {
67  return TIMELOC[aPipelineAddress];
68  }
69 
70 } // namespace sistrip
71 #endif
sistrip::FEDAddressConversion
Definition: PipeAddrToTimeLookupTable.h:49
sistrip::PIPEADDR
static const uint8_t PIPEADDR[APV_MAX_ADDRESS]
Definition: PipeAddrToTimeLookupTable.h:22
sistrip::APV_MAX_ADDRESS
static const uint8_t APV_MAX_ADDRESS
Definition: SiStripFEDBufferComponents.h:22
sistrip::FEDAddressConversion::pipelineAddress
static const uint8_t pipelineAddress(const uint8_t aTimeLocation)
Definition: PipeAddrToTimeLookupTable.h:59
sistrip::FEDAddressConversion::timeLocation
static const uint8_t timeLocation(const uint8_t aPipelineAddress)
Definition: PipeAddrToTimeLookupTable.h:66
SiStripFEDBufferComponents.h
sistrip::TIMELOC
static const uint8_t TIMELOC[256]
Definition: PipeAddrToTimeLookupTable.h:35
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10