|
|
Go to the documentation of this file.
9 #ifndef EventFilter_CTPPSRawToDigi_TotemSampicFrame
10 #define EventFilter_CTPPSRawToDigi_TotemSampicFrame
58 T binary = gcode_data & (0x0001 << (8 *
sizeof(
T) - 1));
61 for (
unsigned short int i = 1;
i < 8 *
sizeof(
T); ++
i)
62 binary |= (gcode_data ^ (binary >> 1)) & (0x0001 << (8 *
sizeof(
T) -
i - 1));
72 TotemSampicFrame(
const uint8_t* chInfoPtr,
const uint8_t* chDataPtr,
const uint8_t* eventInfoPtr)
77 if (chInfoPtr !=
nullptr && chDataPtr !=
nullptr && eventInfoPtr !=
nullptr &&
85 void printRaw(
bool binary =
false)
const {
105 << std::hex << bitsChannelMap.to_string() <<
"\nNumber of Samples:\t" <<
std::dec
139 return grayToBinary<uint16_t>(
tmp);
147 return grayToBinary<uint16_t>(
tmp);
171 const std::vector<uint8_t>
getSamples()
const {
176 *it = grayToBinary<uint8_t>(*it);
272 for (
unsigned int i = 0;
i <
size;
i++) {
274 std::bitset<16> bits(*(
buffer++));
275 edm::LogInfo(
"TotemSampicFrame") << bits.to_string() <<
"\n";
277 edm::LogInfo(
"TotemSampicFrame") << std::setfill(
'0') << std::setw(4) << std::hex << *(
buffer++) <<
"\n";
uint8_t getOffsetOfSamples() const
T grayToBinary(const T &gcode_data)
const uint8_t * totemSampicEventInfoPtr_
uint16_t getTimestampB() const
uint8_t getPLLInfo() const
uint16_t getTimestampA() const
uint64_t getFPGATimestamp() const
Log< level::Info, false > LogInfo
TotemSampicFrame(const uint8_t *chInfoPtr, const uint8_t *chDataPtr, const uint8_t *eventInfoPtr)
uint8_t getFWVersion() const
const std::vector< uint8_t > getSamples() const
uint8_t getEventHardwareId() const
uint64_t getL1ATimestamp() const
unsigned int getNumberOfSamples() const
uint8_t getNumberOfSentSamples() const
int getDetChannel() const
uint16_t getL1ALatency() const
uint32_t getOrbitNumber() const
uint8_t getHardwareId() const
void printRawBuffer(const uint16_t *buffer, const bool binary=false, const unsigned int size=12) const
uint16_t getCellInfo() const
uint32_t getEventNumber() const
uint16_t getChannelMap() const
uint16_t getBunchNumber() const
const uint8_t * totemSampicInfoPtr_
unsigned long long uint64_t
void printRaw(bool binary=false) const
const uint8_t * totemSampicDataPtr_