QEleInterface Class Reference

List of all members.


Detailed Description

reads and writes electronics configuration from slow server, channel by channel

Author:
Sergio Di Domizio

Public Member Functions

virtual ~QEleInterface ()
 destructor
Bool_t ReadChannel (QEleChannelConfig &config, Bool_t useCache)
 read hardware configuration for the requested channel
Bool_t ReadChannel (QEleChannelConfig &config)
 same as ReadChannel(config, true)
Bool_t WriteChannel (const QEleChannelConfig &info, Bool_t useCache)
 write configuration to hardware
Bool_t WriteChannel (const QEleChannelConfig &config)
 same as WriteChannel(config, true)
const QErrorGetError () const
 get QError object associated to last occurred error
void SetSettingsBasket (UInt_t basket)
 reset cache and set settings basket to be used
void Reset ()
 reset cache

Static Public Member Functions

static QEleInterfaceGetInstance ()
 singleton getter

Private Member Functions

 QEleInterface ()
 constructor
Bool_t ReadHardware (QEleChannelConfig &config)
 read data from hardware
Bool_t InitClient (QSlowControlClient &client)
 perform slow control client initialization
void ResetError ()

Private Attributes

QError fError
std::map< UInt_t,
QEleChannelConfig
fChannelsConfig
UInt_t fSettingsBasket

Member Function Documentation

Bool_t QEleInterface::ReadChannel ( QEleChannelConfig config,
Bool_t  useCache 
)

read hardware configuration for the requested channel

Parameters:
config this object stores the informations read from the hardware
useCache whether or not to use cached data instead of reading data from a channel that was already read in the past.
Returns:
true on success, false if any error occurs
If useCache is true, this function reads informations from the hardware only once. All subsequent calls for the same channel will cause cached informations to be returned.

References fChannelsConfig, QEleChannelConfig::GetLg(), and ReadHardware().

Referenced by ReadChannel().

Bool_t QEleInterface::WriteChannel ( const QEleChannelConfig info,
Bool_t  useCache 
)

write configuration to hardware

Parameters:
info object storing configuration to be written
useCache whether or not to use cached data as reference when writing new configuration to hardware
Returns:
true on success, false if any error occurs
If useCache is false or if the configuration for the requested channel has never been read from the hardware, this method reads it first. It then compares all the parameters stored in the provided QEleChannelConfig object with the ones of the object stored in the fChannels map, and applies to the boards all the parameters that do not match between the two objects.

References fChannelsConfig, fError, QEleChannelConfig::GetBias(), QEleChannelConfig::GetBiasPolarity(), QBaseClient::GetError(), QEleChannelConfig::GetGain(), QEleChannelConfig::GetInput(), QEleChannelConfig::GetLg(), QEleChannelConfig::GetLoadResistance(), QEleChannelConfig::GetOffsetDac(), QEleChannelConfig::GetOffsetHiBits(), QEleChannelConfig::GetOffsetPolarity(), QEleChannelConfig::GetOffsetSBit(), QEleChannelConfig::GetTestSignalNeg(), QEleChannelConfig::GetTestSignalPos(), InitClient(), ReadHardware(), QSlowControlClient::SetFEBias(), QSlowControlClient::SetFEBiasPolarity(), QSlowControlClient::SetFEGain(), QSlowControlClient::SetFEInput(), QSlowControlClient::SetFELoadResistor(), QSlowControlClient::SetFEOffsetDAC(), QSlowControlClient::SetFEOffsetMSB(), QSlowControlClient::SetFEOffsetPolarity(), QSlowControlClient::SetFEOffsetSpecialBit(), and QSlowControlClient::SetFETestSignal().

Referenced by ApplyElectronicsConfiguration(), and WriteChannel().

void QEleInterface::SetSettingsBasket ( UInt_t  basket  ) 

reset cache and set settings basket to be used

Do nothing if basket is the same as the one stored in this object

References Reset().

Referenced by QGuiEleMain::Init(), and QGuiEleMain::UpdateBasket().

Bool_t QEleInterface::ReadHardware ( QEleChannelConfig config  )  [private]


Member Data Documentation

QError object storing last occurred error

Referenced by GetError(), InitClient(), ReadHardware(), and WriteChannel().

key: lg channel, value: object storing electronics parameters

Referenced by ReadChannel(), Reset(), and WriteChannel().


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