ATLAS Offline Software
Loading...
Searching...
No Matches
EfexTrexFibrePacker Class Reference

#include <EfexTrexFibrePacker.h>

Inheritance diagram for EfexTrexFibrePacker:
Collaboration diagram for EfexTrexFibrePacker:

Public Types

enum class  InputDataFrameType { Normal , Alignement }
 type of input data frame More...
using myDataWord = uint32_t

Public Member Functions

 EfexTrexFibrePacker ()
 Class implementing packing and unpacking data into TREX eFex format.
virtual ~EfexTrexFibrePacker ()
virtual std::vector< myDataWordgetPackedData (const std::vector< myDataWord > &inFrame, myDataWord bcNumber, InputDataFrameType frameType) const override
 Function packing the data into the LATOME format, either standard or alignement frame.
virtual std::vector< myDataWordgetPackedControl (const std::vector< myDataWord > &inFrame, myDataWord bcNumber, InputDataFrameType frameType) const override
 Function returning control words.
virtual bool checkCRC (const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const override
virtual myDataWord getBcNumber (const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const override
virtual myDataWord getBcMask (InputDataFrameType frameType) const override
virtual std::vector< myDataWordgetUnpackedData (const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const override
 Function unpacking the data from LATOME format, either standard or alignement frame.
virtual myDataWord crc9full (const std::vector< myDataWord > &inwords, size_t num_bits) const
 Functions calculating CRC over input data.
virtual myDataWord crc9d32 (const std::vector< myDataWord > &inwords, size_t num_words, bool bit_reverse) const
virtual myDataWord crc9d23 (myDataWord inword, myDataWord in_crc, bool bit_reverse) const

Public Attributes

myDataWord K_28_5 = 0xbc
myDataWord K_28_1 = 0x3c
myDataWord K_28_0 = 0x1c

Detailed Description

Definition at line 10 of file EfexTrexFibrePacker.h.

Member Typedef Documentation

◆ myDataWord

using FibrePackerBase::myDataWord = uint32_t
inherited

Definition at line 25 of file FibrePackerBase.h.

Member Enumeration Documentation

◆ InputDataFrameType

enum class FibrePackerBase::InputDataFrameType
stronginherited

type of input data frame

Enumerator
Normal 

Standard data frame.

Alignement 

Special mapping/alignement frame.

Definition at line 37 of file FibrePackerBase.h.

37 {
38 Normal,
39 Alignement
40 };

Constructor & Destructor Documentation

◆ EfexTrexFibrePacker()

EfexTrexFibrePacker::EfexTrexFibrePacker ( )
inline

Class implementing packing and unpacking data into TREX eFex format.

The class does heavy lifting of packing and unpacking TREX data packet. The format is similar to one used by LATOME and stored at https://gitlab.cern.ch/atlas-lar-be-firmware/LATOME/LATOME/raw/master/LATOME/doc/LAr-LATOME-FW/LAr-LATOME-FW.pdf but different in few important details! Most recent version is called TREX-FEX Real-Time Data Formats v3 14.10.2019

Definition at line 21 of file EfexTrexFibrePacker.h.

21{}

◆ ~EfexTrexFibrePacker()

virtual EfexTrexFibrePacker::~EfexTrexFibrePacker ( )
inlinevirtual

Definition at line 22 of file EfexTrexFibrePacker.h.

22{}

Member Function Documentation

◆ checkCRC()

bool EfexTrexFibrePacker::checkCRC ( const std::vector< myDataWord > & encodedData,
InputDataFrameType frameType ) const
overridevirtual

Implements FibrePackerBase.

Definition at line 96 of file EfexTrexFibrePacker.cxx.

97 {
98
99 auto inputData = encodedData;
100 myDataWord CRCCheck = 0;
101
102 switch(frameType){
103
104 case InputDataFrameType::Normal: // one K character in first data word
105 inputData.at(0) = inputData.at(0) & 0xffffff00;
106 CRCCheck = crc9d32(inputData,7l,true); // calculate CRC32 on first 6 words
107 break;
108
109 case InputDataFrameType::Alignement: // two K characters in first data word, mask the first one
110 inputData.at(0) = inputData.at(0) & 0xffffff00;
111 CRCCheck = crc9d32(inputData,7l,true); // calculate CRC32 on first 6 words
112 break;
113
114 }
115
116 return (CRCCheck == 0);
117}
virtual myDataWord crc9d32(const std::vector< myDataWord > &inwords, size_t num_words, bool bit_reverse) const
@ Alignement
Special mapping/alignement frame.

◆ crc9d23()

FibrePackerBase::myDataWord FibrePackerBase::crc9d23 ( FibrePackerBase::myDataWord inword,
myDataWord in_crc,
bool bit_reverse ) const
virtualinherited

CRC9D23 as specified in LAr VHDL

Function does CRC9D23 calculation. Thanslated from LATOME VHDL to python by Ed Flaherty, then to c++ by jb

Definition at line 111 of file FibrePackerBase.cxx.

111 {
112
119
120
121 long int mask = 0x00000001;
122 long int crc_word = 0x000;
123
124
125 //d_in_s is a '23-bit input word'
126
127 std::vector<long int> d_in_s(23,0);
128 std::vector<long int> crc_in_s(9,0);
129 std::vector<long int> crc_r(9,0);
130
131 // crc calculation
132
133 if (bit_reverse){
134
135 for(int i=0; i!= 23; i++){
136 d_in_s[22-i] = inword & (mask << i);
137 d_in_s[22-i] = d_in_s[22-i] >> i;
138 }
139
140 for(int i=0; i!= 9; i++){
141 crc_in_s[8-i] = in_crc & (mask << i);
142 crc_in_s[8-i] = crc_in_s[8-i] >> i;
143 }
144
145 } else {
146
147 for(int i=0; i!= 23; i++){
148 d_in_s[i] = inword & (mask << i);
149 d_in_s[i] = d_in_s[i] >> i;
150 }
151
152 for(int i=0; i!= 9; i++){
153 crc_in_s[i] = in_crc & (mask << i);
154 crc_in_s[i] = crc_in_s[i] >> i;
155 }
156 }
157
158 crc_r[0] = crc_in_s[1] ^ crc_in_s[4] ^ crc_in_s[5] ^ crc_in_s[6] ^ crc_in_s[7] ^ crc_in_s[8] ^ d_in_s[0] ^ d_in_s[2] ^ d_in_s[3] ^ d_in_s[5] ^ d_in_s[6] ^ d_in_s[7] ^ d_in_s[8] ^ d_in_s[9] ^ d_in_s[10] ^ d_in_s[11] ^ d_in_s[15] ^ d_in_s[18] ^ d_in_s[19] ^ d_in_s[20] ^ d_in_s[21] ^ d_in_s[22];
159 crc_r[1] = crc_in_s[1] ^ crc_in_s[2] ^ crc_in_s[4] ^ d_in_s[0] ^ d_in_s[1] ^ d_in_s[2] ^ d_in_s[4] ^ d_in_s[5] ^ d_in_s[12] ^ d_in_s[15] ^ d_in_s[16] ^ d_in_s[18];
160 crc_r[2] = crc_in_s[2] ^ crc_in_s[3] ^ crc_in_s[5] ^ d_in_s[1] ^ d_in_s[2] ^ d_in_s[3] ^ d_in_s[5] ^ d_in_s[6] ^ d_in_s[13] ^ d_in_s[16] ^ d_in_s[17] ^ d_in_s[19];
161 crc_r[3] = crc_in_s[0] ^ crc_in_s[1] ^ crc_in_s[3] ^ crc_in_s[5] ^ crc_in_s[7] ^ crc_in_s[8] ^ d_in_s[0] ^ d_in_s[4] ^ d_in_s[5] ^ d_in_s[8] ^ d_in_s[9] ^ d_in_s[10] ^ d_in_s[11] ^ d_in_s[14] ^ d_in_s[15] ^ d_in_s[17] ^ d_in_s[19] ^ d_in_s[21] ^ d_in_s[22];
162 crc_r[4] = crc_in_s[2] ^ crc_in_s[5] ^ crc_in_s[7] ^ d_in_s[0] ^ d_in_s[1] ^ d_in_s[2] ^ d_in_s[3] ^ d_in_s[7] ^ d_in_s[8] ^ d_in_s[12] ^ d_in_s[16] ^ d_in_s[19] ^ d_in_s[21];
163 crc_r[5] = crc_in_s[1] ^ crc_in_s[3] ^ crc_in_s[4] ^ crc_in_s[5] ^ crc_in_s[7] ^ d_in_s[0] ^ d_in_s[1] ^ d_in_s[4] ^ d_in_s[5] ^ d_in_s[6] ^ d_in_s[7] ^ d_in_s[10] ^ d_in_s[11] ^ d_in_s[13] ^ d_in_s[15] ^ d_in_s[17] ^ d_in_s[18] ^ d_in_s[19] ^ d_in_s[21];
164 crc_r[6] = crc_in_s[0] ^ crc_in_s[1] ^ crc_in_s[2] ^ crc_in_s[7] ^ d_in_s[0] ^ d_in_s[1] ^ d_in_s[3] ^ d_in_s[9] ^ d_in_s[10] ^ d_in_s[12] ^ d_in_s[14] ^ d_in_s[15] ^ d_in_s[16] ^ d_in_s[21];
165 crc_r[7] = crc_in_s[2] ^ crc_in_s[3] ^ crc_in_s[4] ^ crc_in_s[5] ^ crc_in_s[6] ^ crc_in_s[7] ^ d_in_s[0] ^ d_in_s[1] ^ d_in_s[3] ^ d_in_s[4] ^ d_in_s[5] ^ d_in_s[6] ^ d_in_s[7] ^ d_in_s[8] ^ d_in_s[9] ^ d_in_s[13] ^ d_in_s[16] ^ d_in_s[17] ^ d_in_s[18] ^ d_in_s[19] ^ d_in_s[20] ^ d_in_s[21];
166 crc_r[8] = crc_in_s[0] ^ crc_in_s[3] ^ crc_in_s[4] ^ crc_in_s[5] ^ crc_in_s[6] ^ crc_in_s[7] ^ crc_in_s[8] ^ d_in_s[1] ^ d_in_s[2] ^ d_in_s[4] ^ d_in_s[5] ^ d_in_s[6] ^ d_in_s[7] ^ d_in_s[8] ^ d_in_s[9] ^ d_in_s[10] ^ d_in_s[14] ^ d_in_s[17] ^ d_in_s[18] ^ d_in_s[19] ^ d_in_s[20] ^ d_in_s[21] ^ d_in_s[22];
167
168
169 if (bit_reverse){
170 for(int i=0; i!= 9; i++)
171 crc_word = crc_word | (crc_r[8-i] << i);
172 } else{
173 for(int i=0; i!= 9; i++)
174 crc_word = crc_word | (crc_r[i] << i);
175 }
176
177 return (crc_word);
178
179}

◆ crc9d32()

FibrePackerBase::myDataWord FibrePackerBase::crc9d32 ( const std::vector< myDataWord > & inwords,
size_t num_words,
bool bit_reverse = true ) const
virtualinherited

CRC9D32 as specified in LAr VHDL

Function does CRC9D32 calculation. Thanslated from LATOME VHDL to python by Ed Flaherty, then to c++ by jb

Definition at line 40 of file FibrePackerBase.cxx.

40 {
47
48 long int mask = 0x00000001;
49 long int crc_word = 0x000;
50
51
52 //d_in_s is a '23-bit input word'
53
54 std::vector<long int> d_in(32,0);
55 std::vector<long int> crc_s(9,1);
56 std::vector<long int> crc_r(9,1);
57
58 for(size_t k=0; k != num_words; k++){
59
60 // 32-bit word crc calculation
61
62 if (bit_reverse){
63 for(int i=0; i!= 32; i++){
64 d_in [31-i] = inwords.at(k) & (mask << i);
65 d_in[31-i] = d_in[31-i] >> i;
66 }
67 } else {
68 for(int i=0; i!= 32; i++){
69 d_in [i] = inwords.at(k) & (mask << i);
70 d_in[i] = d_in[i] >> i;
71 }
72 }
73
74 // in the first iteration CRC_S must be set to all 1's: note CRC_R is set to 1's above
75 // then CRC_S must equal the previous CRC_R
76
77 for(int j=0; j!= 9; j++)
78 crc_s[j] = crc_r[j];
79
80
81 crc_r[0]= crc_s[0] ^ crc_s[2] ^ crc_s[3] ^ crc_s[6] ^ crc_s[8] ^ d_in[0] ^ d_in[2] ^ d_in[3] ^ d_in[5] ^ d_in[6] ^ d_in[7] ^ d_in[8] ^ d_in[9] ^ d_in[10] ^ d_in[11] ^ d_in[15] ^ d_in[18] ^ d_in[19] ^ d_in[20] ^ d_in[21] ^ d_in[22] ^ d_in[23] ^ d_in[25] ^ d_in[26] ^ d_in[29] ^ d_in[31];
82 crc_r[1]= crc_s[1] ^ crc_s[2] ^ crc_s[4] ^ crc_s[6] ^ crc_s[7] ^ crc_s[8] ^ d_in[0] ^ d_in[1] ^ d_in[2] ^ d_in[4] ^ d_in[5] ^ d_in[12] ^ d_in[15] ^ d_in[16] ^ d_in[18] ^ d_in[24] ^ d_in[25] ^ d_in[27] ^ d_in[29] ^ d_in[30] ^ d_in[31];
83 crc_r[2]= crc_s[2] ^ crc_s[3] ^ crc_s[5] ^ crc_s[7] ^ crc_s[8] ^ d_in[1] ^ d_in[2] ^ d_in[3] ^ d_in[5] ^ d_in[6] ^ d_in[13] ^ d_in[16] ^ d_in[17] ^ d_in[19] ^ d_in[25] ^ d_in[26] ^ d_in[28] ^ d_in[30] ^ d_in[31];
84 crc_r[3]= crc_s[0] ^ crc_s[2] ^ crc_s[4] ^ d_in[0] ^ d_in[4] ^ d_in[5] ^ d_in[8] ^ d_in[9] ^ d_in[10] ^ d_in[11] ^ d_in[14] ^ d_in[15] ^ d_in[17] ^ d_in[19] ^ d_in[21] ^ d_in[22] ^ d_in[23] ^ d_in[25] ^ d_in[27];
85 crc_r[4]= crc_s[1] ^ crc_s[2] ^ crc_s[5] ^ crc_s[6] ^ crc_s[8] ^ d_in[0] ^ d_in[1] ^ d_in[2] ^ d_in[3] ^ d_in[7] ^ d_in[8] ^ d_in[12] ^ d_in[16] ^ d_in[19] ^ d_in[21] ^ d_in[24] ^ d_in[25] ^ d_in[28] ^ d_in[29] ^ d_in[31];
86 crc_r[5]= crc_s[0] ^ crc_s[7] ^ crc_s[8] ^ d_in[0] ^ d_in[1] ^ d_in[4] ^ d_in[5] ^ d_in[6] ^ d_in[7] ^ d_in[10] ^ d_in[11] ^ d_in[13] ^ d_in[15] ^ d_in[17] ^ d_in[18] ^ d_in[19] ^ d_in[21] ^ d_in[23] ^ d_in[30] ^ d_in[31];
87 crc_r[6]= crc_s[0] ^ crc_s[1] ^ crc_s[2] ^ crc_s[3] ^ crc_s[6] ^ d_in[0] ^ d_in[1] ^ d_in[3] ^ d_in[9] ^ d_in[10] ^ d_in[12] ^ d_in[14] ^ d_in[15] ^ d_in[16] ^ d_in[21] ^ d_in[23] ^ d_in[24] ^ d_in[25] ^ d_in[26] ^ d_in[29];
88 crc_r[7]= crc_s[0] ^ crc_s[1] ^ crc_s[4] ^ crc_s[6] ^ crc_s[7] ^ crc_s[8] ^ d_in[0] ^ d_in[1] ^ d_in[3] ^ d_in[4] ^ d_in[5] ^ d_in[6] ^ d_in[7] ^ d_in[8] ^ d_in[9] ^ d_in[13] ^ d_in[16] ^ d_in[17] ^ d_in[18] ^ d_in[19] ^ d_in[20] ^ d_in[21] ^ d_in[23] ^ d_in[24] ^ d_in[27] ^ d_in[29] ^ d_in[30] ^ d_in[31];
89 crc_r[8]= crc_s[1] ^ crc_s[2] ^ crc_s[5] ^ crc_s[7] ^ crc_s[8] ^ d_in[1] ^ d_in[2] ^ d_in[4] ^ d_in[5] ^ d_in[6] ^ d_in[7] ^ d_in[8] ^ d_in[9] ^ d_in[10] ^ d_in[14] ^ d_in[17] ^ d_in[18] ^ d_in[19] ^ d_in[20] ^ d_in[21] ^ d_in[22] ^ d_in[24] ^ d_in[25] ^ d_in[28] ^ d_in[30] ^ d_in[31];
90
91 crc_word = 0x000;
92
93 if (bit_reverse){
94
95 for(int i=0; i!= 9; i++)
96 crc_word = crc_word | (crc_r[8-i] << i);
97
98 } else {
99
100 for(int i=0; i!= 9; i++)
101 crc_word = crc_word | (crc_r[i] << i);
102
103 }
104
105 }
106
107 return (crc_word);
108
109}

◆ crc9full()

FibrePackerBase::myDataWord FibrePackerBase::crc9full ( const std::vector< myDataWord > & inwords,
size_t num_bits ) const
virtualinherited

Functions calculating CRC over input data.

CRC9 with polynomial 1011111011 over num_bits bits

Uses a more succinct CRC calculation and flexible in terms of digits, checked versus old code but only supports bit reversal = true

Definition at line 11 of file FibrePackerBase.cxx.

12{
20
21 size_t num_words = inwords.size();
22 if ( (num_bits+31)/32 > num_words )
23 {
24 std::cout << "ERROR: not enough words (" << num_words << ") for " << num_bits << "-bit CRC calculation." << std::endl;
25 return 0;
26 }
27 long int val = 0x1ff;
28 for ( size_t i = 0 ; i < num_bits ; ++i )
29 {
30 if ( (inwords.at(i/32)>>(i%32)) & 1 )
31 val ^= 1;
32 if ( val&1 )
33 val ^= 0x37d; // 1101111101 = polynomial reversed
34 val >>= 1;
35 }
36 return val;
37}

◆ getBcMask()

FibrePackerBase::myDataWord EfexTrexFibrePacker::getBcMask ( InputDataFrameType frameType) const
overridevirtual

Implements FibrePackerBase.

Definition at line 125 of file EfexTrexFibrePacker.cxx.

125 {
126 // BC number is the full 12 bits from any frame.
127 return 0xfff;
128}

◆ getBcNumber()

FibrePackerBase::myDataWord EfexTrexFibrePacker::getBcNumber ( const std::vector< myDataWord > & encodedData,
InputDataFrameType frameType ) const
overridevirtual

Implements FibrePackerBase.

Definition at line 119 of file EfexTrexFibrePacker.cxx.

120 {
121 myDataWord BcNumber = encodedData.at(6) & 0xfff;
122 return BcNumber;
123}

◆ getPackedControl()

std::vector< FibrePackerBase::myDataWord > EfexTrexFibrePacker::getPackedControl ( const std::vector< myDataWord > & inFrame,
myDataWord bcNumber,
InputDataFrameType frameType ) const
overridevirtual

Function returning control words.

The control words are used to distinguish between standard data and K characters. Each K character is 8 bit long and can be at one of four positions in 32 bit word. Control words encode location of K characters in 32 bit words, for example 0x1 means K character in the lowest byte, 0x3 means two K-characters in two lowest bytes

Implements FibrePackerBase.

Definition at line 75 of file EfexTrexFibrePacker.cxx.

77 {
78
79 std::vector<myDataWord> controlWords(FexDefs::num32BitWordsPerFibre(),0);
80
81 switch(frameType){
82
83 case InputDataFrameType::Normal: // one K character in first data word
84 controlWords.at(0) = 0x1;
85 break;
86
87 case InputDataFrameType::Alignement: // two K characters in first data word
88 controlWords.at(0) = 0x3;
89 break;
90
91 }
92
93 return controlWords;
94}
static int num32BitWordsPerFibre()
Definition FexDefs.h:17

◆ getPackedData()

std::vector< FibrePackerBase::myDataWord > EfexTrexFibrePacker::getPackedData ( const std::vector< myDataWord > & inFrame,
myDataWord bcNumber,
InputDataFrameType frameType ) const
overridevirtual

Function packing the data into the LATOME format, either standard or alignement frame.

The function expects input data in vector inFrame. For normal frame, this is a vector of supercell energies. For alignement frame the function doesn't need any additional data.

Implements FibrePackerBase.

Definition at line 12 of file EfexTrexFibrePacker.cxx.

14 {
15
16 std::vector<myDataWord> dataToLoad(FexDefs::num32BitWordsPerFibre(),0);
17 auto supercells = inFrame;
18
19 switch(frameType){
20
21 case InputDataFrameType::Normal: // Standard data pattern
22 {
23 for(auto& icell:supercells)
24 icell = icell & 0x3ff; // truncate to 10 bits
25
26 myDataWord bcId = bcNumber & 0x7f ; // 7 bits from BCID
27 myDataWord bcIdFull = bcNumber & 0xfff; // full 12 bit BCID
28 myDataWord bcId02 = bcId & 0x7;
29 myDataWord bcId34 = (bcId >> 3) & 0x3;
30 myDataWord bcId56 = (bcId >> 5) & 0x3;
31
32 dataToLoad.at(0) = (bcId56 << 8) | ((supercells.at(0)&0xff) <<10) |
33 ((supercells.at(1)&0xff) << 20) | (bcId34 << 30);
34 dataToLoad.at(1) = (supercells.at(2)&0xff) | ((supercells.at(3)&0xff) << 10) |
35 ((supercells.at(4)&0xff) << 20);
36 dataToLoad.at(2) = (supercells.at(5)&0xff) | ((supercells.at(6)&0xff) << 10) |
37 ((supercells.at(7)&0xff) << 20);
38 dataToLoad.at(3) = (supercells.at(8)&0xff) | ((supercells.at(9)&0xff) << 10) |
39 ((supercells.at(10)&0xff) << 20);
40 dataToLoad.at(4) = (supercells.at(11)&0xff) | ((supercells.at(12)&0xff) << 10) |
41 ((supercells.at(13)&0xff) << 20);
42 dataToLoad.at(5) = (supercells.at(14)&0xff) | ((supercells.at(15)&0xff) << 10) ;
43 dataToLoad.at(6) = bcIdFull | bcId02 << 20;
44
45 myDataWord tempCRC = crc9d32(dataToLoad,6l,true); // calculate CRC32 on first 6 words
46 myDataWord myCRCReminder = crc9d23(dataToLoad[6],tempCRC,true); // CRC23 on the last word
47
48 dataToLoad.at(0) = K_28_5 | dataToLoad.at(0) ; // add K-character
49 dataToLoad[6] = dataToLoad[6] | ( myCRCReminder << 23) ; // add CRC check
50
51 break;
52 }
53 case InputDataFrameType::Alignement: // Special pattern, LATOME alignement/mapping frame
54 {
55
56 myDataWord bcId = bcNumber & 0xfff ; // 12 bits of BCID
57
58 dataToLoad.at(6) = bcId;
59 dataToLoad.at(0) = (K_28_0 << 8) | dataToLoad.at(0) ; // add K_28_0 -character, used for CRC calculation
60
61 myDataWord tempCRC = crc9d32(dataToLoad,6l,true); // calculate CRC32 on first 6 words
62 myDataWord myCRCReminder = crc9d23(dataToLoad[6],tempCRC,true); // CRC23 on the last word
63
64 dataToLoad.at(0) = K_28_5 | dataToLoad.at(0) ; // add K-character
65 dataToLoad[6] = dataToLoad[6] | ( myCRCReminder << 23) ; // add CRC check to the famous last word
66
67 break;
68 }
69 }
70
71 return dataToLoad;
72
73}
uint16_t bcId(uint32_t data)
virtual myDataWord crc9d23(myDataWord inword, myDataWord in_crc, bool bit_reverse) const

◆ getUnpackedData()

std::vector< FibrePackerBase::myDataWord > EfexTrexFibrePacker::getUnpackedData ( const std::vector< myDataWord > & encodedData,
InputDataFrameType frameType ) const
overridevirtual

Function unpacking the data from LATOME format, either standard or alignement frame.

For normal frame, the function returns a vector of supercell energies. For alignement frame the function returns empty vector.

Implements FibrePackerBase.

Definition at line 130 of file EfexTrexFibrePacker.cxx.

131 {
132 std::vector<myDataWord> unpackedData;
133
134 switch(frameType){
135
137 {
138 std::vector<myDataWord> supercells(EfexDefs::maxSuperCellsPerFibre(),0);
139
140 supercells[0] = (encodedData[0] >> 10) & 0x3ff;
141 supercells[1] = (encodedData[0] >> 20) & 0x3ff;
142 supercells[2] = (encodedData[1] ) & 0x3ff;
143 supercells[3] = (encodedData[1] >> 10) & 0x3ff;
144 supercells[4] = (encodedData[1] >> 20) & 0x3ff;
145 supercells[5] = (encodedData[2] ) & 0x3ff;
146 supercells[6] = (encodedData[2] >> 10) & 0x3ff;
147 supercells[7] = (encodedData[2] >> 20) & 0x3ff;
148 supercells[8] = (encodedData[3] ) & 0x3ff;
149 supercells[9] = (encodedData[3] >> 10) & 0x3ff;
150 supercells[10] = (encodedData[3] >> 20) & 0x3ff;
151 supercells[11] = (encodedData[4] ) & 0x3ff;
152 supercells[12] = (encodedData[4] >> 10) & 0x3ff;
153 supercells[13] = (encodedData[4] >> 20) & 0x3ff;
154 supercells[14] = (encodedData.at(5) ) & 0x3ff;
155 supercells.at(15) = (encodedData[5] >> 10) & 0x3ff;
156
157 unpackedData=std::move(supercells);
158 break;
159 }
161 {
162 break; // no hyper data in the frame
163 }
164 }
165
166 return unpackedData;
167
168}
static int maxSuperCellsPerFibre()
Definition EfexDefs.h:27

Member Data Documentation

◆ K_28_0

myDataWord FibrePackerBase::K_28_0 = 0x1c
inherited

Definition at line 32 of file FibrePackerBase.h.

◆ K_28_1

myDataWord FibrePackerBase::K_28_1 = 0x3c
inherited

Definition at line 31 of file FibrePackerBase.h.

◆ K_28_5

myDataWord FibrePackerBase::K_28_5 = 0xbc
inherited

Definition at line 30 of file FibrePackerBase.h.


The documentation for this class was generated from the following files: