|
| | _type = next(GaudiConfig2.semantics.extract_template_args(cpp_type)) |
| str | _isCond = 'CondHandle' in cpp_type |
| str | _mode = "R" |
Semantics for all data handle keys (Read, Write, Decor, Cond).
Definition at line 8 of file AtlasSemantics.py.
◆ __init__()
| python.AtlasSemantics.VarHandleKeySemantics.__init__ |
( |
| self, |
|
|
| cpp_type ) |
Definition at line 14 of file AtlasSemantics.py.
14 def __init__(self, cpp_type):
15 super().__init__(cpp_type)
16
17 self._type = next(GaudiConfig2.semantics.extract_template_args(cpp_type))
18 self._isCond = 'CondHandle' in cpp_type
19
20 if cpp_type.startswith("SG::Read"):
21 self._mode = "R"
22 elif cpp_type.startswith("SG::Write"):
23 self._mode = "W"
24 else:
25 raise TypeError(f"C++ type {cpp_type} not supported")
26
◆ store()
| python.AtlasSemantics.VarHandleKeySemantics.store |
( |
| self, |
|
|
| value ) |
Definition at line 27 of file AtlasSemantics.py.
27 def store(self, value):
28 if isinstance(value, DataHandle):
29 v = value.Path
30 elif isinstance(value, str):
31 v = value
32 else:
33 raise TypeError(f"cannot assign {value!r} ({type(value)}) to {self.name}"
34 ", expected string or DataHandle")
35 return DataHandle(v, self._mode, self._type, self._isCond)
36
37
an iterator over instances of a given type in StoreGateSvc.
◆ __handled_types__
| tuple python.AtlasSemantics.VarHandleKeySemantics.__handled_types__ = (re.compile(r"SG::.*HandleKey<.*>$"),) |
|
staticprivate |
◆ _isCond
| python.AtlasSemantics.VarHandleKeySemantics._isCond = 'CondHandle' in cpp_type |
|
protected |
◆ _mode
| python.AtlasSemantics.VarHandleKeySemantics._mode = "R" |
|
protected |
◆ _type
| python.AtlasSemantics.VarHandleKeySemantics._type = next(GaudiConfig2.semantics.extract_template_args(cpp_type)) |
|
protected |
The documentation for this class was generated from the following file: