pflib v3.9.5-18-g30f792c
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
19 public:
30 EcalModule(lpGBT& lpgbt, int i2cbus, int modulenumber, uint8_t roc_mask);
31
33 int nrocs() const;
35 int necons() const;
36
38 bool have_roc(int iroc) const;
39
40 static constexpr const int ECON_D = 0;
41 static constexpr const int ECON_T = 1;
42
44 bool have_econ(int iecon) const;
45
48
51
53 ROC& roc(int which);
54
56 ECON& econ(int which);
57
59 void hardResetROCs();
60
62 void hardResetECONs();
63
65 void softResetROC();
66
68 void softResetECON();
69
72
75
76 protected:
77 lpGBT& lpGBT_;
78 int i2cbus_;
79 int imodule_;
89};
90
91} // namespace pflib
Definition ECON.h:19
Class holding a set of ROCs and ECONs representing a HexaModule.
Definition EcalModule.h:18
int nrocs() const
number of hgcrocs
Definition EcalModule.cxx:29
int n_econs_
number of ECONs that are enabled
Definition EcalModule.h:86
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
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:84
int n_rocs_
number of ROCs that are enabled
Definition EcalModule.h:82
static const std::vector< std::pair< int, int > > ROC_ERX_MAPPING
mapping of ROC halves to ECON-D eRx channels
Definition EcalModule.h:74
std::vector< int > roc_ids() const
get a list of the IDs we have set up
Definition EcalModule.cxx:47
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:88
std::vector< int > econ_ids() const
get a list of the econ IDs we have set up
Definition EcalModule.cxx:57
static const std::vector< std::pair< int, int > > & getHardwareRocErxMapping()
Get the mapping of ROC channels to ERX channels.
Definition EcalModule.cxx:117
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