1#ifndef PFLIB_ROC_H_INCLUDED
2#define PFLIB_ROC_H_INCLUDED
11#include "pflib/TempParameters.h"
12#include "pflib/logging/Logging.h"
20 static const int N_REGISTERS_PER_PAGE = 32;
26 void setRunMode(
bool active =
true);
32 uint8_t getValue(
int page,
int offset);
33 void setValue(
int page,
int offset, uint8_t value);
37 bool getDirectAccess(
int reg,
int bit);
38 void setDirectAccess(
const std::string& name,
bool val);
39 void setDirectAccess(
int reg,
int bit,
bool val);
119 const uint64_t& val);
Definition of compiling and decompiling functions between page numbers, register numbers,...
The object that does the compiling.
Definition Compile.h:55
std::map< int, std::map< int, uint8_t > > applyParameters(const std::map< std::string, std::map< std::string, uint64_t > > ¶meters)
Apply the input parameter mapping onto the chip.
Definition ROC.cxx:434
void loadParameters(const std::string &file_path, bool prepend_defaults)
Load the input parameters onto the chip.
Definition ROC.cxx:486
int bus_khz_
I2C bus speed in kHz.
Definition ROC.h:192
std::map< std::string, uint64_t > getParameters(const std::string &page)
Get the parameters for the input page.
Definition ROC.cxx:408
TempParameters< ROC >::Builder testParameters()
start a set of test parameters
Definition ROC.cxx:589
void setPointer(uint16_t addr)
set the register pointer (R0, R1) and read it back until it matches
Definition ROC.cxx:60
void setRegisters(const std::map< int, std::map< int, uint8_t > > ®isters)
set registers on the HGCROC to specific values
Definition ROC.cxx:344
void dumpSettings(const std::string &filepath, bool decompile, bool use_csv)
Dump the settings of the HGCROC into the input filepath.
Definition ROC.cxx:521
void setBusSpeed(int khz)
Set the I2C bus speed used for the transactions with this ROC.
Definition ROC.cxx:43
std::vector< uint8_t > readPage(int ipage, int len)
Definition ROC.cxx:102
int countI2CErrors(int n_tries)
Test the I2C bus to this ROC without retries.
Definition ROC.cxx:73
std::map< std::string, std::map< std::string, uint64_t > > defaults()
Retrieve all of the manual-documented defaults for all parameters.
Definition ROC.cxx:430
std::map< int, std::map< int, uint8_t > > getRegisters(const std::map< int, std::map< int, uint8_t > > &selected={})
get registers from the HGCROC
Definition ROC.cxx:352
void loadSettings(const std::string &filepath, bool is_csv)
load the settings from the input filepath onto the HGCROC
Definition ROC.cxx:384
void writePage(int ipage, std::vector< uint8_t > vals)
Definition ROC.cxx:162
void applyParameter(const std::string &page, const std::string ¶m, const uint64_t &val)
Short-hand for applying a single parameter.
Definition ROC.cxx:514
Build a TempParameters class parameter by parameters.
Definition TempParameters.h:41
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3