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

Public Member Functions

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

Public Attributes

 handle_type = getattr(GaudiKernel.GaudiHandles, self.cpp_type)
Public Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 cpp_type = cpp_type

Static Private Attributes

tuple __handled_types__

Additional Inherited Members

Protected Attributes inherited from GaudiConfig2.semantics.DefaultSemantics
 _default = value
bool _is_set = False
Protected Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 _name = None
 _cpp_type = value

Detailed Description

Semantics for GaudiHandleArrays.

Definition at line 361 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 370 of file semantics.py.

370 def __init__(self, cpp_type):
371 super().__init__(cpp_type)
372 self.handle_type = getattr(GaudiKernel.GaudiHandles, self.cpp_type)
373

Member Function Documentation

◆ merge()

GaudiConfig2.semantics.GaudiHandleArraySemantics.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 388 of file semantics.py.

388 def merge(self, b, a):
389 for comp in b:
390 try:
391 # If a component with that name exists in a, we merge it
392 a.__getitem__(comp.getName()).merge(comp)
393 except IndexError:
394 # Otherwise append it
395 a.append(comp)
396 return a
397
398
int merge(const char *target, const char *source, bool fixup=false, bool dbg=true)
Definition merge.C:417

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 383 of file semantics.py.

383 def opt_value(self, value):
384 return _GaudiHandleArrayOptionValue(
385 handle.toStringProperty() for handle in value
386 )
387

◆ store()

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

Reimplemented from GaudiConfig2.semantics.DefaultSemantics.

Definition at line 374 of file semantics.py.

374 def store(self, value):
375 # flag that the value was explicitly set (see DefaultSemantics)
376 self._is_set = True
377
378 # Create HandleArray from value if needed (it does all the type checking)
379 if not isinstance(value, self.handle_type):
380 value = self.handle_type(value)
381 return value
382

Member Data Documentation

◆ __handled_types__

tuple GaudiConfig2.semantics.GaudiHandleArraySemantics.__handled_types__
staticprivate
Initial value:
= (
"PrivateToolHandleArray",
"PublicToolHandleArray",
"ServiceHandleArray",
)

Definition at line 364 of file semantics.py.

◆ handle_type

GaudiConfig2.semantics.GaudiHandleArraySemantics.handle_type = getattr(GaudiKernel.GaudiHandles, self.cpp_type)

Definition at line 372 of file semantics.py.


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