Represents a FEB Rev D with 1 nXYTER. More...
#include <Feb1nxGenD.h>
Public Types | |
enum | FebType { kFeb1nx = 100, kFeb1nxGenB, kFeb1nxGenC, kFeb1nxGenD, kFeb2nx = 200, kFeb2nxGas, kFeb4nx = 400, kFeb4nxBT } |
Public Member Functions | |
Feb1nxGenD () | |
Feb1nxGenD (base::Board *board, int port) | |
Constructor with full addressing path information. | |
virtual | ~Feb1nxGenD () |
int | getPortNumber () const |
Returns port (connector) number on ROC (0 or 1). | |
int | getFebClass () const |
Returns class of FEB, kFeb1nx, kFeb2nx, or kFeb4nx. | |
int | getFebType () const |
Returns type of FEB, encoding see FebBase::FebType. | |
int | numNx () const |
Returns the number connected nXYTER on this FEB. | |
nxyter::NxChip & | nx (int nxind) |
Gives access to the NxChip object of the nXYTER with index ind. | |
nxyter::MainAdc & | adc () |
Gives access to the MainADC object. | |
virtual int | getFebState () |
Get current FEB state - active flags of nXYTERs. | |
virtual int | initRoc () |
Initialize ROC to support this FEB. | |
virtual int | probe () |
Probe whether nx and adc on the FEB are available. set 'offline' flags. | |
virtual int | setToDefault (bool ispos0=false, bool ispos1=false) |
Write default values into ADC and nXYTER registers. | |
virtual void | printNxHeadLine (std::ostream &os, int nxind) |
Print standart headline for a nXYTER nxind. | |
virtual void | printRegisters (std::ostream &os, int domask=nxyter::kDoAll) |
Read nXYTER and ADC registers and print to stream os. | |
void | resetNxI2cBus () |
Reset the I2C Interface of all nXYTERs of the FEB. | |
void | resetNxI2cRegister () |
Reset the I2C Registers of all nXYTERs of the FEB. | |
void | setNxOffline (int nxind, bool isoff) |
Set 'offline' status flag for nXYTER nxind. | |
bool | getNxOffline (int nxind) |
Returns 'offline' status flag for nXYTER nxind. | |
int | setNxTestModes (bool testpuls, bool testtrig, int calselect) |
Setup test pulser and test trigger mode in all nXYTERs. | |
int | setNxRegisterAll (uint8_t reg, uint8_t val, bool veri=true) |
Write a value into a register of all nXYTERs. | |
bool | monAdcSupport () |
Returns monitor ADC support status. | |
bool | eepromSupport () |
Returns EEProm support status. | |
int | getNumMonAdc () |
int | getMonAdc (int ch, uint16_t &val) |
Read value from monitoring ADC. | |
base::Board & | board () |
Return reference to roc::Board which hosts the Peripheral . | |
base::Board * | getBoard () const |
Returns pointer to the roc::Board which hosts the Peripheral . | |
Static Public Member Functions | |
static const char * | typeToString (int type) |
Converts a FebClass or FebType value into a string. | |
static int | stringToType (const char *str) |
Converts a string into a FebClass or FebType value. | |
static void | discoverFebs (base::Board *board, int &typeport0, int &typeport1, bool liberal=false) |
Method to discover FEB's connected to the ROC. | |
static nxyter::FebBase * | newFeb (base::Board *board, int port, int type) |
Factory method to create a new Feb object. | |
Protected Member Functions | |
void | addNxChip (int addr, int nxnum, int adcmux) |
Protected Attributes | |
int | fPort |
port the feb is connected to | |
int | fType |
FEB class/type. | |
std::vector< nxyter::NxChip * > | fNxChip |
vector of NxChip objects | |
std::vector< bool > | fNxOffline |
nx offline flag | |
nxyter::MainAdc | fMainAdc |
MainAdc object. | |
bool | fMode4nx |
4nx mode selector | |
std::vector< int > | fAdcChannel |
ADC channel mux settings. | |
roc::I2cDevice | fMonAdcDevice |
monitor ADC I2C device | |
roc::I2cDevice | fEepromDevice |
EEProm I2C device. | |
base::Board * | fBoard |
board pointer | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &os, nxyter::FebBase &obj) |
ostream insertion for nxyter::FebBase |
Represents a FEB Rev D with 1 nXYTER.
Definition at line 15 of file Feb1nxGenD.h.
enum nxyter::FebBase::FebType [inherited] |
nxyter::Feb1nxGenD::Feb1nxGenD | ( | ) | [inline] |
Definition at line 17 of file Feb1nxGenD.h.
nxyter::Feb1nxGenD::Feb1nxGenD | ( | base::Board * | board, | |
int | port | |||
) |
Constructor with full addressing path information.
Sets up Feb1nxGenD
object with full addressing information
board | ROC board pointer | |
port | the ROC port |
Definition at line 25 of file Feb1nxGenD.cxx.
References nxyter::FebBase::addNxChip(), nxyter::FebBase::fMonAdcDevice, and roc::I2cDevice::setSlaveAddr().
nxyter::Feb1nxGenD::~Feb1nxGenD | ( | ) | [virtual] |
Definition at line 36 of file Feb1nxGenD.cxx.
nxyter::MainAdc& nxyter::FebBase::adc | ( | ) | [inline, inherited] |
Gives access to the MainADC object.
Definition at line 68 of file FebBase.h.
References nxyter::FebBase::fMainAdc.
Referenced by cmd_getadcdirect(), cmd_printadc(), cmd_scanadclat(), cmd_setadc(), cmd_setadcclock(), cmd_setadcdef(), cmd_setadcpatt(), FebWidget::createTabs(), nxyter::FebBase::discoverFebs(), nxyter::FebBase::initRoc(), nxyter::FebBase::printRegisters(), nxyter::FebBase::probe(), nxyter::FebBase::setToDefault(), nxyter::FebUtil::testMainAdcControlPath(), and nxyter::FebUtil::testMainAdcDataPath().
void nxyter::FebBase::addNxChip | ( | int | addr, | |
int | nxnum, | |||
int | adcmux | |||
) | [protected, inherited] |
Adds a new nXYTER with I2C slave address addr and nXYYER number nxnum to the configuration. The FebBase class supports FEB's with up to 4 nXYTERs, so this method can be called at most 4 times.
addr | I2C slave address of the nXYTER | |
nxnum | see nXYTER number | |
adcmux | setting for the ADC channel Mux |
std::out_of_range | if called more often than the FebType requires. |
Definition at line 359 of file FebBase.cxx.
References nxyter::FebBase::fAdcChannel, nxyter::FebBase::fNxChip, nxyter::FebBase::fNxOffline, nxyter::FebBase::fPort, and base::Peripheral::getBoard().
Referenced by nxyter::Feb1nxGenB::Feb1nxGenB(), nxyter::Feb1nxGenC::Feb1nxGenC(), Feb1nxGenD(), nxyter::Feb2nxGas::Feb2nxGas(), and nxyter::Feb4nxBT::Feb4nxBT().
base::Board & base::Peripheral::board | ( | ) | [inherited] |
Return reference to roc::Board
which hosts the Peripheral
.
std::runtime_error | if board pointer not initialized or 0. |
Definition at line 30 of file Peripheral.cxx.
References base::Peripheral::fBoard.
Referenced by nxyter::RocNx::fireTestPulse(), nxyter::MainAdc::getAdcDirect(), nxyter::NxChip::getChannelDelay(), nxyter::MainAdc::getChannelLatency(), nxyter::MainAdc::getClockDelayBufg(), nxyter::MainAdc::getClockDelaySrInit(), base::Gpio::getConfig(), nxyter::RocNx::getDataDebug(), nxyter::RocNx::getFifoEmpty(), nxyter::RocNx::getFifoFull(), nxyter::RocNx::getNxActive(), roc::I2cDevice::getRegister(), nxyter::MainAdc::getRegister(), roc::I2cDevice::getRegister16(), base::Gpio::getSyncBaud(), base::Gpio::getSyncScale(), nxyter::FebBase::initRoc(), nxyter::FebBase::resetNxI2cBus(), nxyter::FebBase::resetNxI2cRegister(), nxyter::RocNx::resetRocNxTs(), nxyter::NxChip::setChannelDelay(), nxyter::MainAdc::setChannelLatency(), nxyter::MainAdc::setChannelMux(), nxyter::MainAdc::setClockDelay(), nxyter::MainAdc::setClockDelayBufg(), nxyter::MainAdc::setClockDelaySrInit(), base::Gpio::setConfig(), nxyter::RocNx::setDebugMode(), nxyter::RocNx::setLTSDelay(), nxyter::RocNx::setNxActive(), nxyter::NxChip::setNxNumber(), nxyter::RocNx::setParityCheck(), roc::I2cDevice::setRegister(), nxyter::MainAdc::setRegister(), roc::I2cDevice::setRegisterVerify(), base::Gpio::setSyncBaud(), base::Gpio::setSyncScale(), and nxyter::RocNx::setToDefault().
void nxyter::FebBase::discoverFebs | ( | base::Board * | board, | |
int & | typeport0, | |||
int & | typeport1, | |||
bool | liberal = false | |||
) | [static, inherited] |
Method to discover FEB's connected to the ROC.
This static method can be used to determine what type of FEBs are connected to the two ports of the ROC represented by board. When liberal is false
(the default), only fully fully functional FEBs with all nXYTERs operational will be recognized. If liberal is true
, also FEBs with non-operational nXYTERs. The ADC must always be available.
The discover logic is based on the I2C slave address convention
The currently available FEB's use:
For strict mode (liberal = false
) all nXYTERs must be seen, for liberal mode (liberal = true
) one is enough.
board | ROC board pointer | |
typeport0 | the type of FEB as defined in FebType for the FEB found on port 0, or 0 if none found. | |
typeport1 | the type of FEB as defined in FebType for the FEB found on port 1, or 0 if none found. | |
liberal | if true, also FEBs with disfunctional nXYTERs are accepted |
Definition at line 447 of file FebBase.cxx.
References nxyter::FebBase::adc(), roc::I2cDevice::getRegister16(), nxyter::NxChip::i2c(), nxyter::FebBase::kFeb1nxGenC, nxyter::FebBase::kFeb2nxGas, nxyter::FebBase::kFeb4nx, nxyter::FebBase::kFeb4nxBT, nxyter::FebBase::nx(), nxyter::NxI2c::probe(), and nxyter::MainAdc::probe().
Referenced by cmd_feb(), RocNxWidget::detectFebs(), and nxyter::FebUtil::probe().
bool nxyter::FebBase::eepromSupport | ( | ) | [inline, inherited] |
Returns EEProm support status.
true
if the type of FEB supports an EEProm. Definition at line 121 of file FebBase.h.
References nxyter::FebBase::fEepromDevice, and roc::I2cDevice::getSlaveAddr().
base::Board* base::Peripheral::getBoard | ( | ) | const [inline, inherited] |
Returns pointer to the roc::Board which hosts the Peripheral
.
Note: normally using board()
is more convenient.
Definition at line 38 of file Peripheral.h.
References base::Peripheral::fBoard.
Referenced by nxyter::FebUtil::acquireTestTriggerData(), nxyter::NxChip::activate(), nxyter::FebBase::addNxChip(), nxyter::NxChip::deactivate(), nxyter::NxChip::isactive(), and nxyter::QuickDaq::QuickDaq().
int nxyter::FebBase::getFebClass | ( | ) | const [inline, inherited] |
Returns class of FEB, kFeb1nx, kFeb2nx, or kFeb4nx.
Definition at line 54 of file FebBase.h.
References nxyter::FebBase::fType.
int nxyter::FebBase::getFebState | ( | ) | [virtual, inherited] |
Get current FEB state - active flags of nXYTERs.
Definition at line 127 of file FebBase.cxx.
References nxyter::NxChip::isactive(), nxyter::FebBase::numNx(), nxyter::FebBase::nx(), and nxyter::FebBase::setNxOffline().
Referenced by FebWidget::getSubConfig().
int nxyter::FebBase::getFebType | ( | ) | const [inline, inherited] |
Returns type of FEB, encoding see FebBase::FebType.
Definition at line 58 of file FebBase.h.
References nxyter::FebBase::fType.
Referenced by FebWidget::FebWidget(), and FebWidget::fillCmdFile().
int nxyter::FebBase::getMonAdc | ( | int | ch, | |
uint16_t & | val | |||
) | [inherited] |
Read value from monitoring ADC.
Returns reading of channel ch
from the monitoring ADC.
ch | channel number (0 to 3) | |
val | 16 bit value to be written |
ch
out of range, or -3 if ADC read error Definition at line 334 of file FebBase.cxx.
References nxyter::FebBase::fMonAdcDevice, roc::I2cDevice::getRegister16(), and nxyter::FebBase::monAdcSupport().
Referenced by cmd_printmon(), cmd_scanmonadc(), FebWidget::displayMonAdcs(), and roc::BoardsVector::readFeb().
int nxyter::FebBase::getNumMonAdc | ( | ) | [inherited] |
Definition at line 316 of file FebBase.cxx.
References nxyter::FebBase::monAdcSupport().
Referenced by FebWidget::displayMonAdcs(), roc::BoardsVector::numAdc(), and roc::BoardsVector::readFeb().
bool nxyter::FebBase::getNxOffline | ( | int | nxind | ) | [inline, inherited] |
Returns 'offline' status flag for nXYTER nxind.
nxind | see nXYTER index |
std::out_of_range | if nxind out of range |
Definition at line 104 of file FebBase.h.
References nxyter::FebBase::fNxOffline.
Referenced by roc::BoardsVector::autoped_setnxmode(), check_nxoffline(), cmd_printnx(), cmd_printstatus(), FebWidget::fillCmdFile(), FebWidget::getSubConfig(), nxyter::FebBase::initRoc(), nxyter::FebBase::printNxHeadLine(), nxyter::FebBase::printRegisters(), nxyter::FebUtil::restoreFeb(), nxyter::FebUtil::saveFeb(), nxyter::FebBase::setNxRegisterAll(), and nxyter::FebBase::setToDefault().
int nxyter::FebBase::getPortNumber | ( | ) | const [inline, inherited] |
Returns port (connector) number on ROC (0 or 1).
Definition at line 50 of file FebBase.h.
References nxyter::FebBase::fPort.
Referenced by cmd_geti2c(), cmd_getnx(), cmd_printstatus(), cmd_puti2c(), cmd_seti2c(), and FebWidget::fillCmdFile().
int nxyter::FebBase::initRoc | ( | ) | [virtual, inherited] |
Initialize ROC to support this
FEB.
This method will setup
Definition at line 102 of file FebBase.cxx.
References nxyter::NxChip::activate(), nxyter::FebBase::adc(), base::Peripheral::board(), nxyter::NxChip::deactivate(), nxyter::FebBase::fAdcChannel, nxyter::FebBase::fMode4nx, nxyter::FebBase::getNxOffline(), nxyter::FebBase::numNx(), nxyter::FebBase::nx(), base::Board::operErrBuildInc(), base::Board::put(), ROC_NX_FEB4NX, and nxyter::MainAdc::setChannelMux().
Referenced by cmd_initfeb(), FebWidget::setSubConfig(), and nxyter::QuickDaq::startRun().
bool nxyter::FebBase::monAdcSupport | ( | ) | [inline, inherited] |
Returns monitor ADC support status.
true
if the type of FEB supports a monitoring ADC. Definition at line 114 of file FebBase.h.
References nxyter::FebBase::fMonAdcDevice, and roc::I2cDevice::getSlaveAddr().
Referenced by cmd_printmon(), FebWidget::displayMonAdcs(), nxyter::FebBase::getMonAdc(), nxyter::FebBase::getNumMonAdc(), and roc::BoardsVector::readFeb().
nxyter::FebBase * nxyter::FebBase::newFeb | ( | base::Board * | board, | |
int | port, | |||
int | type | |||
) | [static, inherited] |
Factory method to create a new Feb object.
board | ROC board pointer | |
port | the ROC port | |
type | of Feb object to be created as encoded in FebBase::FebType |
Definition at line 549 of file FebBase.cxx.
References nxyter::FebBase::kFeb1nxGenB, nxyter::FebBase::kFeb1nxGenC, nxyter::FebBase::kFeb1nxGenD, nxyter::FebBase::kFeb2nxGas, and nxyter::FebBase::kFeb4nxBT.
Referenced by RocNxWidget::addFebWidget(), cmd_feb(), and roc::BoardsVector::setBoard().
int nxyter::FebBase::numNx | ( | ) | const [inline, inherited] |
Returns the number connected nXYTER on this FEB.
Definition at line 62 of file FebBase.h.
References nxyter::FebBase::fNxChip.
Referenced by autoped_setnxmode(), roc::BoardsVector::autoped_setnxmode(), cmd_autosettrh(), cmd_printstatus(), cmd_testnxdata(), FebWidget::createTabs(), FebWidget::FebWidget(), FebWidget::fillCmdFile(), get_nxind(), get_nxrange(), nxyter::FebBase::getFebState(), FebWidget::getSubConfig(), nxyter::FebBase::initRoc(), nxyter::FebUtil::restoreFeb(), nxyter::FebUtil::saveFeb(), and nxyter::FebUtil::testFebControlPathCombo().
nxyter::NxChip & nxyter::FebBase::nx | ( | int | nxind | ) | [inherited] |
Gives access to the NxChip object of the nXYTER with index ind.
Provides to access the object representing one of the nXYTERs on the FEB. Acceptable values of ind are 0 to numNx() -1, otherwise an exception is thrown.
nxind | see nXYTER index |
std::out_of_range | if nxind out of range |
Definition at line 86 of file FebBase.cxx.
References nxyter::FebBase::fNxChip.
Referenced by nxyter::FebUtil::acquireTestPulserData(), nxyter::FebUtil::acquireTestTriggerData(), autoped_setnxmode(), roc::BoardsVector::autoped_setnxmode(), cmd_autosettrh(), cmd_autotrim(), cmd_autovbiass(), cmd_getnx(), cmd_idsigch(), cmd_printnx(), cmd_printstatus(), cmd_scanadclat(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_scanvbiass(), cmd_setnx(), cmd_setnxaddr(), cmd_setnxdef(), cmd_setnxmask(), cmd_setnxmode(), cmd_setnxpower(), cmd_setnxtrim(), FebWidget::createTabs(), nxyter::FebBase::discoverFebs(), get_vbiass_data(), nxyter::FebBase::getFebState(), nxyter::FebBase::initRoc(), nxyter::FebBase::printNxHeadLine(), nxyter::FebBase::printRegisters(), nxyter::FebBase::probe(), nxyter::FebUtil::restoreFeb(), nxyter::FebUtil::saveFeb(), nxyter::FebBase::setNxRegisterAll(), nxyter::FebBase::setNxTestModes(), nxyter::FebBase::setToDefault(), nxyter::FebUtil::testFebControlPathCombo(), nxyter::FebUtil::testNxControlPath(), and nxyter::FebUtil::testNxRegisters().
void nxyter::FebBase::printNxHeadLine | ( | std::ostream & | os, | |
int | nxind | |||
) | [virtual, inherited] |
Print standart headline for a nXYTER nxind.
Definition at line 200 of file FebBase.cxx.
References nxyter::FebBase::fPort, nxyter::NxChip::getNxNumber(), nxyter::FebBase::getNxOffline(), and nxyter::FebBase::nx().
Referenced by cmd_autovbiass(), cmd_idsigch(), cmd_printnx(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_scanvbiass(), and nxyter::FebBase::printRegisters().
void nxyter::FebBase::printRegisters | ( | std::ostream & | os, | |
int | domask = nxyter::kDoAll | |||
) | [virtual, inherited] |
Read nXYTER and ADC registers and print to stream os.
This method uses the NxI2c::printRegisters() and MainAdc::printRegisters() methods to print the current status of the FEB board, consult the respective documentation for details.
Definition at line 223 of file FebBase.cxx.
References nxyter::FebBase::adc(), nxyter::FebBase::fNxChip, nxyter::FebBase::fPort, nxyter::FebBase::getNxOffline(), nxyter::NxChip::i2c(), nxyter::FebBase::nx(), nxyter::FebBase::printNxHeadLine(), nxyter::MainAdc::printRegisters(), and nxyter::NxI2c::printRegisters().
Referenced by cmd_printfeb(), and nxyter::FebBase::operator<<().
int nxyter::FebBase::probe | ( | ) | [virtual, inherited] |
Probe whether nx and adc on the FEB are available. set 'offline' flags.
The probe method uses the NxI2c::probe() and MainAdc::probe() methods to determine whether control access to the nXYTER and ADC can be established. If an nXYTER probe fails, the 'offline' flag will be set true
, see setNxOffline().
Definition at line 150 of file FebBase.cxx.
References nxyter::FebBase::adc(), nxyter::FebBase::fNxChip, nxyter::NxChip::i2c(), nxyter::FebBase::nx(), nxyter::NxI2c::probe(), and nxyter::FebBase::setNxOffline().
void nxyter::FebBase::resetNxI2cBus | ( | ) | [inherited] |
Reset the I2C Interface of all nXYTERs of the FEB.
This methods resets the I2C bus state machine in all nXYYERs on the FEB. It might be useful in case this state machine is stuck. It should not affect the status of any register in the nXYTER.
Definition at line 242 of file FebBase.cxx.
References base::Peripheral::board(), nxyter::FebBase::fPort, base::Board::operPPP(), ROC_NX_I2C_RESET, and ROC_NX_I2C_SWITCH.
Referenced by cmd_resetnxi2cbus().
void nxyter::FebBase::resetNxI2cRegister | ( | ) | [inherited] |
Reset the I2C Registers of all nXYTERs of the FEB.
This method resets the I2C registers of all nXYTERs on the FEB to the chip default values, which are 0 for masks and 128 (mid range) for all bias DAC's. In general this will out the nXYTER in a state where it will not operate properly.
This method might be useful in some cases of despair and to test this reset mechanism of last resort. To put the FEB into a working state use setToDefault().
Definition at line 264 of file FebBase.cxx.
References base::Peripheral::board(), nxyter::FebBase::fPort, base::Board::operPPP(), ROC_NX_I2C_REGRESET, and ROC_NX_I2C_SWITCH.
Referenced by cmd_resetnxi2creg().
void nxyter::FebBase::setNxOffline | ( | int | nxind, | |
bool | isoff | |||
) | [inline, inherited] |
Set 'offline' status flag for nXYTER nxind.
If a nXYTER is set offline it will be silently ignored in all FEB level methods which loop over all nXYTERs, in particular initRoc(), setToDefault(), setNxRegisterAll(). The 'offline' flag does not affect the direct access to the nXYTER resources via nx().
nxind | see nXYTER index | |
isoff | when true , nXYTER is set inactive |
std::out_of_range | if nxind out of range |
Definition at line 95 of file FebBase.h.
References nxyter::FebBase::fNxOffline.
Referenced by cmd_setnxoff(), FebWidget::enableNxClicked(), nxyter::FebBase::getFebState(), and nxyter::FebBase::probe().
int nxyter::FebBase::setNxRegisterAll | ( | uint8_t | reg, | |
uint8_t | val, | |||
bool | veri = true | |||
) | [inherited] |
Write a value into a register of all nXYTERs.
Writes val into register reg of all nXYTERs on the FEB.
reg | register number | |
val | value to be written | |
veri | if true readback verification done (default is true ) |
Definition at line 303 of file FebBase.cxx.
References nxyter::FebBase::fNxChip, nxyter::FebBase::getNxOffline(), nxyter::NxChip::i2c(), nxyter::FebBase::nx(), base::Board::operErrBuild(), and roc::I2cDevice::setRegister().
Referenced by cmd_testnxdata(), and nxyter::QuickDaq::setNxRegisterAll().
int nxyter::FebBase::setNxTestModes | ( | bool | testpuls, | |
bool | testtrig, | |||
int | calselect | |||
) | [inherited] |
Setup test pulser and test trigger mode in all nXYTERs.
Calls for all nXYTERs on of the FEB the NxI2c::setNxTestModes() method, check the documentation of this method for details.
testtrig | determines whether test trigger mode is enabled | |
testpuls | determines whether test pulser mode is enabled | |
calselect | determines which channel group receives test pulse |
Definition at line 283 of file FebBase.cxx.
References nxyter::FebBase::fNxChip, nxyter::NxChip::i2c(), nxyter::FebBase::nx(), base::Board::operErrBuild(), and nxyter::NxI2c::setTestModes().
Referenced by cmd_testnxdata(), and nxyter::QuickDaq::setNxTestModes().
int nxyter::FebBase::setToDefault | ( | bool | ispos0 = false , |
|
bool | ispos1 = false | |||
) | [virtual, inherited] |
Write default values into ADC and nXYTER registers.
This method uses the NxI2c::setToDefault() and MainAdc::setToDefault() methods to setup the registers with default values, consult the respective documentation for details. The nXYTER polarity is determined by ispos0 and ispos1, where ispos0 determines the polarity for an FEB1nx, the first (index 0) chip if an FEB2nx and the first two (index 0 and 1) of an FEB4nx. ispos1 is used for the remaining chips.
Definition at line 178 of file FebBase.cxx.
References nxyter::FebBase::adc(), nxyter::FebBase::fNxChip, nxyter::FebBase::getNxOffline(), nxyter::NxChip::i2c(), nxyter::FebBase::nx(), base::Board::operErrBuild(), nxyter::MainAdc::setToDefault(), and nxyter::NxI2c::setToDefault().
Referenced by cmd_setfebdef(), and cmd_testnxdata().
int nxyter::FebBase::stringToType | ( | const char * | str | ) | [static, inherited] |
Converts a string into a FebClass or FebType value.
Definition at line 401 of file FebBase.cxx.
Referenced by roc::BoardsVector::setBoard().
const char * nxyter::FebBase::typeToString | ( | int | type | ) | [static, inherited] |
Converts a FebClass or FebType value into a string.
Definition at line 377 of file FebBase.cxx.
References nxyter::FebBase::kFeb1nx, nxyter::FebBase::kFeb1nxGenB, nxyter::FebBase::kFeb1nxGenC, nxyter::FebBase::kFeb1nxGenD, nxyter::FebBase::kFeb2nx, nxyter::FebBase::kFeb2nxGas, nxyter::FebBase::kFeb4nx, and nxyter::FebBase::kFeb4nxBT.
Referenced by RocNxWidget::addFebKind(), RocNxWidget::addFebWidget(), cmd_feb(), FebWidget::fillCmdFile(), and nxyter::FebUtil::probe().
std::ostream & operator<< | ( | std::ostream & | os, | |
nxyter::FebBase & | obj | |||
) | [related, inherited] |
ostream insertion for nxyter::FebBase
Just calls nxyter::FebBase::printRegisters()
Definition at line 150 of file FebBase.h.
References nxyter::FebBase::printRegisters().
std::vector<int> nxyter::FebBase::fAdcChannel [protected, inherited] |
ADC channel mux settings.
Definition at line 28 of file FebBase.h.
Referenced by nxyter::FebBase::addNxChip(), nxyter::FebBase::FebBase(), and nxyter::FebBase::initRoc().
base::Board* base::Peripheral::fBoard [protected, inherited] |
board pointer
Definition at line 26 of file Peripheral.h.
Referenced by base::Peripheral::board(), base::Peripheral::getBoard(), and base::Peripheral::Peripheral().
roc::I2cDevice nxyter::FebBase::fEepromDevice [protected, inherited] |
EEProm I2C device.
Definition at line 30 of file FebBase.h.
Referenced by nxyter::FebBase::eepromSupport().
nxyter::MainAdc nxyter::FebBase::fMainAdc [protected, inherited] |
bool nxyter::FebBase::fMode4nx [protected, inherited] |
4nx mode selector
Definition at line 27 of file FebBase.h.
Referenced by nxyter::FebBase::FebBase(), and nxyter::FebBase::initRoc().
roc::I2cDevice nxyter::FebBase::fMonAdcDevice [protected, inherited] |
monitor ADC I2C device
Definition at line 29 of file FebBase.h.
Referenced by Feb1nxGenD(), nxyter::FebBase::getMonAdc(), and nxyter::FebBase::monAdcSupport().
std::vector<nxyter::NxChip*> nxyter::FebBase::fNxChip [protected, inherited] |
vector of NxChip objects
Definition at line 24 of file FebBase.h.
Referenced by nxyter::FebBase::addNxChip(), nxyter::FebBase::FebBase(), nxyter::FebBase::numNx(), nxyter::FebBase::nx(), nxyter::FebBase::printRegisters(), nxyter::FebBase::probe(), nxyter::FebBase::setNxRegisterAll(), nxyter::FebBase::setNxTestModes(), nxyter::FebBase::setToDefault(), and nxyter::FebBase::~FebBase().
std::vector<bool> nxyter::FebBase::fNxOffline [protected, inherited] |
nx offline flag
Definition at line 25 of file FebBase.h.
Referenced by nxyter::FebBase::addNxChip(), nxyter::FebBase::FebBase(), nxyter::FebBase::getNxOffline(), and nxyter::FebBase::setNxOffline().
int nxyter::FebBase::fPort [protected, inherited] |
port the feb is connected to
Definition at line 22 of file FebBase.h.
Referenced by nxyter::FebBase::addNxChip(), nxyter::FebBase::getPortNumber(), nxyter::FebBase::printNxHeadLine(), nxyter::FebBase::printRegisters(), nxyter::FebBase::resetNxI2cBus(), and nxyter::FebBase::resetNxI2cRegister().
int nxyter::FebBase::fType [protected, inherited] |
FEB class/type.
Definition at line 23 of file FebBase.h.
Referenced by nxyter::FebBase::getFebClass(), and nxyter::FebBase::getFebType().