9 #ifndef EventFilter_CTPPSRawToDigi_TotemSampicFrame 10 #define EventFilter_CTPPSRawToDigi_TotemSampicFrame 59 T binary = gcode_data & ( 0x0001 << ( 8*
sizeof(
T) - 1 ) );
62 for (
unsigned short int i = 1;
i < 8*
sizeof(
T); ++
i)
63 binary |= ( gcode_data ^ ( binary >> 1 ) ) & (0x0001 << ( 8*
sizeof(
T) -
i - 1 ) );
74 TotemSampicFrame(
const uint8_t* chInfoPtr,
const uint8_t* chDataPtr,
const uint8_t* eventInfoPtr ) :
88 std::cout <<
"Channel Info: " << std::endl;
91 std::cout <<
"Channel Data: " << std::endl;
105 <<
"\nChannels fired:\t" << std::hex << bitsChannelMap.to_string()
109 <<
"\nChannel:\nHardwareId:\t" << std::hex << (
unsigned int)
getHardwareId()
116 <<
"\nPLL Info:\t" << bitsPLLInfo.to_string()
117 << std::endl << std::endl;
141 return grayToBinary<uint16_t> (
tmp );
149 return grayToBinary<uint16_t> (
tmp );
177 for (
auto it = samples.begin(); it != samples.end(); ++it )
178 *it = grayToBinary<uint8_t>( *it );
281 for (
unsigned int i = 0;
i <
size;
i++ ) {
283 std::bitset<16>
bits( *( buffer++ ) );
284 std::cout << bits.to_string() << std::endl;
287 std::cout << std::setfill(
'0' ) << std::setw( 4 ) << std::hex << *( buffer++ ) << std::endl;
const std::vector< uint8_t > getSamples() const
uint16_t getTimestampB() const
const uint8_t * totemSampicInfoPtr_
uint16_t getChannelMap() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
uint8_t getEventHardwareId() const
uint8_t getPLLInfo() const
unsigned int getNumberOfSamples() const
void printRaw(bool binary=false) const
const uint8_t * totemSampicEventInfoPtr_
const uint8_t * totemSampicDataPtr_
uint8_t getHardwareId() const
uint32_t getEventNumber() const
uint16_t getTimestampA() const
uint64_t getL1ATimestamp() const
uint8_t getOffsetOfSamples() const
uint8_t getFWVersion() const
int getDetChannel() const
TotemSampicFrame(const uint8_t *chInfoPtr, const uint8_t *chDataPtr, const uint8_t *eventInfoPtr)
unsigned long long uint64_t
uint16_t getBunchNumber() const
void printRawBuffer(const uint16_t *buffer, const bool binary=false, const unsigned int size=12) const
std::vector< std::vector< double > > tmp
uint8_t getNumberOfSentSamples() const
T grayToBinary(const T &gcode_data)
uint16_t getCellInfo() const
uint64_t getFPGATimestamp() const
uint16_t getL1ALatency() const
uint32_t getOrbitNumber() const