11 #ifndef EventFilter_CTPPSRawToDigi_DiamondVFATFrame
12 #define EventFilter_CTPPSRawToDigi_DiamondVFATFrame
21 namespace pps::diamond::vfat {
23 inline uint32_t
correctTime(
const uint32_t& time) {
return (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; }
27 uint32_t time = ((frame.
getData()[7] & 0x1f) << 16) + frame.
getData()[8];
32 uint32_t time = ((frame.
getData()[5] & 0x1f) << 16) + frame.
getData()[6];
uint32_t getLeadingEdgeTime(const VFATFrame &frame)
get timing information for single leading edge
VFATFrame::word * getData()
VFATFrame::word getMultihit(const VFATFrame &frame)
flag stating whether the HPTDC channel encountered multiple hits
uint32_t getTrailingEdgeTime(const VFATFrame &frame)
get timing information for single trailing edge
VFATFrame::word getHptdcErrorFlag(const VFATFrame &frame)
retrieve the list of error/status flags for the HPTDC when the frame was recorded ...
uint32_t getThresholdVoltage(const VFATFrame &frame)
retrieve the threshold voltage for this channel
uint32_t correctTime(const uint32_t &time)
Account for MSB/LSB "HW feature" reversal in HPTDC interpolation bits.