The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
GaudiConfig2.semantics.DataHandleVectorSemantics Class Reference
Inheritance diagram for GaudiConfig2.semantics.DataHandleVectorSemantics:
Collaboration diagram for GaudiConfig2.semantics.DataHandleVectorSemantics:

Public Member Functions

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

Static Private Attributes

tuple __handled_types__

Additional Inherited Members

Public Attributes inherited from GaudiConfig2.semantics.SequenceSemantics
 value_semantics
Public Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 cpp_type = cpp_type
Protected Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 _name = None
 _cpp_type = value

Detailed Description

Sequence semantics whose elements are data handles.

Definition at line 551 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

GaudiConfig2.semantics.DataHandleVectorSemantics.__init__ ( self,
cpp_type )

Definition at line 558 of file semantics.py.

558 def __init__(self, cpp_type):
559 if not self.__handled_types__[0].match(cpp_type):
560 raise TypeError(f"C++ type {cpp_type!r} not supported")
561 handle_type, value_type = extract_template_args(cpp_type)
562 super().__init__(
563 cpp_type, valueSem=DataHandleSemantics(f"{handle_type}<{value_type}>")
564 )
565

Member Function Documentation

◆ default()

GaudiConfig2.semantics.DataHandleVectorSemantics.default ( self,
value )

Reimplemented from GaudiConfig2.semantics.SequenceSemantics.

Definition at line 577 of file semantics.py.

577 def default(self, value):
578 return self.store(value)
579

◆ merge()

GaudiConfig2.semantics.DataHandleVectorSemantics.merge ( self,
a,
b )
"Merge" two values.

Used when merging two Configurable instances, by default just ensure
the two values do not conflict, but it can be overridden in
derived semantics to, for example, append to the two lists.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 583 of file semantics.py.

583 def merge(self, b, a):
584 paths = a.paths()
585 for handle in b:
586 path = self.value_semantics.store(handle).Path
587 if path not in paths:
588 paths.append(path)
589 return a
590
591
int merge(const char *target, const char *source, bool fixup=false, bool dbg=true)
Definition merge.C:417

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.SequenceSemantics.

Definition at line 580 of file semantics.py.

580 def opt_value(self, value):
581 return value.paths()
582

◆ store()

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

Reimplemented from GaudiConfig2.semantics.SequenceSemantics.

Definition at line 566 of file semantics.py.

566 def store(self, value):
567 if isinstance(value, DataHandleVector):
568 value = value.paths()
569 handles = super().store(value)
570 return DataHandleVector(
571 [handle.Path for handle in handles],
572 self.value_semantics._mode,
573 self.value_semantics._type,
574 self.value_semantics._isCond,
575 )
576

Member Data Documentation

◆ __handled_types__

tuple GaudiConfig2.semantics.DataHandleVectorSemantics.__handled_types__
staticprivate
Initial value:
= (
re.compile(r"Gaudi::DataHandleVector<DataObject(Read|Write)Handle,.*>$"),
)

Definition at line 554 of file semantics.py.


The documentation for this class was generated from the following file: