| The Gaudi Framework v30r0 (c919700c)

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

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

Public Member Functions | Public Attributes | Private Attributes | List of all members
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher Class Reference
Inheritance diagram for GaudiPython.GaudiAlgs.TupleDecColumnDispatcher:
[legend]
Collaboration diagram for GaudiPython.GaudiAlgs.TupleDecColumnDispatcher:
[legend]

## Public Member Functions
def | __init__ (self, func)
def | __call__ (self, a)

## Public Attributes
| func
| mapping

## Private Attributes
| __doc__

## Detailed Description

    Helper decorator class to workaround ROOT-6697

Definition at line 1134 of file GaudiAlgs.py.

## Constructor & Destructor Documentation

def GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__init__ | ( |  | self,
|  |  | func
| ) |  |

Definition at line 1137 of file GaudiAlgs.py.

1137 def __init__(self, func):
1138 self.func = func
1139 self.__doc__ = func.__doc__
1140
1141 mapping = {int: 'int', bool: 'bool', float: 'double'}
1142 for k in mapping:
1143 signature = 'const Tuples::Tuple& tuple, const string& name, const %s value' % (
1144 mapping[k])
1145 mapping[k] = func.disp(signature)
1146 self.mapping = mapping
1147
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping
mapping
Definition: GaudiAlgs.py:1146
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__doc__
__doc__
Definition: GaudiAlgs.py:1139
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func
func
Definition: GaudiAlgs.py:1138
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__init__
def __init__(self, func)
Definition: GaudiAlgs.py:1137

## Member Function Documentation

def GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__call__ | ( |  | self,
|  |  | a
| ) |  |

    Explicitly call the explicit signature for the case with 3 arguments and
    the last one is 'int', 'bool' or 'float', for the other cases fall back
    on the default dispatcher.

Definition at line 1148 of file GaudiAlgs.py.

1148 def __call__(self, *a):
1149 '''
1150 Explicitly call the explicit signature for the case with 3 arguments and
1151 the last one is 'int', 'bool' or 'float', for the other cases fall back
1152 on the default dispatcher.
1153 '''
1154 if len(a) == 3:
1155 t = type(a[-1])
1156 try:
1157 return self.mapping[t](*a)
1158 except KeyError:
1159 pass
1160 return self.func(*a)
1161
1162
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping
mapping
Definition: GaudiAlgs.py:1146
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__call__
def __call__(self, a)
Definition: GaudiAlgs.py:1148
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func
func
Definition: GaudiAlgs.py:1138
gaudirun.type
type
Definition: gaudirun.py:133

## Member Data Documentation

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__doc__
| private

Definition at line 1139 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func

Definition at line 1138 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping

Definition at line 1146 of file GaudiAlgs.py.

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

- GaudiPython/python/GaudiPython/GaudiAlgs.py