The Gaudi Framework  master (a6dcad88)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GaudiConfig2.semantics.SequenceSemantics Class Reference
Inheritance diagram for GaudiConfig2.semantics.SequenceSemantics:
Collaboration diagram for GaudiConfig2.semantics.SequenceSemantics:

Public Member Functions

def __init__ (self, cpp_type, valueSem=None)
 
def name (self)
 
def name (self, value)
 
def store (self, value)
 
def default (self, value)
 
def opt_value (self, value)
 
- Public Member Functions inherited from GaudiConfig2.semantics.PropertySemantics
def __init__ (self, cpp_type)
 
def cpp_type (self)
 
def cpp_type (self, value)
 
def load (self, value)
 
def is_set (self, value)
 
def merge (self, a, b)
 

Public Attributes

 value_semantics
 
- Public Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 cpp_type
 

Private Attributes

 _name
 

Static Private Attributes

 __handled_types__
 

Detailed Description

Definition at line 427 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

def GaudiConfig2.semantics.SequenceSemantics.__init__ (   self,
  cpp_type,
  valueSem = None 
)

Definition at line 430 of file semantics.py.

430  def __init__(self, cpp_type, valueSem=None):
431  super(SequenceSemantics, self).__init__(cpp_type)
432  self.value_semantics = valueSem or getSemanticsFor(
433  list(extract_template_args(cpp_type))[0]
434  )
435 

Member Function Documentation

◆ default()

def GaudiConfig2.semantics.SequenceSemantics.default (   self,
  value 
)

Definition at line 456 of file semantics.py.

456  def default(self, value):
457  new_value = _ListHelper(self.value_semantics)
458  new_value.default = value
459  return new_value
460 

◆ name() [1/2]

def GaudiConfig2.semantics.SequenceSemantics.name (   self)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 437 of file semantics.py.

437  def name(self):
438  return self._name
439 

◆ name() [2/2]

def GaudiConfig2.semantics.SequenceSemantics.name (   self,
  value 
)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 441 of file semantics.py.

441  def name(self, value):
442  self._name = value
443  self.value_semantics.name = "{} element".format(self._name)
444 

◆ opt_value()

def GaudiConfig2.semantics.SequenceSemantics.opt_value (   self,
  value 
)
Option string version of value.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 461 of file semantics.py.

461  def opt_value(self, value):
462  """
463  Option string version of value.
464  """
465  if not isinstance(value, _ListHelper):
466  value = self.default(value)
467  return value.opt_value()
468 
469 

◆ store()

def GaudiConfig2.semantics.SequenceSemantics.store (   self,
  value 
)
Validation/transformation of the data to be stored.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 445 of file semantics.py.

445  def store(self, value):
446  if not isinstance(value, (list, _ListHelper, tuple)):
447  raise TypeError(
448  "list or tuple expected, got {!r} in assignment to {}".format(
449  value, self.name
450  )
451  )
452  new_value = _ListHelper(self.value_semantics)
453  new_value.extend(value)
454  return new_value
455 

Member Data Documentation

◆ __handled_types__

GaudiConfig2.semantics.SequenceSemantics.__handled_types__
staticprivate

Definition at line 428 of file semantics.py.

◆ _name

GaudiConfig2.semantics.SequenceSemantics._name
private

Definition at line 442 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.SequenceSemantics.value_semantics

Definition at line 432 of file semantics.py.


The documentation for this class was generated from the following file:
GaudiConfig2.semantics.getSemanticsFor
def getSemanticsFor(cpp_type)
Definition: semantics.py:719
GaudiConfig2.semantics.extract_template_args
def extract_template_args(cpp_type)
Definition: semantics.py:351
gaudirun.default
default
Definition: gaudirun.py:188
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77