9 #ifndef EventFilter_CTPPSRawToDigi_TotemSampicFrame 10 #define EventFilter_CTPPSRawToDigi_TotemSampicFrame 68 T binary = gcode_data & (0x0001 << (8 *
sizeof(
T) - 1));
71 for (
unsigned short int i = 1;
i < 8 *
sizeof(
T); ++
i)
72 binary |= (gcode_data ^ (binary >> 1)) & (0x0001 << (8 *
sizeof(
T) -
i - 1));
82 TotemSampicFrame(
const uint8_t* chInfoPtr,
const uint8_t* chDataPtr,
const uint8_t* eventInfoPtr)
87 if (chInfoPtr !=
nullptr && chDataPtr !=
nullptr && eventInfoPtr !=
nullptr &&
115 << std::hex << bitsChannelMap.to_string() <<
"\nNumber of Samples:\t" <<
std::dec 154 tmp = extractDataFromBytesLSB<uint16_t>(
157 return grayToBinary<uint16_t>(
tmp);
163 tmp = extractDataFromBytesLSB<uint16_t>(
165 return grayToBinary<uint16_t>(
tmp);
195 *
it = grayToBinary<uint8_t>(*
it);
213 tmp = extractDataFromBytesLSB<uint64_t>(
221 tmp = extractDataFromBytesLSB<uint16_t>(
229 tmp = extractDataFromBytesLSB<uint32_t>(
237 tmp = extractDataFromBytesLSB<uint32_t>(
245 tmp = extractDataFromBytesLSB<uint16_t>(
253 tmp = extractDataFromBytesLSB<uint16_t>(
296 for (
unsigned int i = 0;
i <
size;
i++) {
301 edm::LogInfo(
"TotemSampicFrame") << std::setfill(
'0') << std::setw(4) << std::hex << *(
buffer++) <<
"\n";
unsigned int getNumberOfSamples() const
uint8_t getFWVersion() const
uint32_t getEventNumber() const
uint64_t getL1ATimestamp() const
uint8_t getEventHardwareId() const
const uint8_t * totemSampicInfoPtr_
uint16_t getBunchNumber() const
int getDetChannel() const
uint16_t getL1ALatency() const
const uint8_t * totemSampicEventInfoPtr_
const uint8_t * totemSampicDataPtr_
uint32_t getOrbitNumber() const
uint16_t getCellInfo() const
uint16_t getChannelMap() const
uint8_t getOffsetOfSamples() const
void printRawBuffer(const uint16_t *buffer, const bool binary=false, const unsigned int size=12) const
void printRaw(bool binary=false) const
const std::vector< uint8_t > getSamples() const
Log< level::Info, false > LogInfo
TotemSampicFrame(const uint8_t *chInfoPtr, const uint8_t *chDataPtr, const uint8_t *eventInfoPtr)
unsigned long long uint64_t
uint16_t getTimestampB() const
uint8_t getPLLInfo() const
uint8_t getNumberOfSentSamples() const
T grayToBinary(const T &gcode_data)
uint16_t getTimestampA() const
T extractDataFromBytesLSB(const uint8_t *array, int start, int size) const
uint64_t getFPGATimestamp() const
uint8_t getHardwareId() const