| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 1621 of file Configurable.py.

## Constructor & Destructor Documentation

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

Definition at line 1643 of file Configurable.py.

1643 def __init__(self, name=None, **kwargs):
1644 self._name = name or self.getType()
1645 self.graph = self._initGraph()
1646 for key in kwargs:
1647 setattr(self, key, kwargs[key])
1648
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1654
GaudiKernel.Configurable.SuperAlgorithm.__init__
def __init__(self, name=None, kwargs)
Definition: Configurable.py:1643
GaudiKernel.Configurable.SuperAlgorithm._initGraph
def _initGraph(self)
Definition: Configurable.py:1677
GaudiKernel.Configurable.SuperAlgorithm.graph
graph
Definition: Configurable.py:1645
GaudiKernel.Configurable.SuperAlgorithm._name
_name
Definition: Configurable.py:1644

## Member Function Documentation

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

Definition at line 1626 of file Configurable.py.

1626 def __new__(cls, name=None, **kwargs):
1627 if name is None:
1628 name = cls.__name__
1629 if name in Configurable.allConfigurables:
1630 instance = Configurable.allConfigurables[name]
1631 assert type(instance) is cls, \
1632 ('trying to reuse {0!r} as name of a {1} instance while it''s '
1633 'already used for an instance of {2}').format(
1634 name,
1635 cls.__name__,
1636 type(instance).__name__)
1637 return instance
1638 else:
1639 instance = super(SuperAlgorithm, cls).__new__(cls, name, **kwargs)
1640 Configurable.allConfigurables[name] = instance
1641 return instance
1642
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
gaudirun.type
type
Definition: gaudirun.py:125
GaudiKernel.Configurable.SuperAlgorithm.__new__
def __new__(cls, name=None, kwargs)
Definition: Configurable.py:1626

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

Definition at line 1680 of file Configurable.py.

1680 def __repr__(self):
1681 return '{0}({1!r})'.format(self.getType(), self.name)
1682
GaudiKernel.Configurable.SuperAlgorithm.__repr__
def __repr__(self)
Definition: Configurable.py:1680
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1654
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1650

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

Definition at line 1687 of file Configurable.py.

1687 def __setattr__(self, name, value):
1688 super(SuperAlgorithm, self).__setattr__(name, value)
1689 if name in ('_name', 'graph'):
1690 # do not propagate internal data members
1691 return
1692
1693 class PropSetter(object):
1694 def enter(self, node):
1695 try:
1696 setattr(node, name, value)
1697 except (ValueError, AttributeError):
1698 # ignore type and name mismatch
1699 pass
1700 def leave(self, node):
1701 pass
1702
1703 self._visitSubNodes(PropSetter())
1704
GaudiKernel.Configurable.SuperAlgorithm.__setattr__
def __setattr__(self, name, value)
Definition: Configurable.py:1687

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

Definition at line 1677 of file Configurable.py.

1677 def _initGraph(self):
1678 raise NotImplementedError()
1679
GaudiKernel.Configurable.SuperAlgorithm._initGraph
def _initGraph(self)
Definition: Configurable.py:1677

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 1669 of file Configurable.py.

1669 def _makeAlg(self, typ, **kwargs):
1670 '''
1671 Instantiate and algorithm of type 'typ' with a name suitable for use
1672 inside a SuperAlgorithm.
1673 '''
1674 name = '{0}_{1}'.format(self.name, kwargs.pop('name', typ.getType()))
1675 return typ(name, **kwargs)
1676
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
GaudiKernel.Configurable.SuperAlgorithm._makeAlg
def _makeAlg(self, typ, kwargs)
Definition: Configurable.py:1669
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1650

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

Definition at line 1683 of file Configurable.py.

1683 def _visitSubNodes(self, visitor):
1684 if self.graph:
1685 self.graph.visitNode(visitor)
1686
GaudiKernel.Configurable.SuperAlgorithm.graph
graph
Definition: Configurable.py:1645
GaudiKernel.Configurable.SuperAlgorithm._visitSubNodes
def _visitSubNodes(self, visitor)
Definition: Configurable.py:1683

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

Definition at line 1666 of file Configurable.py.

1666 def getGaudiType(self):
1667 return 'User'
1668
GaudiKernel.Configurable.SuperAlgorithm.getGaudiType
def getGaudiType(self)
Definition: Configurable.py:1666

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

Definition at line 1654 of file Configurable.py.

1654 def getType(cls):
1655 return cls.__name__
1656
GaudiKernel.Configurable.SuperAlgorithm.getType
def getType(cls)
Definition: Configurable.py:1654

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

Definition at line 1662 of file Configurable.py.

1662 def isApplicable(self):
1663 return False
1664
GaudiKernel.Configurable.SuperAlgorithm.isApplicable
def isApplicable(self)
Definition: Configurable.py:1662

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

Definition at line 1650 of file Configurable.py.

1650 def name(self): # name is a read only property
1651 return self._name
1652
GaudiKernel.Configurable.SuperAlgorithm.name
def name(self)
Definition: Configurable.py:1650
GaudiKernel.Configurable.SuperAlgorithm._name
_name
Definition: Configurable.py:1644

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

Definition at line 1658 of file Configurable.py.

1658 def properties(self):
1659 pass
1660
GaudiKernel.Configurable.SuperAlgorithm.properties
def properties(self)
Definition: Configurable.py:1658

## Member Data Documentation

GaudiKernel.Configurable.SuperAlgorithm._name
| private

Definition at line 1644 of file Configurable.py.

GaudiKernel.Configurable.SuperAlgorithm.graph

Definition at line 1645 of file Configurable.py.

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

- GaudiKernel/python/GaudiKernel/Configurable.py