| The Gaudi Framework v32r1 (f65d50dc)

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 (cls)
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 1751 of file Configurable.py.

## Constructor & Destructor Documentation

## ◆ __init__()

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

Definition at line 1774 of file Configurable.py.

1774 def __init__(self, name=None, **kwargs):
1775 self._name = name or self.getType()
1776 self.graph = self._initGraph()
1777 for key in kwargs:
1778 setattr(self, key, kwargs[key])
1779

## Member Function Documentation

## ◆ __new__()

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

Definition at line 1757 of file Configurable.py.

1757 def __new__(cls, name=None, **kwargs):
1758 if name is None:
1759 name = cls.__name__
1760 if name in Configurable.allConfigurables:
1761 instance = Configurable.allConfigurables[name]
1762 assert type(instance) is cls, \
1763 ('trying to reuse {0!r} as name of a {1} instance while it''s '
1764 'already used for an instance of {2}').format(
1765 name,
1766 cls.__name__,
1767 type(instance).__name__)
1768 return instance
1769 else:
1770 instance = super(SuperAlgorithm, cls).__new__(cls, name, **kwargs)
1771 Configurable.allConfigurables[name] = instance
1772 return instance
1773
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
gaudirun.type
type
Definition: gaudirun.py:142

## ◆ __repr__()

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

Definition at line 1812 of file Configurable.py.

1812 def __repr__(self):
1813 return '{0}({1!r})'.format(self.getType(), self.name)
1814
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
GaudiPython.HistoUtils.__repr__
__repr__
Definition: HistoUtils.py:508

## ◆ __setattr__()

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

Definition at line 1819 of file Configurable.py.

1819 def __setattr__(self, name, value):
1820 super(SuperAlgorithm, self).__setattr__(name, value)
1821 if name in ('_name', 'graph'):
1822 # do not propagate internal data members
1823 return
1824
1825 class PropSetter(object):
1826 def enter(self, node):
1827 try:
1828 setattr(node, name, value)
1829 except (ValueError, AttributeError):
1830 # ignore type and name mismatch
1831 pass
1832
1833 def leave(self, node):
1834 pass
1835
1836 self._visitSubNodes(PropSetter())

## ◆ _initGraph()

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

Definition at line 1809 of file Configurable.py.

1809 def _initGraph(self):
1810 raise NotImplementedError()
1811

## ◆ _makeAlg()

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

1801 def _makeAlg(self, typ, **kwargs):
1802 '''
1803 Instantiate and algorithm of type 'typ' with a name suitable for use
1804 inside a SuperAlgorithm.
1805 '''
1806 name = '{0}_{1}'.format(self.name, kwargs.pop('name', typ.getType()))
1807 return typ(name, **kwargs)
1808
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109

## ◆ _visitSubNodes()

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

Definition at line 1815 of file Configurable.py.

1815 def _visitSubNodes(self, visitor):
1816 if self.graph:
1817 self.graph.visitNode(visitor)
1818

## ◆ getGaudiType()

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

Definition at line 1798 of file Configurable.py.

1798 def getGaudiType(cls):
1799 return 'User'
1800

## ◆ getType()

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

Definition at line 1785 of file Configurable.py.

1785 def getType(cls):
1786 return cls.__name__
1787

## ◆ isApplicable()

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

Definition at line 1793 of file Configurable.py.

1793 def isApplicable(self):
1794 return False
1795
GaudiKernel.Configurable.isApplicable
def isApplicable(self)
rep += v.__str__( indent + 1 ) + os.linesep elif isinstance(v,GaudiHandleArray): for vi in v: if isin...
Definition: Configurable.py:997

## ◆ name()

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

Definition at line 1781 of file Configurable.py.

1781 def name(self): # name is a read only property
1782 return self._name
1783
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41

## ◆ properties()

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

Definition at line 1789 of file Configurable.py.

1789 def properties(self):
1790 pass
1791
gaudiComponentHelp.properties
properties
Definition: gaudiComponentHelp.py:51

## Member Data Documentation

## ◆ _name

GaudiKernel.Configurable.SuperAlgorithm._name
| private

Definition at line 1775 of file Configurable.py.

## ◆ graph

GaudiKernel.Configurable.SuperAlgorithm.graph

Definition at line 1776 of file Configurable.py.

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

- GaudiKernel/python/GaudiKernel/Configurable.py