Inheritance diagram for QWPSlowConfigHandler:
Public Member Functions | |
virtual | ~QWPSlowConfigHandler () |
dtor | |
void | KillDaqCrates (bool kill) |
QError | GetPresentConfig (const unsigned short lg, QLCSlowConfig &config) |
const QLCSlowConfig * | GetConfig (const unsigned short lg, const unsigned short id) const |
get configuration associated to the given id and for the given logical channel | |
virtual bool | AddConfig (const unsigned short lg, QLCSlowConfig *config) |
add a new configuration | |
bool | Schedule (const unsigned short lg, QLCSlowConfig *config) |
schedule a measurement to be performed with the given electronics configuration | |
const QLCSlowConfig * | GetNextScheduled (const unsigned short lg) const |
get a read-only pointer to next scheduled measurement for a given channel | |
void | EraseNextScheduled (const unsigned short lg) |
delete next scheduled measurement for the given logical channel | |
const QLCSlowConfig * | GetLastConfig (const unsigned short lg) const |
get last registered configuration | |
bool | AddNextScheduled (const unsigned short lg) |
set next scheduled config as the next one to be applied | |
virtual void | SetConfDone (const unsigned short lg, const unsigned short id) |
notfy that measurement with a certain configuration has been performed | |
bool | IsConfDone () const |
check whether there are configurations for which a measurement is still to be performed | |
virtual bool | SetActiveChannels (const std::list< unsigned short > &channels) |
set the list of channels that will be handled | |
const std::list< unsigned short > & | GetActiveChannels () const |
get the list of channels that are being processed by the load curves procedure | |
void | Clear () |
clear all maps, reset current curve branch to negative and set external bias voltage to 0 (also in the hw) | |
bool | Consolidate (bool triggerFlag) |
when this function is called all the new configurations added by mean of AddConfig() are applied to hardware | |
void | Dump () const |
bool | SetSleepTime (const unsigned short sleepTime) |
unsigned short | GetSleepTime () const |
void | Update () |
Static Public Member Functions | |
static QWPSlowConfigHandler & | GetInstance () |
singleton getter | |
Protected Member Functions | |
QWPSlowConfigHandler () | |
ctor | |
Protected Attributes | |
std::map< unsigned short, std::vector< QLCSlowConfig * > > | fConfigMap |
std::list< unsigned short > | fChannels |
list of channels for which loa curves are being drawn | |
Private Member Functions | |
void | UpdateDaq (bool reset) |
void | InitSlowClient () |
bool | ApplyConfig (const unsigned short lg, QLCSlowConfig *conf, const QLCSlowConfig *oldConf) |
apply slow config to hardware | |
void | GetCratesToKill () |
determine the daq crates the active channels belong to | |
bool | CheckSlowStatus () |
set slow serer to a status suitable for load curves (enable write mode and check that the correct settings basket is loaded) | |
Private Attributes | |
bool | fKillDaq |
bool | fTriggerFlag |
std::map< unsigned short, std::list< QLCSlowConfig * > > | fScheduled |
std::map< unsigned short, QLCSlowConfig > | fPresentConfigs |
std::map< unsigned short, unsigned short > | fCurrentConfig |
std::list< int > | fCrates |
list of daq crates the active logical channels belong to | |
std::map< unsigned short, QLCSlowConfig * > | fNextConfig |
map of logical channel and corresponding 'next' configuration | |
unsigned short | fSleepTime |
time in second to wait after applying new settings | |
QDaqClient | fDaqClient |
QSlowControlClient | fSlowClient |
const QLCSlowConfig * QWPSlowConfigHandler::GetConfig | ( | const unsigned short | lg, | |
const unsigned short | id | |||
) | const |
get configuration associated to the given id and for the given logical channel
lg | logical channel | |
id | config id |
bool QWPSlowConfigHandler::AddConfig | ( | const unsigned short | lg, | |
QLCSlowConfig * | config | |||
) | [virtual] |
add a new configuration
lg | logical channel the configuration is associated to | |
config | pointer to the QLCSlowConfig to be added |
Reimplemented in QWPSlowConfigContainer.
bool QWPSlowConfigHandler::Schedule | ( | const unsigned short | lg, | |
QLCSlowConfig * | config | |||
) |
schedule a measurement to be performed with the given electronics configuration
lg | logical channel | |
config | requested electronics configuration |
const QLCSlowConfig * QWPSlowConfigHandler::GetNextScheduled | ( | const unsigned short | lg | ) | const |
get a read-only pointer to next scheduled measurement for a given channel
lg | logical channel |
void QWPSlowConfigHandler::EraseNextScheduled | ( | const unsigned short | lg | ) |
delete next scheduled measurement for the given logical channel
lg | logical channel |
const QLCSlowConfig * QWPSlowConfigHandler::GetLastConfig | ( | const unsigned short | lg | ) | const |
get last registered configuration
lg | logical channel for whic last configuration is to be returned |
bool QWPSlowConfigHandler::AddNextScheduled | ( | const unsigned short | lg | ) |
set next scheduled config as the next one to be applied
lg | logical channel |
void QWPSlowConfigHandler::SetConfDone | ( | const unsigned short | lg, | |
const unsigned short | id | |||
) | [virtual] |
notfy that measurement with a certain configuration has been performed
lg | logical channel of performed measurement | |
id | configuration id of performed measurement |
Reimplemented in QWPSlowConfigContainer.
bool QWPSlowConfigHandler::SetActiveChannels | ( | const std::list< unsigned short > & | channels | ) | [virtual] |
set the list of channels that will be handled
channels | list of channels to be handled |
Reimplemented in QWPSlowConfigContainer.
bool QWPSlowConfigHandler::Consolidate | ( | bool | triggerFlag | ) |
when this function is called all the new configurations added by mean of AddConfig() are applied to hardware
bool QWPSlowConfigHandler::ApplyConfig | ( | const unsigned short | lg, | |
QLCSlowConfig * | conf, | |||
const QLCSlowConfig * | oldConf | |||
) | [private] |
apply slow config to hardware
lg | logical channel the configuration will be applied to | |
conf | set of configurations to be applied | |
oldConf | set of electronics configuraions that are present before the settings that are going to be applied |
bool QWPSlowConfigHandler::CheckSlowStatus | ( | ) | [private] |
set slow serer to a status suitable for load curves (enable write mode and check that the correct settings basket is loaded)
std::map<unsigned short,std::vector<QLCSlowConfig*> > QWPSlowConfigHandler::fConfigMap [protected] |
Map of logical channels (key) and corresponding configurations (value). The value of this map is a vector of pointers to QLCSlowConfig objects Here I use a std::vector because I need random access and I do not need to remove front elements.
std::map<unsigned short, std::list<QLCSlowConfig*> > QWPSlowConfigHandler::fScheduled [private] |
map of logical channels (key) and list of scheduled configurations (value) Here I use a std::list because I do not need random access and I have to remove front elements.
std::map<unsigned short,unsigned short> QWPSlowConfigHandler::fCurrentConfig [private] |
map of logical channel (key) and config id that is currently active (value). This map is needed in order to know what channels are still performing measurement with current active configuration
std::list<int> QWPSlowConfigHandler::fCrates [private] |
list of daq crates the active logical channels belong to
This list is needed to know which daq crates must be killed every time the electronics configuration are being modified. It is updated every time the list of active channels is modified
std::map<unsigned short, QLCSlowConfig*> QWPSlowConfigHandler::fNextConfig [private] |
map of logical channel and corresponding 'next' configuration
Next configuration is the one that is set by mean of AddConfig() and which is then applied to hardware when Consolidate() is called.