The Gaudi Framework  master (37c0b60a)
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 344 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 347 of file semantics.py.

347  def __init__(self, cpp_type, valueSem=None):
348  super(SequenceSemantics, self).__init__(cpp_type)
349  self.value_semantics = valueSem or getSemanticsFor(
350  list(extract_template_args(cpp_type))[0]
351  )
352 

Member Function Documentation

◆ default()

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

Definition at line 373 of file semantics.py.

373  def default(self, value):
374  new_value = _ListHelper(self.value_semantics)
375  new_value.default = value
376  return new_value
377 

◆ name() [1/2]

def GaudiConfig2.semantics.SequenceSemantics.name (   self)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 354 of file semantics.py.

354  def name(self):
355  return self._name
356 

◆ name() [2/2]

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 358 of file semantics.py.

358  def name(self, value):
359  self._name = value
360  self.value_semantics.name = "{} element".format(self._name)
361 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 378 of file semantics.py.

378  def opt_value(self, value):
379  """
380  Option string version of value.
381  """
382  if not isinstance(value, _ListHelper):
383  value = self.default(value)
384  return value.opt_value()
385 
386 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 362 of file semantics.py.

362  def store(self, value):
363  if not isinstance(value, (list, _ListHelper, tuple)):
364  raise TypeError(
365  "list or tuple expected, got {!r} in assignment to {}".format(
366  value, self.name
367  )
368  )
369  new_value = _ListHelper(self.value_semantics)
370  new_value.extend(value)
371  return new_value
372 

Member Data Documentation

◆ __handled_types__

GaudiConfig2.semantics.SequenceSemantics.__handled_types__
staticprivate

Definition at line 345 of file semantics.py.

◆ _name

GaudiConfig2.semantics.SequenceSemantics._name
private

Definition at line 359 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.SequenceSemantics.value_semantics

Definition at line 349 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:636
GaudiConfig2.semantics.extract_template_args
def extract_template_args(cpp_type)
Definition: semantics.py:268
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