CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
plotting.AlgoOpt Class Reference

Public Member Functions

def __init__
 
def value
 

Private Attributes

 _default
 
 _values
 

Detailed Description

Class to allow algorithm-specific values for e.g. plot bound values

Definition at line 12 of file plotting.py.

Constructor & Destructor Documentation

def plotting.AlgoOpt.__init__ (   self,
  default,
  kwargs 
)
Constructor.

Arguments:
default -- default value

Keyword arguments are treated as a dictionary where the key is a name of an algorithm, and the value is a value for that algorithm

Definition at line 14 of file plotting.py.

14 
15  def __init__(self, default, **kwargs):
16  """Constructor.
17 
18  Arguments:
19  default -- default value
20 
21  Keyword arguments are treated as a dictionary where the key is a name of an algorithm, and the value is a value for that algorithm
22  """
23  self._default = default
24  self._values = {}
25  self._values.update(kwargs)

Member Function Documentation

def plotting.AlgoOpt.value (   self,
  algo 
)
Get a value for an algorithm.

Definition at line 26 of file plotting.py.

References plotting.AlgoOpt._default, plotting.AlgoOpt._values, and Vispa.Views.PropertyView.DropDownProperty._values.

26 
27  def value(self, algo):
28  """Get a value for an algorithm."""
29  if algo in self._values:
30  return self._values[algo]
31  return self._default

Member Data Documentation

plotting.AlgoOpt._default
private

Definition at line 22 of file plotting.py.

Referenced by plotting.AlgoOpt.value().

plotting.AlgoOpt._values
private

Definition at line 23 of file plotting.py.

Referenced by plotting.AlgoOpt.value().