00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef EventFilter_SiStripRawToDigi_PipeAddrToTimeLookupTable_H
00014 #define EventFilter_SiStripRawToDigi_PipeAddrToTimeLookupTable_H
00015
00016 #include "EventFilter/SiStripRawToDigi/interface/SiStripFEDBufferComponents.h"
00017
00018
00019 namespace sistrip {
00020
00021
00022
00023 static const uint8_t PIPEADDR[APV_MAX_ADDRESS] = {
00024 48,49,51,50,54,55,53,52,
00025 60,61,63,62,58,59,57,56,
00026 40,41,43,42,46,47,45,44,
00027 36,37,39,38,34,35,33,32,
00028 96,97,99,98,102,103,101,100,
00029 108,109,111,110,106,107,105,104,
00030 120,121,123,122,126,127,125,124,
00031 116,117,119,118,114,115,113,112,
00032 80,81,83,82,86,87,85,84,
00033 92,93,95,94,90,91,89,88,
00034 72,73,75,74,78,79,77,76,
00035 68,69,71,70,66,67,65,64,
00036 192,193,195,194,198,199,197,196,
00037 204,205,207,206,202,203,201,200,
00038 216,217,219,218,222,223,221,220,
00039 212,213,215,214,210,211,209,208,
00040 240,241,243,242,246,247,245,244,
00041 252,253,255,254,250,251,249,248,
00042 232,233,235,234,238,239,237,236,
00043 228,229,231,230,226,227,225,224,
00044 160,161,163,162,166,167,165,164,
00045 172,173,175,174,170,171,169,168,
00046 184,185,187,186,190,191,189,188,
00047 180,181,183,182,178,179,177,176
00048 };
00049
00050
00051
00052 static const uint8_t TIMELOC[256] = {
00053 200,200,200,200,200,200,200,200,
00054 200,200,200,200,200,200,200,200,
00055 200,200,200,200,200,200,200,200,
00056 200,200,200,200,200,200,200,200,
00057 31,30,28,29,24,25,27,26,
00058 16,17,19,18,23,22,20,21,
00059 0,1,3,2,7,6,4,5,
00060 15,14,12,13,8,9,11,10,
00061 95,94,92,93,88,89,91,90,
00062 80,81,83,82,87,86,84,85,
00063 64,65,67,66,71,70,68,69,
00064 79,78,76,77,72,73,75,74,
00065 32,33,35,34,39,38,36,37,
00066 47,46,44,45,40,41,43,42,
00067 63,62,60,61,56,57,59,58,
00068 48,49,51,50,55,54,52,53,
00069 200,200,200,200,200,200,200,200,
00070 200,200,200,200,200,200,200,200,
00071 200,200,200,200,200,200,200,200,
00072 200,200,200,200,200,200,200,200,
00073 160,161,163,162,167,166,164,165,
00074 175,174,172,173,168,169,171,170,
00075 191,190,188,189,184,185,187,186,
00076 176,177,179,178,183,182,180,181,
00077 96,97,99,98,103,102,100,101,
00078 111,110,108,109,104,105,107,106,
00079 127,126,124,125,120,121,123,122,
00080 112,113,115,114,119,118,116,117,
00081 159,158,156,157,152,153,155,154,
00082 144,145,147,146,151,150,148,149,
00083 128,129,131,130,135,134,132,133,
00084 143,142,140,141,136,137,139,138
00085 };
00086
00087 class FEDAddressConversion
00088 {
00089 public:
00090
00091 static const uint8_t pipelineAddress(const uint8_t aTimeLocation);
00092 static const uint8_t timeLocation(const uint8_t aPipelineAddress);
00093
00094 private:
00095
00096
00097 };
00098
00099
00100
00101 inline const uint8_t FEDAddressConversion::pipelineAddress(const uint8_t aTimeLocation){
00102 if (aTimeLocation<APV_MAX_ADDRESS) return PIPEADDR[aTimeLocation];
00103 else return 0;
00104 }
00105
00106 inline const uint8_t FEDAddressConversion::timeLocation(const uint8_t aPipelineAddress){
00107 return TIMELOC[aPipelineAddress];
00108 }
00109
00110
00111
00112 }
00113 #endif