|
| def | __init__ (self, cpp_type, name=None) |
| |
| def | store (self, value) |
| |
| def | default (self, value) |
| |
| def | cpp_type (self) |
| |
| def | cpp_type (self, value) |
| |
| def | load (self, value) |
| |
| def | is_set (self, value) |
| |
| def | opt_value (self, value) |
| |
| def | merge (self, a, b) |
| |
Definition at line 157 of file semantics.py.
◆ __init__()
| def GaudiConfig2.semantics.ComponentSemantics.__init__ |
( |
|
self, |
|
|
|
cpp_type, |
|
|
|
name = None |
|
) |
| |
Reimplemented from GaudiConfig2.semantics.PropertySemantics.
Definition at line 162 of file semantics.py.
162 def __init__(self, cpp_type, name=None):
163 super(ComponentSemantics, self).__init__(cpp_type, name)
164 self.interfaces = cpp_type.split(
':')
165 self.cpp_type = self.interfaces.pop(0)
166 self.interfaces = set(self.interfaces)
◆ default()
| def GaudiConfig2.semantics.ComponentSemantics.default |
( |
|
self, |
|
|
|
value |
|
) |
| |
◆ store()
| def GaudiConfig2.semantics.ComponentSemantics.store |
( |
|
self, |
|
|
|
value |
|
) |
| |
Validation/transformation of the data to be stored.
Reimplemented from GaudiConfig2.semantics.PropertySemantics.
Definition at line 168 of file semantics.py.
168 def store(self, value):
169 from .
import Configurable, Configurables
170 if isinstance(value, Configurable):
172 elif isinstance(value, basestring):
174 if value
in Configurable.instances:
175 value = Configurable.instances[value]
179 t, n = value.split(
'/')
182 value = Configurables.getByType(t).getInstance(n)
185 'cannot assign {!r} to {!r}, requested string or {!r}'.
format(
186 value, self.name, self.cpp_type))
187 if value.__component_type__ != self.cpp_type:
189 'wrong type for {!r}: expected {!r}, got {!r}'.
format(
190 self.name, self.cpp_type, value.__component_type__))
193 if value.__interfaces__:
194 if not self.interfaces.issubset(value.__interfaces__):
196 'wrong interfaces for {!r}: required {}'.
format(
197 self.name, list(self.interfaces)))
198 except AttributeError:
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
◆ __handled_types__
| tuple GaudiConfig2.semantics.ComponentSemantics.__handled_types__ |
|
staticprivate |
Initial value:= ('Algorithm', 'Auditor',
re.compile(r'AlgTool(:I[a-zA-Z0-9_]*)*$'),
re.compile(r'Service(:I[a-zA-Z0-9_]*)*$'))
Definition at line 158 of file semantics.py.
◆ cpp_type
| GaudiConfig2.semantics.ComponentSemantics.cpp_type |
◆ interfaces
| GaudiConfig2.semantics.ComponentSemantics.interfaces |
The documentation for this class was generated from the following file: