GetReal()

Get a real parameter from the data base.

Usage

realPar = GetReal( path, par, default=None ,unit=None )

Parameters

path (string)
Data base path of the node containing the parameter.
par (string)
Parameter name.
default (real)
Default value. This value is returned if the indicated path and par does not exist.
unit (string)
Returned unit. If this parameter is not None, the return value is converted into this unit.

Return Value

realPar (real)
The parameter value.

Errors

  • The parameter in the data base must be a real.
  • The parameter must exist in the data base or the default must not be None.
  • The unit must be valid, or None.

Description

This routine returns a real parameter from the data base. The parameter address is given by its node path and the par name. If the parameter does not exist, the default value is returned. If unit is given, the parameter value is converted into this unit, otherwise the raw value is returned. For example,
nodeAss = ROOT + RS + 'AUTO_SOLUTION_STRATEGY'
relaxFct = GetReal( nodeAss, 'relaxation_factor' )