pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
HcalBackplane.h
1#ifndef pflib_hcal_inc_
2#define pflib_hcal_inc_
3
4#include <memory>
5
6#include "pflib/Bias.h"
7#include "pflib/GPIO.h"
8#include "pflib/Target.h"
9
10namespace pflib {
11
15class HcalBackplane : public Target {
16 public:
18 virtual ~HcalBackplane() = default;
19
21
31 void init(lpGBT& daq_lpgbt, lpGBT& trig_lpgbt, int hgcroc_boards);
32
34 virtual int nrocs() override { return nhgcroc_; }
35
37 virtual int necons() override { return necon_; }
38
40 virtual bool have_roc(int iroc) const override;
41
43 virtual bool have_econ(int iecon) const override;
44
46 virtual std::vector<int> roc_ids() const override;
47
49 virtual std::vector<int> econ_ids() const override;
50
52 virtual ROC& roc(int which) override;
53
55 virtual ECON& econ(int which) override;
56
58 Bias bias(int which);
59
61 virtual GPIO& gpio() { return *gpio_; }
62
64 virtual Elinks& elinks() = 0;
65
67 virtual DAQ& daq() = 0;
68
71
72 protected:
75
77 int necon_;
78
81
87 struct HGCROCBoard {
88 ROC roc;
89 Bias bias;
90 };
91
94
97};
98
99} // namespace pflib
100
101#endif // pflib_hcal_inc_
The HGC ROC has 4 MAX5825 chips doing the DAC for the bias voltages.
Definition Bias.h:138
Interface with DAQ via a WishboneInterface.
Definition DAQ.h:19
Definition ECON.h:18
Representation of GPIO controller.
Definition GPIO.h:12
representing an HcalBackplane
Definition HcalBackplane.h:15
virtual DAQ & daq()=0
get the DAQ object
Bias bias(int which)
Get an I2C interface for the given HGCROC board's bias bus
Definition HcalBackplane.cxx:173
virtual int nrocs() override
number of boards
Definition HcalBackplane.h:34
virtual bool have_roc(int iroc) const override
do we have a roc with this id?
Definition HcalBackplane.cxx:109
virtual Elinks & elinks()=0
get the Elinks object
virtual ECON & econ(int which) override
get a ECON interface for the given econ board
Definition HcalBackplane.cxx:161
virtual std::vector< int > econ_ids() const override
get a list of the econ IDs we have set up
Definition HcalBackplane.cxx:138
virtual ROC & roc(int which) override
Get a ROC interface for the given HGCROC board.
Definition HcalBackplane.cxx:149
int necon_
Number of ECON boards in this system.
Definition HcalBackplane.h:77
virtual int necons() override
number of econds
Definition HcalBackplane.h:37
std::unique_ptr< GPIO > gpio_
The GPIO interface.
Definition HcalBackplane.h:80
std::array< std::unique_ptr< HGCROCBoard >, 4 > rocs_
the backplane can hold up to 4 HGCROC boards
Definition HcalBackplane.h:93
int nhgcroc_
Number of HGCROC boards in this system.
Definition HcalBackplane.h:74
const std::vector< std::pair< int, int > > & getRocErxMapping() override
Get the ROC to eRx mapping.
Definition HcalBackplane.cxx:123
std::array< std::unique_ptr< ECON >, 3 > econs_
the ECONs on the ECON Mezzanine on this backplane
Definition HcalBackplane.h:96
virtual std::vector< int > roc_ids() const override
get a list of the IDs we have set up
Definition HcalBackplane.cxx:127
virtual ~HcalBackplane()=default
virtual destructor since we'll be holding this as a Target
virtual GPIO & gpio()
Get the GPIO object for debugging purposes.
Definition HcalBackplane.h:61
void init(lpGBT &daq_lpgbt, lpGBT &trig_lpgbt, int hgcroc_boards)
Common initialization for slow control given lpGBT objects and a mask for which HGCROC boards are con...
Definition HcalBackplane.cxx:24
virtual bool have_econ(int iecon) const override
do we have an econ with this id?
Definition HcalBackplane.cxx:116
Definition ROC.h:18
encapulating a given setup's access rules
Definition Target.h:24
Class which provides an interface with an lpGBT ASIC as mounted on an LDMX mezzanine.
Definition lpGBT.h:52
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3
an HGCROC board contains one ROC, one Bias board and some other utilities that are accessible via the...
Definition HcalBackplane.h:87