pflib v3.9.5-27-gb09aabf
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::EcalModule Class Reference

Class holding a set of ROCs and ECONs representing a HexaModule. More...

#include <EcalModule.h>

Collaboration diagram for pflib::EcalModule:
[legend]

Public Member Functions

 EcalModule (lpGBT &lpgbt, int i2cbus, int modulenumber, uint8_t roc_mask)
 Construct access to an EcalModule given the DAQ lpGBT it talks through.
 
int nrocs () const
 number of hgcrocs
 
int necons () const
 number of econs
 
bool have_roc (int iroc) const
 do we have a roc with this id?
 
bool have_econ (int iecon) const
 do we have an econ with this id?
 
std::vector< int > roc_ids () const
 get a list of the IDs we have set up
 
std::vector< int > econ_ids () const
 get a list of the econ IDs we have set up
 
ROCroc (int which)
 Get a ROC interface for the given HGCROC.
 
ECONecon (int which)
 get a ECON interface for the given ECON
 
void hardResetROCs ()
 Generate a hard reset to all the HGCROC boards.
 
void hardResetECONs ()
 generate a hard reset to all the ECON boards
 
void softResetROC ()
 Generate a soft reset.
 
void softResetECON ()
 Generate a soft reset.
 

Static Public Member Functions

static const std::vector< std::pair< int, int > > & getHardwareRocErxMappingDAQ ()
 Get the mapping of ROC channels to ERX channels in the DAQ path.
 
static const std::vector< std::pair< int, std::vector< int > > > & getHardwareRocErxMappingTRG ()
 Get the mapping of the ROC to ERX channels in the TRG path.
 

Static Public Attributes

static constexpr const int ECON_D = 0
 
static constexpr const int ECON_T = 1
 
static const std::vector< std::pair< int, int > > ROC_ERX_MAPPING_DAQ
 mapping of ROC halves to ECON-D eRx channels in the DAQ path
 
static const std::vector< std::pair< int, std::vector< int > > > ROC_ERX_MAPPING_TRG
 mapping of ROC halves to ECON-T eRx channels in the TRG path
 

Protected Attributes

lpGBTlpGBT_
 
int i2cbus_
 
int imodule_
 
std::shared_ptr< I2Ci2c_
 
int n_rocs_
 number of ROCs that are enabled
 
std::array< std::unique_ptr< ROC >, 6 > rocs_
 up to 6 ROCs some of which could be disabled
 
int n_econs_
 number of ECONs that are enabled
 
std::array< std::unique_ptr< ECON >, 2 > econs_
 two ECONs
 

Detailed Description

Class holding a set of ROCs and ECONs representing a HexaModule.

The ROC are indexed in the following way where * is placeholder for TRIG or DAQ in the schematic.

  • S1_*L -> ROC 0
  • S1_*R -> ROC 1
  • S2_*L -> ROC 2
  • S2_*R -> ROC 3
  • S3_*L -> ROC 4
  • S3_*R -> ROC 5

which (I believe) aligns with the order of the I2C addresses for these ROCs as well.

Constructor & Destructor Documentation

◆ EcalModule()

pflib::EcalModule::EcalModule ( lpGBT & lpgbt,
int i2cbus,
int modulenumber,
uint8_t roc_mask )

Construct access to an EcalModule given the DAQ lpGBT it talks through.

Parameters
[in]lpgbtaccessor to the lpgbt
[in]i2cbusbus on which the EcalModule is
[in]modulenumbermodule ID number
[in]roc_maskbit-mask saying if a board is activate/enabled (1) or inactive/disabled (0) - position i represents ROC i

Member Data Documentation

◆ ROC_ERX_MAPPING_DAQ

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

mapping of ROC halves to ECON-D eRx channels in the DAQ path

◆ ROC_ERX_MAPPING_TRG

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

mapping of ROC halves to ECON-T eRx channels in the TRG path


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