|
| def | __init__ (self, name=Configurable.DefaultName, _enabled=True, kwargs) |
| |
| def | getGaudiType (self) |
| |
| def | getDlls (self) |
| |
| def | getHandle (self) |
| |
| def | __detach_used__ (self) |
| |
| def | propagateProperty |
| |
| def | propagateProperties |
| |
| def | __apply_configuration__ (self) |
| |
| def | applyConf (self) |
| |
| def | getUsedInstance (self, name) |
| |
| def | isApplicable (self) |
| |
| def | __new__ (cls, args, kwargs) |
| |
| def | __init__ |
| |
| def | __getstate__ (self) |
| |
| def | __getnewargs__ (self) |
| |
| def | __setstate__ (self, dict) |
| |
| def | __len__ (self) |
| |
| def | __iter__ (self) |
| |
| def | __deepcopy__ (self, memo) |
| |
| def | __iadd__ |
| |
| def | __getattr__ (self, attr) |
| |
| def | __setattr__ (self, name, value) |
| |
| def | __delattr__ (self, attr) |
| |
| def | __nonzero__ (self) |
| |
| def | remove (self, items) |
| |
| def | removeAll (self) |
| |
| def | copyChild (self, child) |
| |
| def | setParent (self, parentName) |
| |
| def | getParent (self) |
| |
| def | hasParent (self, parent) |
| |
| def | copyChildAndSetParent (self, cfg, parent) |
| |
| def | getChildren (self) |
| |
| def | getTools (self) |
| |
| def | children (self) |
| |
| def | getAllChildren (self) |
| |
| def | getSequence (self) |
| |
| def | setup (self) |
| |
| def | getProperties (self) |
| |
| def | getValuedProperties (self) |
| |
| def | properties (self) |
| |
| def | getDefaultProperties (cls) |
| |
| def | getDefaultProperty (cls, name) |
| |
| def | getProp (self, name) |
| |
| def | setProp (self, name, value) |
| |
| def | isPropertySet (self, name) |
| |
| def | getType (cls) |
| |
| def | getName (self) |
| |
| def | name (self) |
| |
| def | getJobOptName (self) |
| |
| def | isPublic (self) |
| |
| def | jobOptName (self) |
| |
| def | getFullName (self) |
| |
| def | getFullJobOptName (self) |
| |
| def | getPrintTitle (self) |
| |
| def | getTitleName (self) |
| |
| def | setDefaults (cls, handle) |
| |
| def | clone (self, name=None, kwargs) |
| |
| def | splitName (self) |
| |
| def | addTool |
| |
| def | __repr__ (self) |
| |
| def | __str__ |
| |
Definition at line 1121 of file Configurable.py.
| def GaudiKernel.Configurable.ConfigurableUser.__init__ |
( |
|
self, |
|
|
|
name = Configurable.DefaultName, |
|
|
|
_enabled = True, |
|
|
|
kwargs |
|
) |
| |
Definition at line 1138 of file Configurable.py.
1138 def __init__( self, name = Configurable.DefaultName, _enabled = True, **kwargs ):
1139 super( ConfigurableUser, self ).
__init__( name )
1140 for n, v
in kwargs.items():
1158 if type(used)
is tuple:
1159 used, used_name = used
1163 if type(used)
is str:
1164 used_class = confDbGetConfigurable(used)
1169 inst = used_class(name = used_name, _enabled =
False)
1170 except AttributeError:
1174 inst = used_class(name = used_name)
1178 if type(queried)
is str:
1179 queried = confDbGetConfigurable(queried)
1180 inst = queried(_enabled =
False)
1181 except AttributeError:
list __queried_configurables__
list of ConfigurableUser classes this one is going to query in the apply_configuration method ...
def __init__(self, name=Configurable.DefaultName, _enabled=True, kwargs)
def __addPassiveUseOf(self, other)
def _instanceName(self, cls)
list __used_configurables__
list of ConfigurableUser classes this one is going to modify in the apply_configuration method...
def __addActiveUseOf(self, other)
for detecting the default name
| def GaudiKernel.Configurable.ConfigurableUser.__addActiveUseOf |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
private |
Declare that we are going to modify the Configurable 'other' in our
__apply_configuration__.
Definition at line 1184 of file Configurable.py.
1186 Declare that we are going to modify the Configurable 'other' in our
1187 __apply_configuration__.
1189 self.__used_instances__.append(other)
1190 if hasattr(other,
"__users__"):
1191 other.__users__.append(self)
def __addActiveUseOf(self, other)
| def GaudiKernel.Configurable.ConfigurableUser.__addPassiveUseOf |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
private |
Declare that we are going to retrieve property values from the
ConfigurableUser 'other' in our __apply_configuration__.
Definition at line 1192 of file Configurable.py.
1194 Declare that we are going to retrieve property values from the
1195 ConfigurableUser 'other' in our __apply_configuration__.
1197 if not isinstance(other, ConfigurableUser):
1198 raise Error(
"'%s': Cannot make passive use of '%s', it is not a ConfigurableUser" % (self.
name(), other.name()))
1199 other.__addActiveUseOf(self)
def __addPassiveUseOf(self, other)
| def GaudiKernel.Configurable.ConfigurableUser.__apply_configuration__ |
( |
|
self | ) |
|
Function to be overridden to convert the high level configuration into a
low level one.
The default implementation calls applyConf, which is the method defined
in some ConfigurableUser implementations.
Definition at line 1276 of file Configurable.py.
1278 Function to be overridden to convert the high level configuration into a
1280 The default implementation calls applyConf, which is the method defined
1281 in some ConfigurableUser implementations.
def __apply_configuration__(self)
| def GaudiKernel.Configurable.ConfigurableUser.__detach_used__ |
( |
|
self | ) |
|
Remove this ConfigurableUser instance from the users list of the used
instances.
Definition at line 1207 of file Configurable.py.
1209 Remove this ConfigurableUser instance from the users list of the used
1213 if hasattr(used,
"__users__"):
1214 used.__users__.remove(self)
def __detach_used__(self)
| def GaudiKernel.Configurable.ConfigurableUser._instanceName |
( |
|
self, |
|
|
|
cls |
|
) |
| |
|
private |
Function used to define the name of the private instance of a given class
name.
This method is used when the __used_configurables_property__ declares the
need of a private used configurable without specifying the name.
Definition at line 1292 of file Configurable.py.
1294 Function used to define the name of the private instance of a given class
1296 This method is used when the __used_configurables_property__ declares the
1297 need of a private used configurable without specifying the name.
1299 if type(cls)
is str:
1302 clName = cls.__name__
1303 return "%s_%s" % (self.
name(), clName)
def _instanceName(self, cls)
| def GaudiKernel.Configurable.ConfigurableUser.applyConf |
( |
|
self | ) |
|
Function to be overridden to convert the high level configuration into a
low level one.
Definition at line 1285 of file Configurable.py.
1287 Function to be overridden to convert the high level configuration into a
| def GaudiKernel.Configurable.ConfigurableUser.getDlls |
( |
|
self | ) |
|
| def GaudiKernel.Configurable.ConfigurableUser.getGaudiType |
( |
|
self | ) |
|
| def GaudiKernel.Configurable.ConfigurableUser.getHandle |
( |
|
self | ) |
|
| def GaudiKernel.Configurable.ConfigurableUser.getUsedInstance |
( |
|
self, |
|
|
|
name |
|
) |
| |
Return the used instance with a given name.
Definition at line 1305 of file Configurable.py.
1307 Return the used instance with a given name.
1310 if i.name() == name:
1311 if hasattr(i,
"_enabled"):
1316 raise KeyError(name)
def getUsedInstance(self, name)
| def GaudiKernel.Configurable.ConfigurableUser.isApplicable |
( |
|
self | ) |
|
Return True is the instance can be "applied".
Definition at line 1318 of file Configurable.py.
1320 Return True is the instance can be "applied".
| def GaudiKernel.Configurable.ConfigurableUser.propagateProperties |
( |
|
self, |
|
|
|
names = None, |
|
|
|
others = None, |
|
|
|
force = True |
|
) |
| |
Call propagateProperty for each property listed in 'names'.
If 'names' is None, all the properties are propagated.
Definition at line 1265 of file Configurable.py.
1267 Call propagateProperty for each property listed in 'names'.
1268 If 'names' is None, all the properties are propagated.
1272 names = [ p
for p
in self.
__slots__ if not p.startswith(
"_") ]
| def GaudiKernel.Configurable.ConfigurableUser.propagateProperty |
( |
|
self, |
|
|
|
name, |
|
|
|
others = None, |
|
|
|
force = True |
|
) |
| |
Propagate the property 'name' (if set) to other configurables (if possible).
'others' can be:
None:
propagate to all the entries in __used_configurables__
a configurable instance:
propagate only to it
list of configurable instances:
propagate to all of them.
The logic is:
- if the local property is set, the other property will be overwritten
- local property not set and other set => keep other
- local property not set and other not set => overwrite the default for
ConfigurableUser instances and set the property for Configurables
Definition at line 1216 of file Configurable.py.
1218 Propagate the property 'name' (if set) to other configurables (if possible).
1221 propagate to all the entries in __used_configurables__
1222 a configurable instance:
1223 propagate only to it
1224 list of configurable instances:
1225 propagate to all of them.
1229 - if the local property is set, the other property will be overwritten
1230 - local property not set and other set => keep other
1231 - local property not set and other not set => overwrite the default for
1232 ConfigurableUser instances and set the property for Configurables
1237 elif type(others)
not in [ list, tuple ] :
1243 for other
in [ o
for o
in others
if name
in o.__slots__ ]:
1246 if other.isPropertySet(name):
1247 log.warning(
"Property '%(prop)s' is set in both '%(self)s' and '%(other)s', using '%(self)s.%(prop)s'"%
1248 {
"self": self.
name(),
1249 "other": other.name(),
1251 other.setProp(name, value)
1253 elif not other.isPropertySet(name):
1254 if isinstance(other,ConfigurableUser):
1255 otherType =
type(other._properties[name].getDefault())
1256 other._properties[name].setDefault(value)
1257 if otherType
in [list, dict]:
1260 other.setProp(name, otherType(value))
1262 other.setProp(name, value)
def isPropertySet(self, name)
| list GaudiKernel.Configurable.ConfigurableUser.__queried_configurables__ = [] |
|
staticprivate |
| dictionary GaudiKernel.Configurable.ConfigurableUser.__slots__ |
|
staticprivate |
| list GaudiKernel.Configurable.ConfigurableUser.__used_configurables__ = [] |
|
staticprivate |
list of ConfigurableUser classes this one is going to modify in the apply_configuration method.
The list may contain class objects, strings representing class objects or tuples with the class object (or a string) as first element and the instance name as second element. If the instance name is None or not present, the function instanceName() is used to determine the name of the instance (the default implementation returns "<this name></em><other name>".
Definition at line 1134 of file Configurable.py.
| GaudiKernel.Configurable.ConfigurableUser.__used_instances__ |
|
private |
| GaudiKernel.Configurable.ConfigurableUser.__users__ |
|
private |
| GaudiKernel.Configurable.ConfigurableUser._applied |
|
private |
| GaudiKernel.Configurable.ConfigurableUser._enabled |
|
private |
The documentation for this class was generated from the following file: