pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
Ecal.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
73 protected:
74 lpGBT& lpGBT_;
75 int i2cbus_;
76 int imodule_;
86
87 private:
90};
91
93 public:
96 void createModule(int imodule, lpGBT& lpGBT, int i2cbus);
98 EcalModule& module(int imodule);
99
100 private:
102};
103
104} // namespace pflib
Definition ECON.h:18
Class holding a set of ROCs and ECONs representing a HexaModule.
Definition Ecal.h:18
int nrocs() const
number of hgcrocs
Definition Ecal.cxx:29
int n_econs_
number of ECONs that are enabled
Definition Ecal.h:83
static const std::vector< std::pair< int, int > > & getRocErxMapping()
Get the mapping of ROC channels to ERX channels.
Definition Ecal.cxx:117
void hardResetROCs()
Generate a hard reset to all the HGCROC boards.
Definition Ecal.cxx:93
static const std::vector< std::pair< int, int > > roc_to_erx_map_
mapping of ROC halves to ECON-D eRx channels
Definition Ecal.h:89
bool have_roc(int iroc) const
do we have a roc with this id?
Definition Ecal.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 Ecal.cxx:12
void softResetECON()
Generate a soft reset.
Definition Ecal.cxx:108
bool have_econ(int iecon) const
do we have an econ with this id?
Definition Ecal.cxx:40
void softResetROC()
Generate a soft reset.
Definition Ecal.cxx:103
int necons() const
number of econs
Definition Ecal.cxx:31
std::array< std::unique_ptr< ROC >, 6 > rocs_
up to 6 ROCs some of which could be disabled
Definition Ecal.h:81
int n_rocs_
number of ROCs that are enabled
Definition Ecal.h:79
std::vector< int > roc_ids() const
get a list of the IDs we have set up
Definition Ecal.cxx:47
void hardResetECONs()
generate a hard reset to all the ECON boards
Definition Ecal.cxx:98
ROC & roc(int which)
Get a ROC interface for the given HGCROC.
Definition Ecal.cxx:67
std::array< std::unique_ptr< ECON >, 2 > econs_
two ECONs
Definition Ecal.h:85
std::vector< int > econ_ids() const
get a list of the econ IDs we have set up
Definition Ecal.cxx:57
ECON & econ(int which)
get a ECON interface for the given ECON
Definition Ecal.cxx:79
Definition Ecal.h:92
EcalModule & module(int imodule)
get a module
void createModule(int imodule, lpGBT &lpGBT, int i2cbus)
create a module
Definition ROC.h:18
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