| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

## Public Member Functions
def | __new__ (cls, name=None, kwargs)
def | __init__ (self, name=None, kwargs)
def | name (self)
def | getType (cls)
def | properties (self)
def | isApplicable (self)
def | getGaudiType (self)
def | __repr__ (self)
def | __setattr__ (self, name, value)

## Public Attributes
| graph

## Private Member Functions
def | _makeAlg (self, typ, kwargs)
def | _initGraph (self)
def | _visitSubNodes (self, visitor)

## Private Attributes
| _name

## Detailed Description

    Helper class to use a ControlFlowNode as an algorithm configurable
    instance.

Definition at line 1680 of file Configurable.py.

## Constructor & Destructor Documentation

def GaudiKernel.Configurable.SuperAlgorithm.__init__ | ( |  | self,
|  |  | name = `None`,
|  |  | kwargs
| ) |  |

Definition at line 1702 of file Configurable.py.

1702 def __init__(self, name=None, **kwargs):
1703 self._name = name or self.getType()
1704 self.graph = self._initGraph()
1705 for key in kwargs:
1706 setattr(self, key, kwargs[key])
1707
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1713
GaudiKernel.Configurable.SuperAlgorithm.__init__
def __init__(self, name=None, kwargs)
Definition: Configurable.py:1702
GaudiKernel.Configurable.SuperAlgorithm._initGraph
def _initGraph(self)
Definition: Configurable.py:1736
GaudiKernel.Configurable.SuperAlgorithm.graph
graph
Definition: Configurable.py:1704
GaudiKernel.Configurable.SuperAlgorithm._name
_name
Definition: Configurable.py:1703

## Member Function Documentation

def GaudiKernel.Configurable.SuperAlgorithm.__new__ | ( |  | cls,
|  |  | name = `None`,
|  |  | kwargs
| ) |  |

Definition at line 1685 of file Configurable.py.

1685 def __new__(cls, name=None, **kwargs):
1686 if name is None:
1687 name = cls.__name__
1688 if name in Configurable.allConfigurables:
1689 instance = Configurable.allConfigurables[name]
1690 assert type(instance) is cls, \
1691 ('trying to reuse {0!r} as name of a {1} instance while it''s '
1692 'already used for an instance of {2}').format(
1693 name,
1694 cls.__name__,
1695 type(instance).__name__)
1696 return instance
1697 else:
1698 instance = super(SuperAlgorithm, cls).__new__(cls, name, **kwargs)
1699 Configurable.allConfigurables[name] = instance
1700 return instance
1701
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
gaudirun.type
type
Definition: gaudirun.py:133
GaudiKernel.Configurable.SuperAlgorithm.__new__
def __new__(cls, name=None, kwargs)
Definition: Configurable.py:1685

def GaudiKernel.Configurable.SuperAlgorithm.__repr__ | ( |  | self | ) |

Definition at line 1739 of file Configurable.py.

1739 def __repr__(self):
1740 return '{0}({1!r})'.format(self.getType(), self.name)
1741
GaudiKernel.Configurable.SuperAlgorithm.__repr__
def __repr__(self)
Definition: Configurable.py:1739
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1713
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1709

def GaudiKernel.Configurable.SuperAlgorithm.__setattr__ | ( |  | self,
|  |  | name,
|  |  | value
| ) |  |

Definition at line 1746 of file Configurable.py.

1746 def __setattr__(self, name, value):
1747 super(SuperAlgorithm, self).__setattr__(name, value)
1748 if name in ('_name', 'graph'):
1749 # do not propagate internal data members
1750 return
1751
1752 class PropSetter(object):
1753 def enter(self, node):
1754 try:
1755 setattr(node, name, value)
1756 except (ValueError, AttributeError):
1757 # ignore type and name mismatch
1758 pass
1759
1760 def leave(self, node):
1761 pass
1762
1763 self._visitSubNodes(PropSetter())
1764
GaudiKernel.Configurable.SuperAlgorithm.__setattr__
def __setattr__(self, name, value)
Definition: Configurable.py:1746

def GaudiKernel.Configurable.SuperAlgorithm._initGraph | ( |  | self | ) |
| private

Definition at line 1736 of file Configurable.py.

1736 def _initGraph(self):
1737 raise NotImplementedError()
1738
GaudiKernel.Configurable.SuperAlgorithm._initGraph
def _initGraph(self)
Definition: Configurable.py:1736

def GaudiKernel.Configurable.SuperAlgorithm._makeAlg | ( |  | self,
|  |  | typ,
|  |  | kwargs
| ) |  |
| private

    Instantiate and algorithm of type 'typ' with a name suitable for use
    inside a SuperAlgorithm.

Definition at line 1728 of file Configurable.py.

1728 def _makeAlg(self, typ, **kwargs):
1729 '''
1730 Instantiate and algorithm of type 'typ' with a name suitable for use
1731 inside a SuperAlgorithm.
1732 '''
1733 name = '{0}_{1}'.format(self.name, kwargs.pop('name', typ.getType()))
1734 return typ(name, **kwargs)
1735
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
GaudiKernel.Configurable.SuperAlgorithm._makeAlg
def _makeAlg(self, typ, kwargs)
Definition: Configurable.py:1728
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1709

def GaudiKernel.Configurable.SuperAlgorithm._visitSubNodes | ( |  | self,
|  |  | visitor
| ) |  |
| private

Definition at line 1742 of file Configurable.py.

1742 def _visitSubNodes(self, visitor):
1743 if self.graph:
1744 self.graph.visitNode(visitor)
1745
GaudiKernel.Configurable.SuperAlgorithm.graph
graph
Definition: Configurable.py:1704
GaudiKernel.Configurable.SuperAlgorithm._visitSubNodes
def _visitSubNodes(self, visitor)
Definition: Configurable.py:1742

def GaudiKernel.Configurable.SuperAlgorithm.getGaudiType | ( |  | self | ) |

Definition at line 1725 of file Configurable.py.

1725 def getGaudiType(self):
1726 return 'User'
1727
GaudiKernel.Configurable.SuperAlgorithm.getGaudiType
def getGaudiType(self)
Definition: Configurable.py:1725

def GaudiKernel.Configurable.SuperAlgorithm.getType | ( |  | cls | ) |

Definition at line 1713 of file Configurable.py.

1713 def getType(cls):
1714 return cls.__name__
1715
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1713

def GaudiKernel.Configurable.SuperAlgorithm.isApplicable | ( |  | self | ) |

Definition at line 1721 of file Configurable.py.

1721 def isApplicable(self):
1722 return False
1723
GaudiKernel.Configurable.SuperAlgorithm.isApplicable
def isApplicable(self)
Definition: Configurable.py:1721

def GaudiKernel.Configurable.SuperAlgorithm.name | ( |  | self | ) |

Definition at line 1709 of file Configurable.py.

1709 def name(self): # name is a read only property
1710 return self._name
1711
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1709
GaudiKernel.Configurable.SuperAlgorithm._name
_name
Definition: Configurable.py:1703

def GaudiKernel.Configurable.SuperAlgorithm.properties | ( |  | self | ) |

Definition at line 1717 of file Configurable.py.

1717 def properties(self):
1718 pass
1719
GaudiKernel.Configurable.SuperAlgorithm.properties
def properties(self)
Definition: Configurable.py:1717

## Member Data Documentation

GaudiKernel.Configurable.SuperAlgorithm._name
| private

Definition at line 1703 of file Configurable.py.

GaudiKernel.Configurable.SuperAlgorithm.graph

Definition at line 1704 of file Configurable.py.

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

- GaudiKernel/python/GaudiKernel/Configurable.py