pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
Ecal.h
1#pragma once
2
3#include <map>
4#include <memory>
5#include <vector>
6
7#include "pflib/ECON.h"
8#include "pflib/I2C.h"
9#include "pflib/ROC.h"
10#include "pflib/lpGBT.h"
11
12namespace pflib {
13
19 public:
20 EcalModule(lpGBT& lpgbt, int i2cbus, int modulenumber);
21
23 int nrocs() const { return 6; }
25 int necons() const { return 2; }
26
28 bool have_roc(int iroc) const { return iroc >= 0 && iroc <= nrocs(); }
29
30 static constexpr const int ECON_D = 0;
31 static constexpr const int ECON_T = 1;
32
34 bool have_econ(int iecon) const { return iecon == ECON_D || iecon == ECON_T; }
35
38
41
43 ROC& roc(int which);
44
46 ECON& econ(int which);
47
49 void hardResetROCs();
50
52 void hardResetECONs();
53
55 void softResetROC();
56
58 void softResetECON();
59
60 protected:
61 lpGBT& lpGBT_;
62 int i2cbus_;
63 int imodule_;
67 std::vector<ECON> econs_;
68};
69
71 public:
74 void createModule(int imodule, lpGBT& lpGBT, int i2cbus);
76 EcalModule& module(int imodule);
77
78 private:
80};
81
82} // 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.h:23
void hardResetROCs()
Generate a hard reset to all the HGCROC boards.
Definition Ecal.cxx:49
bool have_roc(int iroc) const
do we have a roc with this id?
Definition Ecal.h:28
void softResetECON()
Generate a soft reset.
Definition Ecal.cxx:64
bool have_econ(int iecon) const
do we have an econ with this id?
Definition Ecal.h:34
std::vector< ROC > rocs_
representation of Ecal HexaModule
Definition Ecal.h:66
void softResetROC()
Generate a soft reset.
Definition Ecal.cxx:59
int necons() const
number of econds
Definition Ecal.h:25
std::vector< int > roc_ids() const
get a list of the IDs we have set up
Definition Ecal.cxx:22
void hardResetECONs()
generate a hard reset to all the ECON boards
Definition Ecal.cxx:54
ROC & roc(int which)
Get a ROC interface for the given HGCROC.
Definition Ecal.cxx:33
std::vector< int > econ_ids() const
get a list of the econ IDs we have set up
Definition Ecal.cxx:27
ECON & econ(int which)
get a ECON interface for the given ECON
Definition Ecal.cxx:40
Definition Ecal.h:70
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