pflib v3.0.0-rc1-29-g3a901ac
Pretty Fine HGCROC Interaction Library
All Classes Namespaces Files Functions Variables Typedefs Pages
Hcal.h
1#ifndef pflib_hcal_inc_
2#define pflib_hcal_inc_
3
4#include <memory>
5#include "pflib/ROC.h"
6#include "pflib/I2C.h"
7#include "pflib/Bias.h"
8#include "pflib/Elinks.h"
9#include "pflib/GPIO.h"
10//#include "pflib/FastControl.h"
11#include "pflib/DAQ.h"
12
13namespace pflib {
14
18class Hcal {
19 public:
20 Hcal(const std::vector<std::shared_ptr<I2C>>& roc_i2c);
21
23 int nrocs() { return nhgcroc_; }
24
26 ROC roc(int which, const std::string& roc_type_version = "sipm_rocv3b");
27
29 // Bias bias(int which);
30
32 virtual void hardResetROCs();
33
35 uint32_t getFirmwareVersion();
36
38 virtual void softResetROC(int which=-1);
39
41 virtual GPIO& gpio() { return *gpio_; }
42
44 virtual Elinks& elinks() = 0;
45
47 // FastControl& fc() { return fc_; }
48
50 virtual DAQ& daq() = 0;
51
52 protected:
55
58
61
62};
63
64}
65
66
67#endif // pflib_hcal_inc_
Interface with DAQ via a WishboneInterface.
Definition DAQ.h:16
Representation of GPIO controller.
Definition GPIO.h:12
representing a standard HCAL motherboard or a test system
Definition Hcal.h:18
virtual GPIO & gpio()
Get the GPIO object for debugging purposes.
Definition Hcal.h:41
virtual DAQ & daq()=0
get the FastControl object
int nhgcroc_
Number of HGCROC boards in this system.
Definition Hcal.h:54
std::vector< std::shared_ptr< I2C > > roc_i2c_
The ROC I2C interfaces.
Definition Hcal.h:60
virtual Elinks & elinks()=0
get the Elinks object
int nrocs()
number of boards
Definition Hcal.h:23
uint32_t getFirmwareVersion()
Get the firmware version.
Definition Hcal.cxx:31
virtual void softResetROC(int which=-1)
Generate a soft reset to a specific HGCROC board, -1 for all.
Definition Hcal.cxx:28
ROC roc(int which, const std::string &roc_type_version="sipm_rocv3b")
Get a ROC interface for the given HGCROC board.
Definition Hcal.cxx:9
virtual void hardResetROCs()
Get an I2C interface for the given HGCROC board's bias bus
Definition Hcal.cxx:25
std::unique_ptr< GPIO > gpio_
The GPIO interface.
Definition Hcal.h:57
Definition ROC.h:16
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3