pflib v3.9.5-18-g30f792c
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::Target Class Referenceabstract

encapulating a given setup's access rules More...

Inheritance diagram for pflib::Target:
[legend]
Collaboration diagram for pflib::Target:
[legend]

Public Types

enum class  DaqFormat { SIMPLEROC = 1 , ECOND_SW_HEADERS = 2 }
 types of daq formats that we can do More...
 

Public Member Functions

virtual int nrocs ()=0
 number of boards
 
virtual int necons ()=0
 number of econds
 
virtual bool have_roc (int iroc) const =0
 do we have a roc with this id?
 
virtual bool have_econ (int iecon) const =0
 do we have an econ with this id?
 
virtual std::vector< int > roc_ids () const =0
 get a list of the IDs we have set up
 
virtual std::vector< int > econ_ids () const =0
 get a list of the econ IDs we have set up
 
virtual ROCroc (int which)=0
 Get a ROC interface for the given HGCROC board.
 
virtual ECONecon (int which)=0
 get a ECON interface for the given econ board
 
virtual void hardResetROCs ()=0
 Generate a hard reset to all the HGCROC boards.
 
virtual void hardResetECONs ()=0
 generate a hard reset to all the ECON boards
 
virtual uint32_t getFirmwareVersion ()
 Get the firmware version.
 
virtual void softResetROC (int which=-1)=0
 Generate a soft reset to a specific HGCROC board, -1 for all.
 
virtual void softResetECON (int which=-1)=0
 Generate a soft reset to a specific ECON board, -1 for all.
 
virtual Elinkselinks ()=0
 get the Elinks object
 
virtual FastControlfc ()=0
 get the FastControl object
 
virtual DAQdaq ()=0
 get the DAQ object
 
std::vector< std::stringi2c_bus_names ()
 names of different I2C busses we could talk to
 
I2Cget_i2c_bus (const std::string &name)
 get an I2C bus by name
 
std::vector< std::stringopto_link_names () const
 names of different Optical Links we could talk to
 
OptoLinkget_opto_link (const std::string &name) const
 get an OptoLink by name
 
virtual const std::vector< std::pair< int, int > > & getHardwareRocErxMapping ()=0
 Define the ROC-half -> eRx input into the ECON-D for the hardware.
 
const packing::SingleECONDRocErxMappinggetRocErxMapping ()
 get the mapping that can be used to convert between (i_erx, link_chan) and (i_roc, chan) indices
 
virtual void setup_run (int irun, DaqFormat format, int contrib_id=-1)=0
 
virtual std::vector< uint32_t > read_event ()=0
 
virtual bool has_event ()
 

Protected Attributes

std::map< std::string, std::shared_ptr< I2C > > i2c_
 
std::map< std::string, std::shared_ptr< OptoLink > > opto_
 
logging::logger the_log_ {logging::get("Target")}
 

Private Attributes

std::unique_ptr< packing::SingleECONDRocErxMappingmapping_
 

Detailed Description

encapulating a given setup's access rules

Since both the Hcal and Ecal have ECONs and HGCROCs (that is the whole reason we share pflib and firmware), this pflib::Target is the unifying point for them. It represents one "DMA access" point (i.e. an HcalBackplane or a "group" of Ecal modules).

Member Enumeration Documentation

◆ DaqFormat

enum class pflib::Target::DaqFormat
strong

types of daq formats that we can do

Enumerator
SIMPLEROC 

simple format for direct HGCROC connection

This format is only supported for fiberless connections directly between a ZCU and an Hcal HGCROC board. After initial testing of DAQ is complete in this setup, you are encouraged to use ECOND_HEADERS so that code you develop is more transparently shared to other (fiberfull) test stands.

ECOND_SW_HEADERS 

ECON-D format with headers inserted by software (on the ZCU) or firmware (on the Bittware) to mark the beginning of samples and the end of a multi-sample sequence.

Member Function Documentation

◆ daq()

virtual DAQ & pflib::Target::daq ( )
pure virtual

◆ econ()

virtual ECON & pflib::Target::econ ( int which)
pure virtual

get a ECON interface for the given econ board

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ econ_ids()

virtual std::vector< int > pflib::Target::econ_ids ( ) const
pure virtual

get a list of the econ IDs we have set up

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ elinks()

virtual Elinks & pflib::Target::elinks ( )
pure virtual

◆ fc()

virtual FastControl & pflib::Target::fc ( )
pure virtual

◆ getHardwareRocErxMapping()

virtual const std::vector< std::pair< int, int > > & pflib::Target::getHardwareRocErxMapping ( )
pure virtual

Define the ROC-half -> eRx input into the ECON-D for the hardware.

This does not include which ROCs are active (i.e. assume all the ROCs are active). This is used when constructing the SingleECONDRocErxMapping object that is used to to the index conversions for us.

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ hardResetECONs()

virtual void pflib::Target::hardResetECONs ( )
pure virtual

generate a hard reset to all the ECON boards

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplaneBW, pflib::HcalBackplaneZCU, and pflib::HcalFiberless.

◆ hardResetROCs()

virtual void pflib::Target::hardResetROCs ( )
pure virtual

Generate a hard reset to all the HGCROC boards.

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplaneBW, pflib::HcalBackplaneZCU, and pflib::HcalFiberless.

◆ have_econ()

virtual bool pflib::Target::have_econ ( int iecon) const
pure virtual

do we have an econ with this id?

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ have_roc()

virtual bool pflib::Target::have_roc ( int iroc) const
pure virtual

do we have a roc with this id?

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ necons()

virtual int pflib::Target::necons ( )
pure virtual

◆ nrocs()

virtual int pflib::Target::nrocs ( )
pure virtual

◆ roc()

virtual ROC & pflib::Target::roc ( int which)
pure virtual

Get a ROC interface for the given HGCROC board.

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ roc_ids()

virtual std::vector< int > pflib::Target::roc_ids ( ) const
pure virtual

get a list of the IDs we have set up

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplane, and pflib::HcalFiberless.

◆ softResetECON()

virtual void pflib::Target::softResetECON ( int which = -1)
pure virtual

Generate a soft reset to a specific ECON board, -1 for all.

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplaneBW, pflib::HcalBackplaneZCU, and pflib::HcalFiberless.

◆ softResetROC()

virtual void pflib::Target::softResetROC ( int which = -1)
pure virtual

Generate a soft reset to a specific HGCROC board, -1 for all.

Implemented in pflib::EcalSingleModuleMotherboard, pflib::HcalBackplaneBW, pflib::HcalBackplaneZCU, and pflib::HcalFiberless.


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