| The Gaudi Framework v32r1 (f65d50dc)

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 1161 of file GaudiAlgs.py.

## Constructor & Destructor Documentation

## ◆ __init__()

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

Definition at line 1164 of file GaudiAlgs.py.

1164 def __init__(self, func):
1165 self.func = func
1166 self.__doc__ = func.__doc__
1167
1168 mapping = {int: 'int', bool: 'bool', float: 'double'}
1169 for k in mapping:
1170 signature = 'const Tuples::Tuple& tuple, const string& name, const %s value' % (
1171 mapping[k])
1172 mapping[k] = func.disp(signature)
1173 self.mapping = mapping
1174

## Member Function Documentation

## ◆ __call__()

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 1175 of file GaudiAlgs.py.

1175 def __call__(self, *a):
1176 '''
1177 Explicitly call the explicit signature for the case with 3 arguments and
1178 the last one is 'int', 'bool' or 'float', for the other cases fall back
1179 on the default dispatcher.
1180 '''
1181 if len(a) == 3:
1182 t = type(a[-1])
1183 try:
1184 return self.mapping[t](*a)
1185 except KeyError:
1186 pass
1187 return self.func(*a)
1188
1189
gaudirun.type
type
Definition: gaudirun.py:142

## Member Data Documentation

## ◆ __doc__

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__doc__
| private

Definition at line 1166 of file GaudiAlgs.py.

## ◆ func

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func

Definition at line 1165 of file GaudiAlgs.py.

## ◆ mapping

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping

Definition at line 1173 of file GaudiAlgs.py.

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

- GaudiPython/python/GaudiPython/GaudiAlgs.py