pflib v3.14.1-5-gc57a164
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::HcalBackplane Class Referenceabstract

representing an HcalBackplane More...

#include <HcalBackplane.h>

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

Classes

struct  HGCROCBoard
 an HGCROC board contains one ROC, one Bias board and some other utilities that are accessible via the Bias C++ object More...
 

Public Member Functions

virtual ~HcalBackplane ()=default
 virtual destructor since we'll be holding this as a Target
 
void init (lpGBT &daq_lpgbt, lpGBT &trig_lpgbt, int hgcroc_boards, bool use_bias_cache)
 Common initialization for slow control given lpGBT objects and a mask for which HGCROC boards are connected.
 
virtual int nrocs () override
 number of boards
 
virtual int necons () override
 number of econds
 
virtual bool have_roc (int iroc) const override
 do we have a roc with this id?
 
virtual bool have_econ (int iecon) const override
 do we have an econ with this id?
 
virtual std::vector< int > roc_ids () const override
 get a list of the IDs we have set up
 
virtual std::vector< int > econ_ids () const override
 get a list of the econ IDs we have set up
 
virtual ROC & roc (int which) override
 Get a ROC interface for the given HGCROC board.
 
virtual ECON & econ (int which) override
 get a ECON interface for the given econ board
 
Bias & bias (int which) override
 Get an I2C interface for the given HGCROC board's bias bus

 
virtual GPIO & gpio ()
 Get the GPIO object for debugging purposes.
 
virtual Elinks & elinks ()=0
 get the Elinks object
 
virtual DAQ & daq ()=0
 get the DAQ object
 
virtual TRIG * trig (int itrig)
 get the trig object, if valid
 
const std::vector< std::pair< int, int > > & getHardwareRocErxMappingDAQ () override
 Get the ROC to eRx mapping for the DAQ path.
 
const std::vector< std::pair< int, std::vector< int > > > & getHardwareRocErxMappingTRG () override
 Get the ROC to eRx mapping for the TRG path.
 
- Public Member Functions inherited from pflib::HcalTarget
- Public Member Functions inherited from pflib::Target
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 FastControl & fc ()=0
 get the FastControl object
 
std::vector< std::string > i2c_bus_names ()
 names of different I2C busses we could talk to
 
I2C & get_i2c_bus (const std::string &name)
 get an I2C bus by name
 
std::vector< std::string > opto_link_names () const
 names of different Optical Links we could talk to
 
OptoLink & get_opto_link (const std::string &name) const
 get an OptoLink by name
 
const packing::SingleECONDRocErxMapping & getRocErxMapping ()
 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 ()
 
TempParametersAllROCs tempApplyAllROCs (const std::map< std::string, std::map< std::string, uint64_t > > &parameters)
 temporarily apply the same parameters to all the ROCs these parameters are unset when the returned object goes out of scope
 
TempParametersAllROCs tempApplyAllROCs (const std::map< int, std::map< std::string, std::map< std::string, uint64_t > > > &parameters)
 temporarily apply some parameters (varying depending on ROC) these parameters are unset when the returned object goes out of scope
 

Static Public Attributes

static const std::vector< std::pair< int, int > > ROC_ERX_MAPPING_DAQ
 the ROC to eRx mapping along the DAQ path for this hardware
 
static const std::vector< std::pair< int, std::vector< int > > > ROC_ERX_MAPPING_TRG
 the ROC to eRx mapping along the TRG path for this hardware
 

Protected Attributes

int nhgcroc_
 Number of HGCROC boards in this system.
 
int necon_
 Number of ECON boards in this system.
 
std::unique_ptr< GPIO > gpio_
 The GPIO interface.
 
std::array< std::unique_ptr< HGCROCBoard >, 4 > rocs_
 the backplane can hold up to 4 HGCROC boards
 
std::array< std::unique_ptr< ECON >, 3 > econs_
 the ECONs on the ECON Mezzanine on this backplane
 
std::unique_ptr< pflib::TRIG > trig_
 pointer to the TRIG object if available
 
- Protected Attributes inherited from pflib::Target
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")}
 

Additional Inherited Members

- Public Types inherited from pflib::Target
enum class  DaqFormat { SIMPLEROC = 1 , ECOND_SW_HEADERS = 2 }
 types of daq formats that we can do More...
 

Detailed Description

representing an HcalBackplane

Member Function Documentation

◆ bias()

Bias & pflib::HcalBackplane::bias ( int which)
overridevirtual

Get an I2C interface for the given HGCROC board's bias bus

Implements pflib::HcalTarget.

◆ daq()

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

get the DAQ object

Implements pflib::Target.

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

◆ econ()

ECON & pflib::HcalBackplane::econ ( int which)
overridevirtual

get a ECON interface for the given econ board

Implements pflib::Target.

◆ econ_ids()

std::vector< int > pflib::HcalBackplane::econ_ids ( ) const
overridevirtual

get a list of the econ IDs we have set up

Implements pflib::Target.

◆ elinks()

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

get the Elinks object

Implements pflib::Target.

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

◆ getHardwareRocErxMappingDAQ()

const std::vector< std::pair< int, int > > & pflib::HcalBackplane::getHardwareRocErxMappingDAQ ( )
overridevirtual

Get the ROC to eRx mapping for the DAQ path.

Implements pflib::Target.

◆ getHardwareRocErxMappingTRG()

const std::vector< std::pair< int, std::vector< int > > > & pflib::HcalBackplane::getHardwareRocErxMappingTRG ( )
overridevirtual

Get the ROC to eRx mapping for the TRG path.

Implements pflib::Target.

◆ have_econ()

bool pflib::HcalBackplane::have_econ ( int iecon) const
overridevirtual

do we have an econ with this id?

Implements pflib::Target.

◆ have_roc()

bool pflib::HcalBackplane::have_roc ( int iroc) const
overridevirtual

do we have a roc with this id?

Implements pflib::Target.

◆ init()

void pflib::HcalBackplane::init ( lpGBT & daq_lpgbt,
lpGBT & trig_lpgbt,
int hgcroc_boards,
bool use_bias_cache )

Common initialization for slow control given lpGBT objects and a mask for which HGCROC boards are connected.

Parameters
[in]daq_lpgbtaccessor to DAQ lpGBT
[in]trig_lpgbtaccessor to TRIG lpGBT
[in]hgcroc_boardsbit-mask saying if a board is active/enabled (1) or inactive/disabled (0) - the bit in position i represents board i
[in]use_bias_cacheuse software cache of bias voltage settings instead of readback direct from chip, see Bias class for why this is necessary in fiberfull setups

◆ necons()

virtual int pflib::HcalBackplane::necons ( )
inlineoverridevirtual

number of econds

Implements pflib::Target.

◆ nrocs()

virtual int pflib::HcalBackplane::nrocs ( )
inlineoverridevirtual

number of boards

Implements pflib::Target.

◆ roc()

ROC & pflib::HcalBackplane::roc ( int which)
overridevirtual

Get a ROC interface for the given HGCROC board.

Implements pflib::Target.

◆ roc_ids()

std::vector< int > pflib::HcalBackplane::roc_ids ( ) const
overridevirtual

get a list of the IDs we have set up

Implements pflib::Target.

◆ trig()

virtual TRIG * pflib::HcalBackplane::trig ( int itrig)
inlinevirtual

get the trig object, if valid

Reimplemented from pflib::Target.

Member Data Documentation

◆ ROC_ERX_MAPPING_DAQ

const std::vector< std::pair< int, int > > pflib::HcalBackplane::ROC_ERX_MAPPING_DAQ
static
Initial value:
= {
{3, 2}, {6, 7}, {4, 5}, {1, 0}}

the ROC to eRx mapping along the DAQ path for this hardware

◆ ROC_ERX_MAPPING_TRG

const std::vector< std::pair< int, std::vector< int > > > pflib::HcalBackplane::ROC_ERX_MAPPING_TRG
static
Initial value:
= {{1, {6, 7, 4, 5}},
{1, {3, 2, 1, 0}},
{2, {1, 0, 3, 2}},
{2, {4, 5, 6, 7}}}

the ROC to eRx mapping along the TRG path for this hardware


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