| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | Static Private Attributes | List of all members
GaudiKernel.Configurable.ConfigurableAlgTool Class Reference
Inheritance diagram for GaudiKernel.Configurable.ConfigurableAlgTool:
[legend]
Collaboration diagram for GaudiKernel.Configurable.ConfigurableAlgTool:
[legend]

## Public Member Functions
def | __init__ (self, name=Configurable.DefaultName)
def | getHandle (self)
def | getGaudiType (cls)
def | getGaudiHandle (self)
def | getPrintTitle (self)
def | setParent (self, parentName)
def | getParent (self)
def | hasParent (self, parent)
def | getJobOptName (self)
def | isPublic (self)
def | isInToolSvc (self)
def | toStringProperty (self)
def | getFullName (self)
Public Member Functions inherited from GaudiKernel.Configurable.Configurable
def | __new__ (cls, *args, **kwargs)
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 | __nonzero__ (self)
def | remove (self, items)
def | removeAll (self)
def | copyChild (self, child)
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 | jobOptName (self)
def | getFullJobOptName (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)

## Private Attributes
| _name
| _jobOptName

## Static Private Attributes
dictionary | __slots__

## Additional Inherited Members
Static Public Attributes inherited from GaudiKernel.Configurable.Configurable
| propertyNoValue
string | indentUnit = '| '
int | printHeaderWidth = 100
int | printHeaderPre = 5
dictionary | allConfigurables
dictionary | configurableServices

## Detailed Description

Definition at line 1158 of file Configurable.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiKernel.Configurable.ConfigurableAlgTool.__init__ | ( |  | self,
|  |  | name = `Configurable.DefaultName`
| ) |  |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1167 of file Configurable.py.

1167 def __init__(self, name=Configurable.DefaultName):
1168 super(ConfigurableAlgTool, self).__init__(name)
1169 if '.' not in self._name:
1170 # Public tools must have ToolSvc as parent
1171 self._name = "ToolSvc." + self._name
1172 name = self.getName()
1173 name = name[name.find('/') + 1:] # strips class, if any
1174 self._jobOptName = name
1175

## Member Function Documentation

## ◆ getFullName()

def GaudiKernel.Configurable.ConfigurableAlgTool.getFullName | ( |  | self | ) |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1235 of file Configurable.py.

1235 def getFullName(self):
1236 # for Tools, the "full name" means "Type/LocalName",
1237 # without the names of the parents
1238 name = self.getName()
1239 # strip off everything before the last '.'
1240 name = name[name.rfind('.') + 1:]
1241 return str(self.getType() + '/' + name)
1242
1243
1244 # FIXME: this is just a placeholder, waiting for a real implementation
1245 # It is sufficient to get us going... (and import a PkgConf which
1246 # happens to contain an Auditor...)

## ◆ getGaudiHandle()

def GaudiKernel.Configurable.ConfigurableAlgTool.getGaudiHandle | ( |  | self | ) |

Definition at line 1184 of file Configurable.py.

1184 def getGaudiHandle(self):
1185 if self.isPublic():
1186 return PublicToolHandle(self.toStringProperty())
1187 else:
1188 return PrivateToolHandle(self.toStringProperty())
1189
PublicToolHandle
Helper class to construct ToolHandle instances for public tools via the auto registering constructor.
Definition: ToolHandle.h:308

## ◆ getGaudiType()

def GaudiKernel.Configurable.ConfigurableAlgTool.getGaudiType | ( |  | cls | ) |

Definition at line 1181 of file Configurable.py.

1181 def getGaudiType(cls):
1182 return 'AlgTool'
1183

## ◆ getHandle()

def GaudiKernel.Configurable.ConfigurableAlgTool.getHandle | ( |  | self | ) |

Definition at line 1176 of file Configurable.py.

1176 def getHandle(self):
1177 # iAlgTool isn't useful, unless one knows for sure that the tool exists
1178 return iProperty(self.getJobOptName())
1179

## ◆ getJobOptName()

def GaudiKernel.Configurable.ConfigurableAlgTool.getJobOptName | ( |  | self | ) |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1222 of file Configurable.py.

1222 def getJobOptName(self):
1223 return self._jobOptName
1224

## ◆ getParent()

def GaudiKernel.Configurable.ConfigurableAlgTool.getParent | ( |  | self | ) |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1212 of file Configurable.py.

1212 def getParent(self):
1213 dot = self._jobOptName.rfind('.')
1214 if dot != -1:
1215 return self._jobOptName[:dot]
1216 else:
1217 return ""
1218

## ◆ getPrintTitle()

def GaudiKernel.Configurable.ConfigurableAlgTool.getPrintTitle | ( |  | self | ) |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1190 of file Configurable.py.

1190 def getPrintTitle(self):
1191 if self.isPublic():
1192 pop = 'Public '
1193 else:
1194 pop = 'Private '
1195 return pop + Configurable.getPrintTitle(self)
1196

## ◆ hasParent()

def GaudiKernel.Configurable.ConfigurableAlgTool.hasParent | ( |  | self,
|  |  | parent
| ) |  |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1219 of file Configurable.py.

1219 def hasParent(self, parent):
1220 return self._jobOptName.startswith(parent + '.')
1221

## ◆ isInToolSvc()

def GaudiKernel.Configurable.ConfigurableAlgTool.isInToolSvc | ( |  | self | ) |

Definition at line 1228 of file Configurable.py.

1228 def isInToolSvc(self):
1229 return self._jobOptName.startswith('ToolSvc.')
1230

## ◆ isPublic()

def GaudiKernel.Configurable.ConfigurableAlgTool.isPublic | ( |  | self | ) |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1225 of file Configurable.py.

1225 def isPublic(self):
1226 return self.isInToolSvc()
1227

## ◆ setParent()

def GaudiKernel.Configurable.ConfigurableAlgTool.setParent | ( |  | self,
|  |  | parentName
| ) |  |

Reimplemented from GaudiKernel.Configurable.Configurable.

Definition at line 1197 of file Configurable.py.

1197 def setParent(self, parentName):
1198 # print "ConfigurableAlgTool.setParent(%s@%x,%r)" % (self.getName(),id(self),parentName)
1199 # print "Calling stack:"
1200 # import traceback
1201 # traceback.print_stack()
1202 # propagate parent to AlgTools in children
1203 for c in self.getAllChildren():
1204 if isinstance(c, ConfigurableAlgTool):
1205 c.setParent(parentName)
1206
1207 # update my own parent
1208 name = self.getName()
1209 name = name[name.rfind('.') + 1:] # Name of the instance
1210 self._jobOptName = self._name = parentName + '.' + name
1211

## ◆ toStringProperty()

def GaudiKernel.Configurable.ConfigurableAlgTool.toStringProperty | ( |  | self | ) |

Definition at line 1231 of file Configurable.py.

1231 def toStringProperty(self):
1232 # called on conversion to a string property for the jocat
1233 return self.getFullName()
1234

## Member Data Documentation

## ◆ __slots__

dictionary GaudiKernel.Configurable.ConfigurableAlgTool.__slots__
| static private

Initial value:
= {
'_jobOptName': '',
'OutputLevel': 0,
'AuditTools': 0,
'AuditInitialize': 0,
'AuditFinalize': 0
}

Definition at line 1159 of file Configurable.py.

## ◆ _jobOptName

GaudiKernel.Configurable.ConfigurableAlgTool._jobOptName
| private

Definition at line 1174 of file Configurable.py.

## ◆ _name

GaudiKernel.Configurable.ConfigurableAlgTool._name
| private

Definition at line 1171 of file Configurable.py.

The documentation for this class was generated from the following file:

- GaudiKernel/python/GaudiKernel/Configurable.py