pflib v3.9.0-rc3-11-g2537d8f
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:
17 virtual ~HcalBackplane() = default;
19
21 virtual int nrocs() override { return nhgcroc_; }
22
24 virtual int necons() override { return necon_; }
25
27 virtual bool have_roc(int iroc) const override;
28
30 virtual bool have_econ(int iecon) const override;
31
33 virtual std::vector<int> roc_ids() const override;
34
36 virtual std::vector<int> econ_ids() const override;
37
39 virtual ROC& roc(int which) override;
40
42 virtual ECON& econ(int which) override;
43
45 Bias bias(int which);
46
48 virtual GPIO& gpio() { return *gpio_; }
49
51 virtual Elinks& elinks() = 0;
52
54 virtual DAQ& daq() = 0;
55
56 protected:
58 void add_roc(int iroc, uint8_t roc_baseaddr,
59 const std::string& roc_type_version,
61 std::shared_ptr<I2C> board_i2c);
62
64 void add_econ(int iecon, uint8_t econ_baseaddr, const std::string& econ_type,
65 std::shared_ptr<I2C> econ_i2c);
66
69
71 int necon_;
72
75
78 pflib::ROC roc_;
79 std::shared_ptr<I2C> roc_i2c_;
80 pflib::Bias bias_;
81 std::shared_ptr<I2C> bias_i2c_;
82 std::shared_ptr<I2C> board_i2c_;
83 };
84 std::map<int, ROCConnection> roc_connections_;
85
88 pflib::ECON econ_;
90 };
91 std::map<int, ECONConnection> econ_connections_;
92};
93
94} // namespace pflib
95
96#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:89
virtual int nrocs() override
number of boards
Definition HcalBackplane.h:21
virtual bool have_roc(int iroc) const override
do we have a roc with this id?
Definition HcalBackplane.cxx:12
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:80
void add_roc(int iroc, uint8_t roc_baseaddr, const std::string &roc_type_version, std::shared_ptr< I2C > roc_i2c, std::shared_ptr< I2C > bias_i2c, std::shared_ptr< I2C > board_i2c)
Add a ROC to the set of ROCs.
Definition HcalBackplane.cxx:38
virtual std::vector< int > econ_ids() const override
get a list of the econ IDs we have set up
Definition HcalBackplane.cxx:29
virtual ROC & roc(int which) override
Get a ROC interface for the given HGCROC board.
Definition HcalBackplane.cxx:71
int necon_
Number of ECON boards in this system.
Definition HcalBackplane.h:71
virtual int necons() override
number of econds
Definition HcalBackplane.h:24
std::unique_ptr< GPIO > gpio_
The GPIO interface.
Definition HcalBackplane.h:74
int nhgcroc_
Number of HGCROC boards in this system.
Definition HcalBackplane.h:68
virtual std::vector< int > roc_ids() const override
get a list of the IDs we have set up
Definition HcalBackplane.cxx:20
void add_econ(int iecon, uint8_t econ_baseaddr, const std::string &econ_type, std::shared_ptr< I2C > econ_i2c)
Add a ECON to the set of ECONs.
Definition HcalBackplane.cxx:58
virtual GPIO & gpio()
Get the GPIO object for debugging purposes.
Definition HcalBackplane.h:48
virtual bool have_econ(int iecon) const override
do we have an econ with this id?
Definition HcalBackplane.cxx:16
Definition ROC.h:18
encapulating a given setup's access rules
Definition Target.h:24
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3
The I2C interface and object for a ECON board.
Definition HcalBackplane.h:87
The I2C interfaces and objects for a HGCROC board.
Definition HcalBackplane.h:77