module LCBaseController verbosity = info enable = true EleStartupConfig = /path/to/ascii/file.txt UseExternalBias = false ExternalBiasVolt = 10.0 SleepAfterChangeSec = 20 MaxTimePerStepSec = 0 endmod
Public Member Functions | |
MLCBaseController (const std::string &name, QSequence *s) | |
constructor | |
virtual | ~MLCBaseController () |
destructor | |
Action | Init () |
Init method. | |
Action | Do (QEvent *ev) |
Do method. | |
Action | Done () |
Done method. | |
Protected Member Functions | |
const std::set< int > & | GetActiveChannels () const |
virtual QError | ReadWorkFlow ()=0 |
virtual QError | MakeGroups (std::vector< std::set< int > > &groups) const |
virtual ActionId | SetupNextConf ()=0 |
virtual void | InitFlowController ()=0 |
std::map< int, QEleChannelConfig * > | GetCurrentConfigs () |
std::set< int > | GetCurrentGroup () const |
get set of logical channels belonging to current group | |
virtual void | SetProcedureType ()=0 |
void | SetExternalBiasV (double biasV) |
Protected Attributes | |
QLCProcedure_t | fProcedureType |
Private Member Functions | |
QError | ReadInitFile () |
void | InitHandler () |
ActionId | NextConf () |
Private Attributes | |
std::string | fMatrixName |
double | fExternalBiasV |
int | fSleepAfterChangeSec |
int | fStepTimeoutSec |
time_t | fTimeOfLastChangeUnix |
std::set< int > | fActiveChannels |
std::vector< std::set< int > > | fGroups |
size_t | fCurrGroupId |
std::map< int, QEleChannelConfig * > | fConfigs |
std::set< int > | fWrongPolarityChannels |
std::set< int > | fChannelsWithHeater |
const std::set<int>& MLCBaseController::GetActiveChannels | ( | ) | const [inline, protected] |
get list of logical channels involved in the procedure
References fActiveChannels.
Referenced by MakeGroups().
virtual QError MLCBaseController::ReadWorkFlow | ( | ) | [protected, pure virtual] |
read work flow to be used during the load curves procedure
Implemented in MLCBoloCheckController, and MLCEleCheckController.
Referenced by Init().
QError MLCBaseController::MakeGroups | ( | std::vector< std::set< int > > & | groups | ) | const [protected, virtual] |
build channel groups starting from the informations in fActiveChannels and in fConfigs
References GetActiveChannels(), and QBaseModule::GetInt().
Referenced by Init().
virtual ActionId MLCBaseController::SetupNextConf | ( | ) | [protected, pure virtual] |
set electronics configuration for all channels and/or external bias to be used in the next configuration
Implemented in MLCBoloCheckController, and MLCEleCheckController.
Referenced by NextConf().
virtual void MLCBaseController::InitFlowController | ( | ) | [protected, pure virtual] |
QLCFlowController initialization
Implemented in MLCBoloCheckController, and MLCEleCheckController.
Referenced by Init().
std::map< int, QEleChannelConfig * > MLCBaseController::GetCurrentConfigs | ( | ) | [protected] |
get configurations for channels that belong to current group
References fConfigs, fCurrGroupId, and fGroups.
Referenced by MLCEleCheckController::SetupNextConf(), and MLCBoloCheckController::SetupNextConf().
std::set<int> MLCBaseController::GetCurrentGroup | ( | ) | const [inline, protected] |
get set of logical channels belonging to current group
In principle this method is dangerous since it is not guaranteed that fGroups has an entry at fCurrGroupId.
References fCurrGroupId, and fGroups.
Referenced by MLCEleCheckController::InitFlowController(), and MLCBoloCheckController::InitFlowController().
virtual void MLCBaseController::SetProcedureType | ( | ) | [protected, pure virtual] |
Set procedure type. This method must set the value of the variable fProcedureType.
Implemented in MLCBoloCheckController, and MLCEleCheckController.
Referenced by Init().
void MLCBaseController::SetExternalBiasV | ( | double | biasV | ) | [inline, protected] |
Set external bias in V
References fExternalBiasV.
Referenced by MLCBoloCheckController::SetupNextConf().
QError MLCBaseController::ReadInitFile | ( | ) | [private] |
Read file containing initial electronics configuration.
Returns error in the following cases:
References fActiveChannels, fChannelsWithHeater, fConfigs, fExternalBiasV, fMatrixName, fSleepAfterChangeSec, fStepTimeoutSec, fWrongPolarityChannels, QLCConfigReader::Get(), QLCConfigReader::GetActiveChannels(), QBaseModule::GetBool(), QLCConfigReader::GetChannelsWithHeater(), QBaseModule::GetDouble(), QBaseModule::GetInt(), QBaseModule::GetString(), QLCConfigReader::GetWrongPolarityChannels(), LC_INITFILE_AUXNAME, QLCConfigWriter::M_LC, QLCConfigReader::Open(), QBaseModule::SeqAuxData(), QError::Set(), and QBaseModule::Warn().
Referenced by Init().
void MLCBaseController::InitHandler | ( | ) | [private] |
QEleConfigHandler initialization
References fCurrGroupId, fGroups, fWrongPolarityChannels, QDbDetector::GetCurrentRunNumber(), QEleConfigHandler::GetInstance(), QEleConfigHandler::Reset(), QDbDetector::SettingsBasket(), and QEleConfigHandler::SetWrongPolarityChannels().
Referenced by Init().
QDriver::ActionId MLCBaseController::NextConf | ( | ) | [private] |
move to the next configuration for the current group
References QEleConfigHandler::Add(), QEleConfigHandler::Apply(), fConfigs, fCurrGroupId, fExternalBiasV, fGroups, fSleepAfterChangeSec, fTimeOfLastChangeUnix, QLCFlowController::GetInstance(), QEleConfigHandler::GetInstance(), QLCFlowController::NextConf(), QEleConfigHandler::SetExternalBiasV(), QEleConfigHandler::SetSleepAfterChangeSec(), and SetupNextConf().
Referenced by Do().
QLCProcedure_t MLCBaseController::fProcedureType [protected] |
Stores the procedure type, used to set a SeqAuxData that is read by the MLCMeasCollector module, so that it knows which type of curves should be created in the initialization phase.
In the base class this variable is set to LC_INVALID, and if it is not set appropriately in the child classes (in the implementation of the SetProcedureType() method), an error is thrown.
Referenced by Init(), MLCEleCheckController::SetProcedureType(), and MLCBoloCheckController::SetProcedureType().
std::string MLCBaseController::fMatrixName [private] |
name of the QMatrix used to store electronics configuration
Referenced by ReadInitFile().
double MLCBaseController::fExternalBiasV [private] |
value to be used as external bias (in V), or 10V if the cfg asks to use the internal bias
Referenced by NextConf(), ReadInitFile(), and SetExternalBiasV().
int MLCBaseController::fSleepAfterChangeSec [private] |
sleep time in s for QEleConfigHandler
Referenced by NextConf(), and ReadInitFile().
int MLCBaseController::fStepTimeoutSec [private] |
timeout in seconds for each curve step (0 means no limit)
Referenced by Do(), and ReadInitFile().
time_t MLCBaseController::fTimeOfLastChangeUnix [private] |
time of last electronics change in unix time format, used for timeout
Referenced by Do(), Init(), and NextConf().
std::set<int> MLCBaseController::fActiveChannels [private] |
set of logical channels involved in the procedure
Referenced by GetActiveChannels(), and ReadInitFile().
std::vector<std::set<int> > MLCBaseController::fGroups [private] |
array of channel groups -- built by MakeGroups()
Referenced by Done(), GetCurrentConfigs(), GetCurrentGroup(), Init(), InitHandler(), and NextConf().
size_t MLCBaseController::fCurrGroupId [private] |
id of currently active channel group
Referenced by Done(), GetCurrentConfigs(), GetCurrentGroup(), InitHandler(), and NextConf().
std::map<int, QEleChannelConfig*> MLCBaseController::fConfigs [private] |
map of electronics configurations
Referenced by GetCurrentConfigs(), NextConf(), ReadInitFile(), and ~MLCBaseController().
std::set<int> MLCBaseController::fWrongPolarityChannels [private] |
channels with bad hardware cabling for which bias polarity is inverted
Referenced by InitHandler(), and ReadInitFile().
std::set<int> MLCBaseController::fChannelsWithHeater [private] |
channels for which the heater can be considered
Referenced by ReadInitFile().