1 #ifndef CSCALCTTrailer_h 2 #define CSCALCTTrailer_h 23 crc1 = (crc >> 11) & 0x7FF;
42 crc1 = (crc >> 11) & 0x7FF;
69 memcpy(theOriginalBuffer, &trailer2006, trailer2006.sizeInWords() * 2);
72 memcpy(theOriginalBuffer, &trailer2007, trailer2007.sizeInWords() * 2);
76 <<
"couldn't access data: ALCT firmware version is bad/not defined!";
79 return theOriginalBuffer;
92 trailer2006.setCRC(crc);
95 trailer2007.setCRC(crc);
98 edm::LogError(
"CSCALCTTrailer|CSCRawToDigi") <<
"couldn't setCRC: ALCT firmware version is bad/not defined!";
110 return ((trailer2006.crc1 & 0x7ff) << 11) | (trailer2006.crc0 & 0x7ff);
112 return ((trailer2007.crc1 & 0x7ff) << 11) | (trailer2007.crc0 & 0x7ff);
114 edm::LogError(
"CSCALCTTrailer|CSCRawToDigi") <<
"couldn't getCRC: ALCT firmware version is bad/not defined!";
126 return (trailer2006.e0dLine & 0xfff) == 0xe0d;
128 return (trailer2007.e0dLine & 0xffff) == 0xde0d;
130 edm::LogError(
"CSCALCTTrailer|CSCRawToDigi") <<
"couldn't check: ALCT firmware version is bad/not defined!";
142 return trailer2006.frameCount;
144 return trailer2007.frameCount;
146 edm::LogError(
"CSCALCTTrailer|CSCRawToDigi") <<
"couldn't wordCount: ALCT firmware version is bad/not defined!";
158 return trailer2006.reserved_3;
160 return trailer2007.reserved_3;
162 edm::LogError(
"CSCALCTTrailer|CSCRawToDigi") <<
"couldn't CRCcheck: ALCT firmware version is bad/not defined!";
183 unsigned short int theOriginalBuffer[4];
CSCALCTTrailer(const CSCALCTStatusDigi &digi)
const uint16_t * trailer() const
unsigned FrameCount() const
void setFromBuffer(unsigned short const *buf)
void setCRC(unsigned int crc)
void setFromBuffer(unsigned short const *buf)
short unsigned int sizeInWords() const
CSCALCTTrailer2006 alctTrailer2006()
static std::atomic< bool > debug
unsigned alctCRCCheck() const
static std::atomic< unsigned short int > firmwareVersion
CSCALCTTrailer2007 trailer2007
static int sizeInWords()
in 16-bit frames
CSCALCTTrailer2006 trailer2006
short unsigned int sizeInWords() const
void setCRC(unsigned int crc)
CSCALCTTrailer2007 alctTrailer2007()
static void setDebug(bool debugValue)
void setCRC(unsigned int crc)