CMS 3D CMS Logo

Functions
pps::diamond::vfat Namespace Reference

Functions

uint32_t correctTime (const uint32_t &time)
 Account for MSB/LSB "HW feature" reversal in HPTDC interpolation bits. More...
 
VFATFrame::word getHptdcErrorFlag (const VFATFrame &frame)
 retrieve the list of error/status flags for the HPTDC when the frame was recorded More...
 
uint32_t getLeadingEdgeTime (const VFATFrame &frame)
 get timing information for single leading edge More...
 
VFATFrame::word getMultihit (const VFATFrame &frame)
 flag stating whether the HPTDC channel encountered multiple hits More...
 
uint32_t getThresholdVoltage (const VFATFrame &frame)
 retrieve the threshold voltage for this channel More...
 
uint32_t getTrailingEdgeTime (const VFATFrame &frame)
 get timing information for single trailing edge More...
 

Detailed Description

Utilitary namespace to retrieve timing/status information from diamond VFAT frame

Function Documentation

uint32_t pps::diamond::vfat::correctTime ( const uint32_t &  time)
inline

Account for MSB/LSB "HW feature" reversal in HPTDC interpolation bits.

Definition at line 23 of file DiamondVFATFrame.h.

Referenced by getLeadingEdgeTime(), and getTrailingEdgeTime().

23 { return (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; }
VFATFrame::word pps::diamond::vfat::getHptdcErrorFlag ( const VFATFrame frame)
inline

retrieve the list of error/status flags for the HPTDC when the frame was recorded

Definition at line 42 of file DiamondVFATFrame.h.

References VFATFrame::getData().

Referenced by RawToDigiConverter::run().

42 { return frame.getData()[1] & 0xFFFF; }
VFATFrame::word * getData()
Definition: VFATFrame.h:38
uint32_t pps::diamond::vfat::getLeadingEdgeTime ( const VFATFrame frame)
inline

get timing information for single leading edge

Definition at line 26 of file DiamondVFATFrame.h.

References correctTime(), VFATFrame::getData(), and ntuplemaker::time.

Referenced by RawToDigiConverter::run().

26  {
27  uint32_t time = ((frame.getData()[7] & 0x1f) << 16) + frame.getData()[8];
28  return correctTime(time);
29  }
VFATFrame::word * getData()
Definition: VFATFrame.h:38
uint32_t correctTime(const uint32_t &time)
Account for MSB/LSB "HW feature" reversal in HPTDC interpolation bits.
VFATFrame::word pps::diamond::vfat::getMultihit ( const VFATFrame frame)
inline

flag stating whether the HPTDC channel encountered multiple hits

Definition at line 40 of file DiamondVFATFrame.h.

References VFATFrame::getData().

Referenced by RawToDigiConverter::run().

40 { return frame.getData()[2] & 0x01; }
VFATFrame::word * getData()
Definition: VFATFrame.h:38
uint32_t pps::diamond::vfat::getThresholdVoltage ( const VFATFrame frame)
inline

retrieve the threshold voltage for this channel

Definition at line 36 of file DiamondVFATFrame.h.

References VFATFrame::getData().

Referenced by RawToDigiConverter::run().

36  {
37  return ((frame.getData()[3] & 0x7ff) << 16) + frame.getData()[4];
38  }
VFATFrame::word * getData()
Definition: VFATFrame.h:38
uint32_t pps::diamond::vfat::getTrailingEdgeTime ( const VFATFrame frame)
inline

get timing information for single trailing edge

Definition at line 31 of file DiamondVFATFrame.h.

References correctTime(), VFATFrame::getData(), and ntuplemaker::time.

Referenced by RawToDigiConverter::run().

31  {
32  uint32_t time = ((frame.getData()[5] & 0x1f) << 16) + frame.getData()[6];
33  return correctTime(time);
34  }
VFATFrame::word * getData()
Definition: VFATFrame.h:38
uint32_t correctTime(const uint32_t &time)
Account for MSB/LSB "HW feature" reversal in HPTDC interpolation bits.