pflib v3.9.5-27-gb09aabf
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
EcalModule.h
1#pragma once
2
3#include <memory>
4#include <vector>
5
6#include "pflib/ECON.h"
7#include "pflib/I2C.h"
8#include "pflib/ROC.h"
9#include "pflib/Target.h"
10#include "pflib/lpGBT.h"
11
12namespace pflib {
13
30 public:
41 EcalModule(lpGBT& lpgbt, int i2cbus, int modulenumber, uint8_t roc_mask);
42
44 int nrocs() const;
46 int necons() const;
47
49 bool have_roc(int iroc) const;
50
51 static constexpr const int ECON_D = 0;
52 static constexpr const int ECON_T = 1;
53
55 bool have_econ(int iecon) const;
56
59
62
64 ROC& roc(int which);
65
67 ECON& econ(int which);
68
70 void hardResetROCs();
71
73 void hardResetECONs();
74
76 void softResetROC();
77
79 void softResetECON();
80
83
87
93
94 protected:
95 lpGBT& lpGBT_;
96 int i2cbus_;
97 int imodule_;
107};
108
109} // namespace pflib
Definition ECON.h:19
Class holding a set of ROCs and ECONs representing a HexaModule.
Definition EcalModule.h:29
int nrocs() const
number of hgcrocs
Definition EcalModule.cxx:29
int n_econs_
number of ECONs that are enabled
Definition EcalModule.h:104
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
Definition EcalModule.h:89
void hardResetROCs()
Generate a hard reset to all the HGCROC boards.
Definition EcalModule.cxx:93
bool have_roc(int iroc) const
do we have a roc with this id?
Definition EcalModule.cxx:33
EcalModule(lpGBT &lpgbt, int i2cbus, int modulenumber, uint8_t roc_mask)
Construct access to an EcalModule given the DAQ lpGBT it talks through.
Definition EcalModule.cxx:12
void softResetECON()
Generate a soft reset.
Definition EcalModule.cxx:108
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
Definition EcalModule.h:92
bool have_econ(int iecon) const
do we have an econ with this id?
Definition EcalModule.cxx:40
void softResetROC()
Generate a soft reset.
Definition EcalModule.cxx:103
int necons() const
number of econs
Definition EcalModule.cxx:31
std::array< std::unique_ptr< ROC >, 6 > rocs_
up to 6 ROCs some of which could be disabled
Definition EcalModule.h:102
static const std::vector< std::pair< int, int > > & getHardwareRocErxMappingDAQ()
Get the mapping of ROC channels to ERX channels in the DAQ path.
Definition EcalModule.cxx:124
int n_rocs_
number of ROCs that are enabled
Definition EcalModule.h:100
std::vector< int > roc_ids() const
get a list of the IDs we have set up
Definition EcalModule.cxx:47
static const std::vector< std::pair< int, std::vector< int > > > & getHardwareRocErxMappingTRG()
Get the mapping of the ROC to ERX channels in the TRG path.
Definition EcalModule.cxx:129
void hardResetECONs()
generate a hard reset to all the ECON boards
Definition EcalModule.cxx:98
ROC & roc(int which)
Get a ROC interface for the given HGCROC.
Definition EcalModule.cxx:67
std::array< std::unique_ptr< ECON >, 2 > econs_
two ECONs
Definition EcalModule.h:106
std::vector< int > econ_ids() const
get a list of the econ IDs we have set up
Definition EcalModule.cxx:57
ECON & econ(int which)
get a ECON interface for the given ECON
Definition EcalModule.cxx:79
Definition ROC.h:19
Class which provides an interface with an lpGBT ASIC as mounted on an LDMX mezzanine.
Definition lpGBT.h:53
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3