pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::decoding::PolarfirePacket Class Reference

wrap the encoded binary data readout by a single polarfire More...

#include <PolarfirePacket.h>

Public Member Functions

 PolarfirePacket (const uint32_t *header_ptr, int len)
 Wrap the input array and its lenth as a PolarfirePacket. More...
 
int length () const
 Get the length of this packet as reported in the first header word. More...
 
int nlinks () const
 Get the number of links readout in this packet as reported in header. More...
 
int fpgaid () const
 Get the ID of this polarfire. More...
 
int formatversion () const
 Get the format version of this polarfire daq format. More...
 
int length_for_elink (int ilink) const
 Get the length for a input elink. More...
 
int bxid () const
 Get BX ID of this readout packet. More...
 
int rreq () const
 Get RREQ of this readout packet. More...
 
int orbit () const
 Get the orbit number from this readout packet. More...
 
LinkPacket link (int ilink) const
 Get the link packet wrapped with our decoding class. More...
 

Private Member Functions

int offset_to_elink (int ilink) const
 Calculate the offset from the start of the polarfire packet to the input link packet. More...
 

Private Attributes

const uint32_t * data_
 header pointer to data array
 
int length_
 length of data array
 

Detailed Description

wrap the encoded binary data readout by a single polarfire

This is representing Table 3 from the HGCROC Data Formats manual. Remember Table 3 references "ROC Subpackets" which are really LinkPacket.

Constructor & Destructor Documentation

◆ PolarfirePacket()

pflib::decoding::PolarfirePacket::PolarfirePacket ( const uint32_t *  header_ptr,
int  len 
)

Wrap the input array and its lenth as a PolarfirePacket.

Parameters
[in]header_ptrpointer to beginning of data array
[in]lenlength of data array

Member Function Documentation

◆ bxid()

int pflib::decoding::PolarfirePacket::bxid ( ) const

Get BX ID of this readout packet.

Returns
bxid, -1 if packet is empty

◆ formatversion()

int pflib::decoding::PolarfirePacket::formatversion ( ) const

Get the format version of this polarfire daq format.

Returns
version, -1 if packet is empty

◆ fpgaid()

int pflib::decoding::PolarfirePacket::fpgaid ( ) const

Get the ID of this polarfire.

Returns
id number, -1 if packet is empty

◆ length()

int pflib::decoding::PolarfirePacket::length ( ) const

Get the length of this packet as reported in the first header word.

Returns
length, -1 if packet is empty

◆ length_for_elink()

int pflib::decoding::PolarfirePacket::length_for_elink ( int  ilink) const

Get the length for a input elink.

Parameters
[in]ilinklink index within this polarfire
Returns
length of that link, 0 if link doe snot exist

◆ link()

LinkPacket pflib::decoding::PolarfirePacket::link ( int  ilink) const

Get the link packet wrapped with our decoding class.

Parameters
[in]ilinklink index within this polarfire
Returns
LinkPacket decoding that link, empty packet if link does not exist

◆ nlinks()

int pflib::decoding::PolarfirePacket::nlinks ( ) const

Get the number of links readout in this packet as reported in header.

Returns
number of links, -1 if packet is empty

◆ offset_to_elink()

int pflib::decoding::PolarfirePacket::offset_to_elink ( int  ilink) const
private

Calculate the offset from the start of the polarfire packet to the input link packet.

Parameters
[in]ilinklink index within this polarfire
Returns
offset, -1 if link does not exist

◆ orbit()

int pflib::decoding::PolarfirePacket::orbit ( ) const

Get the orbit number from this readout packet.

Returns
orbit, -1 if packet is empty

◆ rreq()

int pflib::decoding::PolarfirePacket::rreq ( ) const

Get RREQ of this readout packet.

Returns
read request, -1 if packet is empty

The documentation for this class was generated from the following files: