MLCSlowController Class Reference
[Modules]

Inheritance diagram for MLCSlowController:

QModule QBaseModule

List of all members.


Detailed Description

implements the policies for load curves parallelization

Author:
sergio.didomizio@ge.infn.it This module handles parallelization in the load curves procedure. The procedure is run on a different group of channels at each iteration of the sequence containing this module.
The channels are grouped in ascending order, and the size of each group can be selected by mean a cfg parameter.
Before the beginning of the procedure, the gain, the load resistance and the Internal bias partition are set to a value that can be selected from cfg and that will remain fixed during the whole procedure. The cfg also allows to run the offset adjustment cycle at the beginning of the procedure. Once all these start-up operations have been performed, the load curves for the channels in the currently active group are performed by repeatedly increasing the external bias up to the value specified in the cfg (MaxExternalBias). The number and the spacing between the curve points is controlled by two cfg parameters (StepMode and BiasStep).
Finally there are two parameters, ChannelListSource and WrongPolarityFile, that can be used as workarounds for some informations that are missing in the database (see below).


Public Member Functions

 MLCSlowController (QSequence *s)
 constructor
virtual ~MLCSlowController ()
 destructor
void Init ()
 Init method.
QEventDo (QEvent *ev)
 return immediately if there are still measurements to be performed with current electronics configuration, or prepare new configuration if there are no channels that are still waiting for a measurement with current one
void Done ()
 Done method.

Private Types

enum  QLCStepMode { QLC_STEP_LINEAR, QLC_STEP_LOG, QLC_STEP_FILE }

Private Member Functions

void GroupChannels (const std::list< unsigned int > &channels)
 group logical channels in subgroups
void InitConfig (QEleChannelConfig &conf, const bool polarity)
 init QLCMeasConfig object with default front end settings values
void GetInitParameters ()
 get parameters for first measurement from config file (or elsewhere). See config example for the list of init parameters
virtual bool PopulateNextConfig ()
 determine electronics configuration for next set of measurements and apply to hardware
bool IncrementExternalBias (int step=0)
 increment or decrement external bias
float GetExtBiasStepSize () const
 get step size (in Volts) for external bias incrementation
void SetExtBiasStepSize (const float size)
 set step size (in Volts) for external bias incrementation

Private Attributes

std::vector< std::list
< unsigned int > > 
fGroups
 vector of logical channel subgroups. Each element is in turn a list of logical channels belonging to a given subgroup
int fDefaultBias
int fDefaultGain
bool fDefaultResistance
float fExtBiasStepSize
float fDefaultExternalBias
bool fAdjustOffsetAtStartup
QLCStepMode fStepMode
std::vector< float > fExtBiasFromFile
size_t fExtBiasIndex

Member Enumeration Documentation

possible modes for external bias voltage incrementation

Enumerator:
QLC_STEP_LINEAR  bias voltage is incremented by the same amount at each step
QLC_STEP_LOG  the smaller the bias voltage, the smaller the incrementation step size
QLC_STEP_FILE  read external bias values from file


Member Function Documentation

void MLCSlowController::Init (  )  [virtual]

void MLCSlowController::GroupChannels ( const std::list< unsigned int > &  channels  )  [private]

group logical channels in subgroups

Parameters:
channels list of all logical channels to be grouped
channels are grouped in ascending order and with the group size specified in the cfg file

References fGroups, and QBaseModule::GetInt().

Referenced by Init().

void MLCSlowController::InitConfig ( QEleChannelConfig conf,
const bool  polarity 
) [private]

init QLCMeasConfig object with default front end settings values

Parameters:
conf QLCMeasConfig object to be initialized (passed by reference)
polarity bias polarity to be set in new configuration

References QBaseModule::Error(), fAdjustOffsetAtStartup, fDefaultBias, fDefaultGain, fDefaultResistance, QEleChannelConfig::GetLg(), QEleChannelConfig::SetAdjustOffset(), QEleChannelConfig::SetBias(), QEleChannelConfig::SetBiasPolarity(), QEleChannelConfig::SetExternalBias(), QEleChannelConfig::SetGain(), and QEleChannelConfig::SetLoadResistance().

Referenced by Init(), and PopulateNextConfig().

bool MLCSlowController::PopulateNextConfig (  )  [private, virtual]

bool MLCSlowController::IncrementExternalBias ( int  step = 0  )  [private]

increment or decrement external bias

Parameters:
step number of step for incrementation, defaults to 0 (automatic). Step size is set by calling SetExtBiasStepSize(). Positive values will increase external bias, while negative values will decrement it. In case of 0 number of steps is determined automatically based on the value of the variable fStepMode.
Returns:
true on success, false on failure

References fExtBiasFromFile, fExtBiasIndex, fExtBiasStepSize, fStepMode, QLCSlowConfigHandler::GetExternalBias(), QLCSlowConfigHandler::GetInstance(), QBaseModule::Panic(), QLC_STEP_FILE, QLC_STEP_LINEAR, and QLCSlowConfigHandler::SetExternalBias().

Referenced by PopulateNextConfig().


Member Data Documentation

bias voltage used for 1st measurement

Referenced by GetInitParameters(), and InitConfig().

gain used for 1st measurement

Referenced by GetInitParameters(), and InitConfig().

load resistance used for 1st measurement

Referenced by GetInitParameters(), and InitConfig().

external bias incrementation step size in V

Referenced by GetExtBiasStepSize(), GetInitParameters(), IncrementExternalBias(), and SetExtBiasStepSize().

if true the offset is adjusted at the startup to the value hardcoded in QLCSlowConfigHandler::ApplyConfig()

Referenced by GetInitParameters(), and InitConfig().

step mode, defaults to QLC_STEP_LOG

Referenced by GetInitParameters(), and IncrementExternalBias().

std::vector<float> MLCSlowController::fExtBiasFromFile [private]

contains external bias values if QLC_STEP_FILE is used

Referenced by GetInitParameters(), and IncrementExternalBias().

keeps track of the next external bias to be used if QLC_STEP_FILE is used

Referenced by IncrementExternalBias(), and PopulateNextConfig().


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

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