pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
PolarfirePacket.h
1#ifndef pflib_decoding_PolarfirePacket_h
2#define pflib_decoding_PolarfirePacket_h 1
3
4#include "pflib/decoding/LinkPacket.h"
5
6namespace pflib {
7namespace decoding {
8
17 public:
23 PolarfirePacket(const uint32_t* header_ptr, int len);
24
29 int length() const;
30
35 int nlinks() const;
36
41 int fpgaid() const;
42
47 int formatversion() const;
48
54 int length_for_elink(int ilink) const;
55
60 int bxid() const;
61
66 int rreq() const;
67
72 int orbit() const;
73
79 LinkPacket link(int ilink) const;
80 private:
87 int offset_to_elink(int ilink) const;
89 const uint32_t* data_;
92};
93
94}
95}
96
97#endif// pflib_decoding_PolarfirePacket_h
98
smallest formatted packet being readout by the HGCROC-Polarfire pipeline
Definition: LinkPacket.h:19
wrap the encoded binary data readout by a single polarfire
Definition: PolarfirePacket.h:16
int offset_to_elink(int ilink) const
Calculate the offset from the start of the polarfire packet to the input link packet.
Definition: PolarfirePacket.cxx:55
int fpgaid() const
Get the ID of this polarfire.
Definition: PolarfirePacket.cxx:19
int length() const
Get the length of this packet as reported in the first header word.
Definition: PolarfirePacket.cxx:9
LinkPacket link(int ilink) const
Get the link packet wrapped with our decoding class.
Definition: PolarfirePacket.cxx:49
const uint32_t * data_
header pointer to data array
Definition: PolarfirePacket.h:89
int bxid() const
Get BX ID of this readout packet.
Definition: PolarfirePacket.cxx:34
PolarfirePacket(const uint32_t *header_ptr, int len)
Wrap the input array and its lenth as a PolarfirePacket.
Definition: PolarfirePacket.cxx:6
int rreq() const
Get RREQ of this readout packet.
Definition: PolarfirePacket.cxx:39
int orbit() const
Get the orbit number from this readout packet.
Definition: PolarfirePacket.cxx:44
int formatversion() const
Get the format version of this polarfire daq format.
Definition: PolarfirePacket.cxx:24
int length_for_elink(int ilink) const
Get the length for a input elink.
Definition: PolarfirePacket.cxx:29
int nlinks() const
Get the number of links readout in this packet as reported in header.
Definition: PolarfirePacket.cxx:14
int length_
length of data array
Definition: PolarfirePacket.h:91
Polarfire Interaction Library.
Definition: Backend.h:8