| # Gaudi Framework, version v21r9 |

Home |  | Generated: 3 May 2010

# Configurable::ConfigurableAlgTool Class Reference

Inheritance diagram for Configurable::ConfigurableAlgTool:

[legend]
Collaboration diagram for Configurable::ConfigurableAlgTool:

[legend]

List of all members.

## Public Member Functions
def | __init__
def | getHandle
def | getGaudiType
def | getGaudiHandle
def | getPrintTitle
def | setParent
def | getParent
def | hasParent
def | getJobOptName
def | isPublic
def | isInToolSvc
def | toStringProperty
def | getFullName
## Private Attributes
| _name
| _jobOptName
## Static Private Attributes
dictionary | __slots__

## Detailed Description

Definition at line 1006 of file Configurable.py.

## Member Function Documentation

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

Reimplemented from Configurable::Configurable.

Definition at line 1010 of file Configurable.py.

    01010                                                          :
    01011         super( ConfigurableAlgTool, self ).__init__( name )
    01012         if '.' not in self._name:
    01013             # Public tools must have ToolSvc as parent
    01014             self._name = "ToolSvc." + self._name
    01015         name = self.getName()
    01016         name = name[ name.find('/')+1 : ]   # strips class, if any
    01017         self._jobOptName = name
    01018
        def getHandle( self ):

def Configurable::ConfigurableAlgTool::getHandle | ( |  | self | ) |

Definition at line 1019 of file Configurable.py.

    01019                          :
    01020         # iAlgTool isn't useful, unless one knows for sure that the tool exists
    01021         return iProperty( self.getJobOptName() )
    01022
        def getGaudiType( self ):

def Configurable::ConfigurableAlgTool::getGaudiType | ( |  | self | ) |

Definition at line 1023 of file Configurable.py.

    01023                             :
    01024         return 'AlgTool'
    01025
        def getGaudiHandle( self ):

def Configurable::ConfigurableAlgTool::getGaudiHandle | ( |  | self | ) |

Definition at line 1026 of file Configurable.py.

    01026                               :
    01027         if self.isPublic():
    01028             return PublicToolHandle( self.toStringProperty() )
    01029         else:
    01030             return PrivateToolHandle( self.toStringProperty() )
    01031
        def getPrintTitle(self):

def Configurable::ConfigurableAlgTool::getPrintTitle | ( |  | self | ) |

Reimplemented from Configurable::Configurable.

Definition at line 1032 of file Configurable.py.

    01032                            :
    01033         if self.isPublic():
    01034             pop = 'Public '
    01035         else:
    01036             pop = 'Private '
    01037         return pop + Configurable.getPrintTitle(self)
    01038
        def setParent( self, parentName ):

def Configurable::ConfigurableAlgTool::setParent | ( |  | self,
|  |  | parentName |
| ) |  |  |

Reimplemented from Configurable::Configurable.

Definition at line 1039 of file Configurable.py.

    01039                                      :
    01040 #       print "ConfigurableAlgTool.setParent(%s@%x,%r)" % (self.getName(),id(self),parentName)
    01041 #       print "Calling stack:"
    01042 #       import traceback
    01043 #       traceback.print_stack()
    01044         # propagate parent to AlgTools in children
    01045         for c in self.getAllChildren():
    01046             if isinstance(c,ConfigurableAlgTool): c.setParent( parentName )
    01047
    01048         # update my own parent
    01049         name = self.getName()
    01050         name = name[name.rfind('.')+1:] # Name of the instance
    01051         self._jobOptName = self._name = parentName + '.' + name
    01052
        def getParent( self ):

def Configurable::ConfigurableAlgTool::getParent | ( |  | self | ) |

Reimplemented from Configurable::Configurable.

Definition at line 1053 of file Configurable.py.

    01053                          :
    01054         dot = self._jobOptName.rfind('.')
    01055         if dot != -1:
    01056             return self._jobOptName[:dot]
    01057         else:
    01058             return ""
    01059
        def hasParent( self, parent ):

def Configurable::ConfigurableAlgTool::hasParent | ( |  | self,
|  |  | parent |
| ) |  |  |

Reimplemented from Configurable::Configurable.

Definition at line 1060 of file Configurable.py.

    01060                                  :
    01061         return self._jobOptName.startswith( parent + '.' )
    01062
        def getJobOptName( self ):

def Configurable::ConfigurableAlgTool::getJobOptName | ( |  | self | ) |

Reimplemented from Configurable::Configurable.

Definition at line 1063 of file Configurable.py.

    01063                              :
    01064         return self._jobOptName
    01065
        def isPublic( self ):

def Configurable::ConfigurableAlgTool::isPublic | ( |  | self | ) |

Reimplemented from Configurable::Configurable.

Definition at line 1066 of file Configurable.py.

    01066                         :
    01067         return self.isInToolSvc()
    01068
        def isInToolSvc( self ):

def Configurable::ConfigurableAlgTool::isInToolSvc | ( |  | self | ) |

Definition at line 1069 of file Configurable.py.

    01069                            :
    01070         return self._jobOptName.startswith('ToolSvc.')
    01071
        def toStringProperty( self ):

def Configurable::ConfigurableAlgTool::toStringProperty | ( |  | self | ) |

Definition at line 1072 of file Configurable.py.

    01072                                 :
    01073         # called on conversion to a string property for the jocat
    01074         return self.getFullName()
    01075
        def getFullName( self ) :

def Configurable::ConfigurableAlgTool::getFullName | ( |  | self | ) |

Reimplemented from Configurable::Configurable.

Definition at line 1076 of file Configurable.py.

    01076                             :
    01077         # for Tools, the "full name" means "Type/LocalName",
    01078         # without the names of the parents
    01079         name = self.getName()
    01080         # strip off everything before the last '.'
    01081         name = name[name.rfind('.')+1:]
    01082         return str( self.getType() + '/' + name )
    01083
    01084
    ### FIXME: this is just a placeholder, waiting for a real implementation

## Member Data Documentation

dictionary Configurable::ConfigurableAlgTool::__slots__`[static, private]`

Initial value:

    { '_jobOptName' : '', 'OutputLevel' : 0, \
           'AuditTools' : 0, 'AuditInitialize' : 0, 'AuditFinalize' : 0 }

Reimplemented from Configurable::Configurable.

Definition at line 1007 of file Configurable.py.

Configurable::ConfigurableAlgTool::_name`[private]`

Reimplemented from Configurable::Configurable.

Definition at line 1014 of file Configurable.py.

Configurable::ConfigurableAlgTool::_jobOptName`[private]`

Definition at line 1017 of file Configurable.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r9/GaudiKernel/python/GaudiKernel/Configurable.py