12 const unsigned channelInverseGrayCode[] = {0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10};
29 memcpy(
this, &
frame, 2);
35 assert(channel >= 1 && channel <= 16);
48 for (
unsigned i = 0;
i < 16; ++
i) {
56 for (
int channel = 1; channel <= 16; ++channel) {
57 const unsigned short *shortWord =
reinterpret_cast<const unsigned short *
>(&controllerWord);
67 (((
CRC & 0x7ffc) >> 2) | ((0x0003 &
CRC) << 13)) ^ ((
CRC & 0x7ffc) >> 1);
72 for (
int ichannel = 1; ichannel <= 16; ++ichannel) {
76 int value = (
slice.timeSample(ilayer, ichannel))->adcCounts - 560;
CSCCFEBSCAControllerWord()
CSCCFEBDataWord * timeSample(int index) const
input from 0 to 95
__host__ __device__ std::uint32_t channelIndex(fedId_t fed, fedCh_t channel)
const unsigned channelInverseGrayCode[]
void setControllerWord(const CSCCFEBSCAControllerWord &controllerWord)
CSCCFEBSCAControllerWord scaControllerWord(int layer) const
unpacked from the controller words for each channel in the layer
std::ostream & operator<<(std::ostream &os, const CSCCFEBTimeSlice &slice)
unsigned short controllerData
combined from all 16 strips to make a word
const unsigned layerInverseGrayCode[]
unsigned short theSamples[96]