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