QEleConverter Class Reference

List of all members.


Detailed Description

this class converts electronics settings between binary format and corresponding physical quantity.

Author:
sergio.didomizio@ge.infn.it

Public Member Functions

virtual ~QEleConverter ()
 destructor
void SetExternalBias (float bias)
 set external bias voltage (in Volts)
float GetExternalBias () const
 get external bias voltage (in Volts)
int GetBinaryBias (float realBias) const
 convert bias from volts to bits
float GetRealBias (unsigned int binaryBias) const
 convert bias from bits to volts
int GetBinaryGain (float realGain) const
 convert gain to bitwise format
float GetRealGain (unsigned int binaryGain) const
 convert gain from bits to pure number
int GetBinaryResistance (float realResistance) const
 convert load resistance to bitwise format
float GetRealResistance (unsigned int binaryResistance) const
 convert load resistance from bits to GOhm
float GetRealCutFrequency (unsigned int binaryCutFreq) const
 convert bessel cut frequency from bits to Hz
float GetRealOffset (const unsigned int dacLow, const unsigned int dacHi, const bool polarity, const bool sBit) const
 get offset voltage

Static Public Member Functions

static QEleConverterGetInstance ()
 singleton getter

Private Attributes

float fExternalBias
 overall bias voltage. Thermistor bias voltage is obtained as an attenuation of this value
std::map< unsigned int, float > fBinaryBiasMap
std::map< unsigned int, float > fBinaryGainMap
std::map< unsigned int, float > fBinaryResistanceMap
std::map< unsigned int, float > fBinaryCutFreq
std::map< float, unsigned int > fRealBiasMap
std::map< float, unsigned int > fRealGainMap
std::map< float, unsigned int > fRealResistanceMap

Member Function Documentation

int QEleConverter::GetBinaryBias ( float  realBias  )  const

convert bias from volts to bits

Parameters:
realBias bias voltage in Volts
Returns:
requested value in bitwise format. If the supplied value do not match any of the allowed bitwise values, a negative value is returned, corresponding to the allowed value closest to the requested one

References fExternalBias.

Referenced by MLCSlowController::GetInitParameters(), and QGEChannelFrame::ReadChannel().

float QEleConverter::GetRealBias ( unsigned int  binaryBias  )  const

convert bias from bits to volts

Returns:
the requested value in volt-based units

References fExternalBias.

Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealBias(), MWPSlowController::Init(), and QGEChannelFrame::ShowChannel().

int QEleConverter::GetBinaryGain ( float  realGain  )  const

convert gain to bitwise format

Returns:
requested value in bitwise format. If the supplied value do not match any of the allowed bitwise values, a negative value is returned, corresponding to the first allowed value bigger than the requested one

Referenced by MLCSlowController::GetInitParameters(), and QGEChannelFrame::ReadChannel().

float QEleConverter::GetRealGain ( unsigned int  binaryGain  )  const

convert gain from bits to pure number

Returns:
the requested value in pure number units

Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealGain(), MWPSlowController::Init(), and QGEChannelFrame::ShowChannel().

int QEleConverter::GetBinaryResistance ( float  realResistance  )  const

convert load resistance to bitwise format

Parameters:
realResistance load resistance in GOhm (allowed 10.86 or 54)
Returns:
requested value in bitwise format. If the supplied value do not match any of the allowed bitwise values, a negative value is returned, corresponding to the allowed value closest to the requested one

Referenced by MLCSlowController::GetInitParameters().

float QEleConverter::GetRealResistance ( unsigned int  binaryResistance  )  const

convert load resistance from bits to GOhm

Returns:
the requested value in GOhm

Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealLoadResistance(), and MWPSlowController::Init().

float QEleConverter::GetRealCutFrequency ( unsigned int  binaryCutFreq  )  const

convert bessel cut frequency from bits to Hz

Returns:
the requested value in Hz

float QEleConverter::GetRealOffset ( const unsigned int  dacLow,
const unsigned int  dacHi,
const bool  polarity,
const bool  sBit 
) const

get offset voltage

Parameters:
dacLow dac low bits (0..4095)
dacHi dac hi bits (0..3)
polarity offset polarity (false = neg, true=pos)
sBit special bit
Returns:
rough estimation of offset voltage before the pre-amplifier in mV
The estimation of the offset is based on the assumption (not true) that when the offset bits are set to zero the output offset is zero, and that all the 14 bits that can be used to tune the offset are linear between 0 and 80 mV (or 0 and -80 mV, depending on the offset polarity). The special bit is assumed to add further +40mV offset regardless of the polarity. Actually the zero point is smaller than zero for positive polarity and bigger than zero for negative polarity, in order to avoid possible gaps. Moreover the range might be something different from 80 mV and the linearity of the 2 MSB is not guaranteed.

Referenced by QEleChannelConfig::GetRealOffset().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:05 2010 for CUORE Software by  doxygen 1.5.6