pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::packing::SoftWrappedECONDEventPacket Class Reference

Unpack an event packet that includes an extra header inserted by the software. More...

#include <SoftWrappedECONDEventPacket.h>

Collaboration diagram for pflib::packing::SoftWrappedECONDEventPacket:
[legend]

Public Member Functions

 SoftWrappedECONDEventPacket (std::size_t n_links)
 provide number of links (eRx) on the ECOND
 
void from (std::span< uint32_t > frame)
 unpack the given data into this structure
 
Readerread (Reader &r)
 read into this structure from the input Reader
 

Public Attributes

std::array< bool, 1 > corruption
 Corruption bits.
 
int il1a
 L1A index for this packet.
 
int econ_id
 ID specifying ECOND we are reading.
 
bool is_soi
 whether this packet is the sample-of-interest
 
ECONDEventPacket data
 actual data packet from ECOND
 

Private Attributes

mutable::pflib::logging::logger the_log_ {::pflib::logging::get("decoding")}
 handle to logging source
 

Detailed Description

Unpack an event packet that includes an extra header inserted by the software.

This software-inserted-header is written in the read_event for the HcalBackplaneZCU target.

See also
ECONDEventPacket for how a single sample from a single ECOND is unpacked. The class contains the more complicated logic and is much more stable since the hardware/firmware on the ECOND is not liable to change as quickly and the firmware/software we are writing for LDMX.

Member Function Documentation

◆ from()

void pflib::packing::SoftWrappedECONDEventPacket::from ( std::span< uint32_t > frame)

unpack the given data into this structure

The software emulation adds another header before the ECOND packet, which looks like

4b flag | 9b ECON ID | 4b il1a | S | 0 | 8b length

  • flag is hardcoded to 0b0001 right now in software
  • ECOND ID is what it was configured in the software to be
  • il1a is the index of the sample relative to this event
  • S signals if this is the sample of interest (1) or not (0)
  • length is the length of the econd subpacket NOT including this header

◆ read()

Reader & pflib::packing::SoftWrappedECONDEventPacket::read ( Reader & r)

read into this structure from the input Reader

DANGER Without signal trailer words, this assumes that the data stream is word aligned and we aren't starting on the wrong word.

Member Data Documentation

◆ corruption

std::array<bool, 1> pflib::packing::SoftWrappedECONDEventPacket::corruption

Corruption bits.

Index Description
0 sw header version mismatch

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