|  | 
| def | __init__ (self, name=Configurable.DefaultName, _enabled=True, **kwargs) | 
|  | 
| def | getGaudiType (cls) | 
|  | 
| def | getDlls (self) | 
|  | 
| def | getHandle (self) | 
|  | 
| def | __detach_used__ (self) | 
|  | 
| def | propagateProperty (self, name, others=None, force=True) | 
|  | 
| def | propagateProperties (self, names=None, others=None, force=True) | 
|  | 
| def | __apply_configuration__ (self) | 
|  | 
| def | applyConf (self) | 
|  | 
| def | getUsedInstance (self, name) | 
|  | 
| def | isApplicable (self) | 
|  | 
| def | __new__ (cls, *args, **kwargs) | 
|  | 
| def | __init__ (self, name=DefaultName) | 
|  | 
| def | __getstate__ (self) | 
|  | 
| def | __getnewargs__ (self) | 
|  | 
| def | __setstate__ (self, dict) | 
|  | 
| def | __len__ (self) | 
|  | 
| def | __iter__ (self) | 
|  | 
| def | __deepcopy__ (self, memo) | 
|  | 
| def | __iadd__ (self, configs, descr=None) | 
|  | 
| def | __getattr__ (self, attr) | 
|  | 
| def | __setattr__ (self, name, value) | 
|  | 
| def | __delattr__ (self, attr) | 
|  | 
| def | __bool__ (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 (self, tool, name=None) | 
|  | 
| def | __repr__ (self) | 
|  | 
| def | __str__ (self, indent=0, headerLastIndentUnit=indentUnit) | 
|  | 
| def | __new__ (self, name, bases, dct) | 
|  | 
| def | __call__ (cls, *args, **kwargs) | 
|  | 
Definition at line 1347 of file Configurable.py.
 
◆ __init__()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.__init__ | ( |  | self, | 
        
          |  |  |  | name = Configurable.DefaultName, | 
        
          |  |  |  | _enabled = True, | 
        
          |  |  | ** | kwargs | 
        
          |  | ) |  |  | 
      
 
Definition at line 1367 of file Configurable.py.
 1367     def __init__(self, name=Configurable.DefaultName, _enabled=True, **kwargs):
 
 1368         super(ConfigurableUser, self).__init__(name)
 
 1369         for n, v 
in kwargs.items():
 
 1371         self._enabled = _enabled
 
 1373         self._applied = 
False 
 1381         self.__used_instances__ = []
 
 1382         for used 
in self.__used_configurables__:
 
 1385             used_name = Configurable.DefaultName
 
 1387             if type(used) 
is tuple:
 
 1388                 used, used_name = used  
 
 1390                     used_name = self._instanceName(used)
 
 1392             if type(used) 
is str:
 
 1393                 used_class = confDbGetConfigurable(used)
 
 1398                 inst = used_class(name=used_name, _enabled=
False)
 
 1399             except AttributeError:
 
 1403                 inst = used_class(name=used_name)
 
 1404             self.__addActiveUseOf(inst)
 
 1405         for queried 
in self.__queried_configurables__:
 
 1407                 if type(queried) 
is str:
 
 1408                     queried = confDbGetConfigurable(queried)
 
 1409                 inst = queried(_enabled=
False)
 
 1410             except AttributeError:
 
 1412             self.__addPassiveUseOf(inst)
 
 
 
◆ __addActiveUseOf()
  
  | 
        
          | 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 1414 of file Configurable.py.
 1414     def __addActiveUseOf(self, other):
 
 1416         Declare that we are going to modify the Configurable 'other' in our 
 1417         __apply_configuration__. 
 1419         self.__used_instances__.append(other)
 
 1420         if hasattr(other, 
"__users__"):  
 
 1421             other.__users__.append(self)
 
 
 
◆ __addPassiveUseOf()
  
  | 
        
          | 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 1423 of file Configurable.py.
 1423     def __addPassiveUseOf(self, other):
 
 1425         Declare that we are going to retrieve property values from the 
 1426         ConfigurableUser 'other' in our __apply_configuration__. 
 1428         if not isinstance(other, ConfigurableUser):
 
 1430                 "'%s': Cannot make passive use of '%s', it is not a ConfigurableUser" 
 1431                 % (self.name(), other.name())
 
 1433         other.__addActiveUseOf(self)
 
 
 
◆ __apply_configuration__()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.__apply_configuration__ | ( |  | self | ) |  | 
      
 
 
◆ __detach_used__()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.__detach_used__ | ( |  | self | ) |  | 
      
 
Remove this ConfigurableUser instance from the users list of the used
instances.
 
Definition at line 1445 of file Configurable.py.
 1445     def __detach_used__(self):
 
 1447         Remove this ConfigurableUser instance from the users list of the used 
 1450         for used 
in self.__used_instances__:
 
 1451             if hasattr(used, 
"__users__"):  
 
 1452                 used.__users__.remove(self)
 
 
 
◆ _instanceName()
  
  | 
        
          | 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 1530 of file Configurable.py.
 1530     def _instanceName(self, cls):
 
 1532         Function used to define the name of the private instance of a given class 
 1534         This method is used when the __used_configurables_property__ declares the 
 1535         need of a private used configurable without specifying the name. 
 1537         if type(cls) 
is str:
 
 1540             clName = cls.__name__
 
 1541         return "%s_%s" % (self.name(), clName)
 
 
 
◆ applyConf()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.applyConf | ( |  | self | ) |  | 
      
 
Function to be overridden to convert the high level configuration into a
low level one.
 
Definition at line 1523 of file Configurable.py.
 1523     def applyConf(self):
 
 1525         Function to be overridden to convert the high level configuration into a 
 
 
◆ getDlls()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.getDlls | ( |  | self | ) |  | 
      
 
 
◆ getGaudiType()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.getGaudiType | ( |  | cls | ) |  | 
      
 
 
◆ getHandle()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.getHandle | ( |  | self | ) |  | 
      
 
 
◆ getUsedInstance()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.getUsedInstance | ( |  | self, | 
        
          |  |  |  | name | 
        
          |  | ) |  |  | 
      
 
Return the used instance with a given name.
 
Definition at line 1543 of file Configurable.py.
 1543     def getUsedInstance(self, name):
 
 1545         Return the used instance with a given name. 
 1547         for i 
in self.__used_instances__:
 
 1548             if i.name() == name:
 
 1549                 if hasattr(i, 
"_enabled"):
 
 1554         raise KeyError(name)
 
 
 
◆ isApplicable()
      
        
          | def GaudiKernel.Configurable.ConfigurableUser.isApplicable | ( |  | self | ) |  | 
      
 
Return True is the instance can be "applied".
 
Reimplemented from GaudiKernel.Configurable.Configurable.
Definition at line 1556 of file Configurable.py.
 1556     def isApplicable(self):
 
 1558         Return True is the instance can be "applied". 
 1560         return (
not self.__users__) 
and (
not self._applied)
 
 
 
◆ propagateProperties()
      
        
          | 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 1503 of file Configurable.py.
 1503     def propagateProperties(self, names=None, others=None, force=True):
 
 1505         Call propagateProperty for each property listed in 'names'. 
 1506         If 'names' is None, all the properties are propagated. 
 1510             names = [p 
for p 
in self.__slots__ 
if not p.startswith(
"_")]
 
 1512             self.propagateProperty(n, others, force)
 
 
 
◆ propagateProperty()
      
        
          | 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 1454 of file Configurable.py.
 1454     def propagateProperty(self, name, others=None, force=True):
 
 1456         Propagate the property 'name' (if set) to other configurables (if possible). 
 1459                 propagate to all the entries in __used_configurables__ 
 1460             a configurable instance: 
 1461                 propagate only to it 
 1462             list of configurable instances: 
 1463                 propagate to all of them. 
 1467         - if the local property is set, the other property will be overwritten 
 1468         - local property not set and other set => keep other 
 1469         - local property not set and other not set => overwrite the default for 
 1470             ConfigurableUser instances and set the property for Configurables 
 1474             others = self.__used_instances__
 
 1475         elif type(others) 
not in [list, tuple]:
 
 1478         local_is_set = self.isPropertySet(name)
 
 1479         value = self.getProp(name)
 
 1481         for other 
in [o 
for o 
in others 
if name 
in o.__slots__]:
 
 1484                 if other.isPropertySet(name):
 
 1486                         "Property '%(prop)s' is set in both '%(self)s' and '%(other)s', using '%(self)s.%(prop)s'" 
 1487                         % {
"self": self.name(), 
"other": other.name(), 
"prop": name}
 
 1489                 other.setProp(name, value)
 
 1491             elif not other.isPropertySet(name):
 
 1492                 if isinstance(other, ConfigurableUser):
 
 1493                     otherType = 
type(other._properties[name].getDefault())
 
 1494                     other._properties[name].setDefault(value)
 
 1495                     if otherType 
in [list, dict]:
 
 1498                         other.setProp(name, otherType(value))
 
 1500                     other.setProp(name, value)
 
 
 
◆ __queried_configurables__
  
  | 
        
          | list GaudiKernel.Configurable.ConfigurableUser.__queried_configurables__ = [] |  | staticprivate | 
 
 
◆ __slots__
  
  | 
        
          | dictionary GaudiKernel.Configurable.ConfigurableUser.__slots__ |  | staticprivate | 
 
Initial value:=  {
        "__users__": [],
        "__used_instances__": [],
        "_enabled": True,
        "_applied": False,
    }
Definition at line 1348 of file Configurable.py.
 
 
◆ __used_configurables__
  
  | 
        
          | list GaudiKernel.Configurable.ConfigurableUser.__used_configurables__ = [] |  | staticprivate | 
 
 
◆ __used_instances__
  
  | 
        
          | GaudiKernel.Configurable.ConfigurableUser.__used_instances__ |  | private | 
 
 
◆ __users__
  
  | 
        
          | GaudiKernel.Configurable.ConfigurableUser.__users__ |  | private | 
 
 
◆ _applied
  
  | 
        
          | GaudiKernel.Configurable.ConfigurableUser._applied |  | private | 
 
 
◆ _enabled
  
  | 
        
          | GaudiKernel.Configurable.ConfigurableUser._enabled |  | private | 
 
 
The documentation for this class was generated from the following file: