pflib v3.15.1-5-ge6391b0
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
 
ROC & roc (int which)
 Get a ROC interface for the given HGCROC.
 
ECON & econ (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.
 
void setSclDelay (int delay)
 Select the SCL delay path of the motherboard.
 
int getSclDelay ()
 Get the selected SCL delay path.
 

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

lpGBT & lpGBT_
 
int i2cbus_
 
int imodule_
 
std::shared_ptr< I2C > i2c_
 
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 Function Documentation

◆ setSclDelay()

void pflib::EcalModule::setSclDelay ( int delay)

Select the SCL delay path of the motherboard.

Parameters
[in]delay0 (shortest) to 3

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

TRIG eLinks 1 and 3 are ignored since they are all-zero when summing by 9 channels in the HGCROC.

Since each half of the HGCROC produces a pair of TRIG eLinks, but we only need one of the two, we re-index and have the TRIG eLinks indexed by HGCROC half like is done with the DAQ eLinks.

This reference table was manually copied from the hardware schematic.

Sector Side Elink ROC TRIG DIN
2 L 2 2 2 0
2 R 0 3 0 1
2 L 0 2 0 2
2 R 2 3 2 3
1 L 2 0 2 4
1 R 0 1 0 5
1 L 0 0 0 6
1 R 2 1 2 7
3 R 0 5 0 8
3 L 2 4 2 9
3 R 2 5 2 10
3 L 0 4 0 11

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