|
| | __init__ (self, cpp_type) |
| |
| | store (self, value) |
| |
| | __init__ (self, cpp_type) |
| |
| | name (self) |
| |
| | name (self, value) |
| |
| | cpp_type (self) |
| |
| | cpp_type (self, value) |
| |
| | load (self, value) |
| |
| | is_set (self, value) |
| |
| | opt_value (self, value) |
| |
| | merge (self, a, b) |
| |
Semantics for data handles.
Definition at line 352 of file semantics.py.
◆ __init__()
| GaudiConfig2.semantics.DataHandleSemantics.__init__ |
( |
| self, |
|
|
| cpp_type ) |
Definition at line 359 of file semantics.py.
359 def __init__(self, cpp_type):
360 super().__init__(cpp_type)
361 self._type = next(extract_template_args(cpp_type))
362 self._isCond = False
363
364 if cpp_type.startswith("DataObjectReadHandle"):
365 self._mode = "R"
366 elif cpp_type.startswith("DataObjectWriteHandle"):
367 self._mode = "W"
368 else:
369 raise TypeError(f"C++ type {cpp_type} not supported")
370
◆ store()
| GaudiConfig2.semantics.DataHandleSemantics.store |
( |
| self, |
|
|
| value ) |
Validation/transformation of the data to be stored.
Reimplemented from GaudiConfig2.semantics.PropertySemantics.
Definition at line 371 of file semantics.py.
371 def store(self, value):
372 if isinstance(value, DataHandle):
373 v = value.Path
374 elif isinstance(value, str):
375 v = value
376 else:
377 raise TypeError(
378 f"cannot assign {value!r} ({type(value)}) to {self.name}"
379 ", expected string or DataHandle"
380 )
381 return DataHandle(v, self._mode, self._type, self._isCond)
382
383
◆ __handled_types__
| tuple GaudiConfig2.semantics.DataHandleSemantics.__handled_types__ = (re.compile(r"DataObject(Read|Write)Handle<.*>$"),) |
|
staticprivate |
◆ _isCond
| GaudiConfig2.semantics.DataHandleSemantics._isCond = False |
|
protected |
◆ _mode
| GaudiConfig2.semantics.DataHandleSemantics._mode = "R" |
|
protected |
◆ _type
The documentation for this class was generated from the following file: