CMS 3D CMS Logo

Functions | Variables
totem::nt2::vfat Namespace Reference

Functions

uint8_t channelMarker (const VFATFrame &frame, size_t ch_id)
 retrieve this channel marker More...
 
uint16_t leadingEdgeTime (const VFATFrame &frame, size_t ch_id)
 get timing information for single leading edge More...
 
uint16_t newChannelId (const VFATFrame &frame, size_t ch_id)
 retrieve the HW identifier for this channel, in firmware >2.1 More...
 
uint8_t statusMarker (const VFATFrame &frame)
 retrieve the header status flags More...
 
uint16_t trailingEdgeTime (const VFATFrame &frame, size_t ch_id)
 get timing information for single trailing edge More...
 

Variables

static constexpr size_t header_offset = 3
 
static constexpr size_t num_channels_per_payload = 2
 multiplicity of channels combined into a single payload More...
 
static constexpr size_t num_words_per_channel = 4
 multiplicity of 32-bit words combined into a single channel payload More...
 

Detailed Description

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

Function Documentation

◆ channelMarker()

uint8_t totem::nt2::vfat::channelMarker ( const VFATFrame frame,
size_t  ch_id 
)
inline

retrieve this channel marker

Definition at line 35 of file TotemT2VFATFrame.h.

References header_offset, and num_words_per_channel.

Referenced by RawToDigiConverter::run().

35  {
36  return frame.getData()[header_offset + 1 + num_words_per_channel * ch_id] & 0x1f;
37  }
static constexpr size_t num_words_per_channel
multiplicity of 32-bit words combined into a single channel payload
static constexpr size_t header_offset

◆ leadingEdgeTime()

uint16_t totem::nt2::vfat::leadingEdgeTime ( const VFATFrame frame,
size_t  ch_id 
)
inline

get timing information for single leading edge

Definition at line 27 of file TotemT2VFATFrame.h.

References header_offset, and num_words_per_channel.

Referenced by RawToDigiConverter::run().

27  {
28  return frame.getData()[header_offset + 2 + num_words_per_channel * ch_id] & 0xffff;
29  }
static constexpr size_t num_words_per_channel
multiplicity of 32-bit words combined into a single channel payload
static constexpr size_t header_offset

◆ newChannelId()

uint16_t totem::nt2::vfat::newChannelId ( const VFATFrame frame,
size_t  ch_id 
)
inline

retrieve the HW identifier for this channel, in firmware >2.1

Definition at line 43 of file TotemT2VFATFrame.h.

References header_offset, and num_words_per_channel.

Referenced by RawToDigiConverter::run().

43  {
44  return frame.getData()[header_offset + 0 + num_words_per_channel * ch_id] & 0xffff;
45  }
static constexpr size_t num_words_per_channel
multiplicity of 32-bit words combined into a single channel payload
static constexpr size_t header_offset

◆ statusMarker()

uint8_t totem::nt2::vfat::statusMarker ( const VFATFrame frame)
inline

retrieve the header status flags

Definition at line 40 of file TotemT2VFATFrame.h.

References header_offset.

Referenced by RawToDigiConverter::run().

40 { return (frame.getData()[header_offset - 1] >> 8) & 0xf; }
static constexpr size_t header_offset

◆ trailingEdgeTime()

uint16_t totem::nt2::vfat::trailingEdgeTime ( const VFATFrame frame,
size_t  ch_id 
)
inline

get timing information for single trailing edge

Definition at line 31 of file TotemT2VFATFrame.h.

References header_offset, and num_words_per_channel.

Referenced by RawToDigiConverter::run().

31  {
32  return frame.getData()[header_offset + 3 + num_words_per_channel * ch_id] & 0xffff;
33  }
static constexpr size_t num_words_per_channel
multiplicity of 32-bit words combined into a single channel payload
static constexpr size_t header_offset

Variable Documentation

◆ header_offset

constexpr size_t totem::nt2::vfat::header_offset = 3
static

◆ num_channels_per_payload

constexpr size_t totem::nt2::vfat::num_channels_per_payload = 2
static

multiplicity of channels combined into a single payload

Definition at line 24 of file TotemT2VFATFrame.h.

Referenced by RawToDigiConverter::run().

◆ num_words_per_channel

constexpr size_t totem::nt2::vfat::num_words_per_channel = 4
static

multiplicity of 32-bit words combined into a single channel payload

Definition at line 22 of file TotemT2VFATFrame.h.

Referenced by channelMarker(), leadingEdgeTime(), newChannelId(), and trailingEdgeTime().