|
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 | getPropertiesWithDescription (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 1134 of file Configurable.py.
def GaudiKernel.Configurable.ConfigurableUser.__init__ |
( |
|
self, |
|
|
|
name = Configurable.DefaultName , |
|
|
|
_enabled = True , |
|
|
|
kwargs |
|
) |
| |
Definition at line 1151 of file Configurable.py.
1151 def __init__( self, name = Configurable.DefaultName, _enabled = True, **kwargs ):
1152 super( ConfigurableUser, self ).
__init__( name )
1153 for n, v
in kwargs.items():
1171 if type(used)
is tuple:
1172 used, used_name = used
1176 if type(used)
is str:
1177 used_class = confDbGetConfigurable(used)
1182 inst = used_class(name = used_name, _enabled =
False)
1183 except AttributeError:
1187 inst = used_class(name = used_name)
1191 if type(queried)
is str:
1192 queried = confDbGetConfigurable(used)
1193 inst = queried(_enabled =
False)
1194 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 1197 of file Configurable.py.
1199 Declare that we are going to modify the Configurable 'other' in our
1200 __apply_configuration__.
1202 self.__used_instances__.append(other)
1203 if hasattr(other,
"__users__"):
1204 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 1205 of file Configurable.py.
1207 Declare that we are going to retrieve property values from the
1208 ConfigurableUser 'other' in our __apply_configuration__.
1210 if not isinstance(other, ConfigurableUser):
1211 raise Error(
"'%s': Cannot make passive use of '%s', it is not a ConfigurableUser" % (self.
name(), other.name()))
1212 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 1289 of file Configurable.py.
1291 Function to be overridden to convert the high level configuration into a
1293 The default implementation calls applyConf, which is the method defined
1294 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 1220 of file Configurable.py.
1222 Remove this ConfigurableUser instance from the users list of the used
1226 if hasattr(used,
"__users__"):
1227 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 1305 of file Configurable.py.
1307 Function used to define the name of the private instance of a given class
1309 This method is used when the __used_configurables_property__ declares the
1310 need of a private used configurable without specifying the name.
1312 if type(cls)
is str:
1315 clName = cls.__name__
1316 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 1298 of file Configurable.py.
1300 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 1318 of file Configurable.py.
1320 Return the used instance with a given name.
1323 if i.name() == name:
1324 if hasattr(i,
"_enabled"):
1329 raise KeyError(name)
def getUsedInstance(self, name)
def GaudiKernel.Configurable.ConfigurableUser.isApplicable |
( |
|
self | ) |
|
Return True is the instance can be "applied".
Definition at line 1331 of file Configurable.py.
1333 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 1278 of file Configurable.py.
1280 Call propagateProperty for each property listed in 'names'.
1281 If 'names' is None, all the properties are propagated.
1285 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 1229 of file Configurable.py.
1231 Propagate the property 'name' (if set) to other configurables (if possible).
1234 propagate to all the entries in __used_configurables__
1235 a configurable instance:
1236 propagate only to it
1237 list of configurable instances:
1238 propagate to all of them.
1242 - if the local property is set, the other property will be overwritten
1243 - local property not set and other set => keep other
1244 - local property not set and other not set => overwrite the default for
1245 ConfigurableUser instances and set the property for Configurables
1250 elif type(others)
not in [ list, tuple ] :
1256 for other
in [ o
for o
in others
if name
in o.__slots__ ]:
1259 if other.isPropertySet(name):
1260 log.warning(
"Property '%(prop)s' is set in both '%(self)s' and '%(other)s', using '%(self)s.%(prop)s'"%
1261 {
"self": self.
name(),
1262 "other": other.name(),
1264 other.setProp(name, value)
1266 elif not other.isPropertySet(name):
1267 if isinstance(other,ConfigurableUser):
1268 otherType =
type(other._properties[name].getDefault())
1269 other._properties[name].setDefault(value)
1270 if otherType
in [list, dict]:
1273 other.setProp(name, otherType(value))
1275 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 1147 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: