11 const unsigned channelInverseGrayCode[] = {0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10};
28 memcpy(
this, &
frame, 2);
32 assert(layer >= 1 && layer <= 6);
33 assert(channel >= 1 && channel <= 16);
38 channelIndex = channel - 1;
39 unsigned scaBin = channelIndex * 6 + layerIndex;
46 for (
unsigned i = 0;
i < 16; ++
i) {
53 for (
int layer = 1; layer <= 6; ++layer) {
54 for (
int channel = 1; channel <= 16; ++channel) {
55 const unsigned short *shortWord = reinterpret_cast<const unsigned short *>(&controllerWord);
65 (((
CRC & 0x7ffc) >> 2) | ((0x0003 &
CRC) << 13)) ^ ((
CRC & 0x7ffc) >> 1);
70 for (
int ichannel = 1; ichannel <= 16; ++ichannel) {
71 for (
int ilayer = 1; ilayer <= 6; ++ilayer) {
74 int value = (
slice.timeSample(ilayer, ichannel))->adcCounts - 560;