pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::DAQ Class Referenceabstract

Interface with DAQ via a WishboneInterface. More...

#include <DAQ.h>

Inheritance diagram for pflib::DAQ:
[legend]

Public Member Functions

virtual void reset ()=0
 
virtual int getEventOccupancy ()=0
 
virtual void setupLink (int ilink, int l1a_delay, int l1a_capture_width)=0
 Setup a link.
 
virtual void getLinkSetup (int ilink, int &l1a_delay, int &l1a_capture_width)=0
 read link parameters into the passed variables
 
virtual void bufferStatus (int ilink, bool &empty, bool &full)=0
 get empty/full status for the given link and stage
 
virtual void setup (int econid, int samples_per_ror, int soi=-1)
 setup overall event information for daq channels
 
int econid () const
 get the econid
 
int samples_per_ror () const
 get the samples
 
int soi () const
 get the soi
 
virtual void enable (bool enable=true)
 enable/disable the readout
 
virtual bool enabled ()
 is the readout enabled?
 
int nlinks () const
 number of elinks
 
virtual bool AXIS_enabled ()
 is AXIS enabled?
 
virtual void AXIS_enable (bool enable)
 enable/disable AXIS
 
virtual std::vector< uint32_t > getLinkData (int ilink)=0
 read out link data
 
virtual void advanceLinkReadPtr ()
 Advance link read pointer.
 
virtual std::map< std::string, uint32_t > get_debug (uint32_t ask)
 get any useful debugging data
 
std::vector< uint32_t > read_event_sw_headers ()
 readout an event including emulation of the headers the firmware inserts
 

Protected Member Functions

 DAQ (int links)
 

Private Attributes

int n_links
 number of links
 
bool enabled_
 enabled
 
int econid_
 
int samples_
 
int soi_
 

Detailed Description

Interface with DAQ via a WishboneInterface.

This is a very light class focused on just providing helpful functionality. Constructing/deconstructing these objects is very\ light so it can be done often.

Member Function Documentation

◆ advanceLinkReadPtr()

virtual void pflib::DAQ::advanceLinkReadPtr ( )
inlinevirtual

◆ AXIS_enable()

virtual void pflib::DAQ::AXIS_enable ( bool enable)
inlinevirtual

enable/disable AXIS

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture.

◆ AXIS_enabled()

virtual bool pflib::DAQ::AXIS_enabled ( )
inlinevirtual

is AXIS enabled?

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture.

◆ bufferStatus()

virtual void pflib::DAQ::bufferStatus ( int ilink,
bool & empty,
bool & full )
pure virtual

get empty/full status for the given link and stage

Implemented in pflib::bittware::HcalBackplaneBW_Capture, pflib::FiberlessCapture, and pflib::zcu::ZCU_Capture.

◆ enable()

virtual void pflib::DAQ::enable ( bool enable = true)
inlinevirtual

enable/disable the readout

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture, and pflib::zcu::ZCU_Capture.

◆ enabled()

virtual bool pflib::DAQ::enabled ( )
inlinevirtual

is the readout enabled?

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture, and pflib::zcu::ZCU_Capture.

◆ get_debug()

virtual std::map< std::string, uint32_t > pflib::DAQ::get_debug ( uint32_t ask)
inlinevirtual

get any useful debugging data

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture, and pflib::zcu::ZCU_Capture.

◆ getLinkData()

virtual std::vector< uint32_t > pflib::DAQ::getLinkData ( int ilink)
pure virtual

◆ getLinkSetup()

virtual void pflib::DAQ::getLinkSetup ( int ilink,
int & l1a_delay,
int & l1a_capture_width )
pure virtual

read link parameters into the passed variables

Implemented in pflib::bittware::HcalBackplaneBW_Capture, pflib::FiberlessCapture, and pflib::zcu::ZCU_Capture.

◆ read_event_sw_headers()

std::vector< uint32_t > pflib::DAQ::read_event_sw_headers ( )

readout an event including emulation of the headers the firmware inserts

The Bittware firmware includes headers when copying the data into the axi stream and we include those here so that the non-axis readout can have data that is in the same format as axis data.

this is just a helper function so that we can avoid repeating the emulation of the extra headers wrapping an ECOND packet between the HcalBackplane and EcalSMM targets.

Besides these emulated headers, it just uses getLinkData to get data and advanceLinkReadPtr after gathering one sample of data.

Note
only one elink right now

TODO: update to match FW, I just set ievt, soi, and subpacket size to zero

◆ setup()

virtual void pflib::DAQ::setup ( int econid,
int samples_per_ror,
int soi = -1 )
inlinevirtual

setup overall event information for daq channels

Reimplemented in pflib::bittware::HcalBackplaneBW_Capture, and pflib::zcu::ZCU_Capture.

◆ setupLink()

virtual void pflib::DAQ::setupLink ( int ilink,
int l1a_delay,
int l1a_capture_width )
pure virtual

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