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) {
CSCCFEBSCAControllerWord()
const unsigned channelInverseGrayCode[]
void setControllerWord(const CSCCFEBSCAControllerWord &controllerWord)
friend std::ostream & operator<<(std::ostream &os, const CSCCFEBTimeSlice &)
CSCCFEBSCAControllerWord scaControllerWord(int layer) const
unpacked from the controller words for each channel in the layer
CSCCFEBDataWord * timeSample(int index) const
input from 0 to 95
unsigned short controllerData
combined from all 16 strips to make a word
const unsigned layerInverseGrayCode[]
unsigned short theSamples[96]