| The Gaudi Framework v28r2-patches (bc4ad17a)

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

## Constructor & Destructor Documentation

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

Definition at line 1046 of file GaudiAlgs.py.

1046 def __init__(self, func):
1047 self.func = func
1048 self.__doc__ = func.__doc__
1049
1050 mapping = {int: 'int', bool: 'bool', float: 'double'}
1051 for k in mapping:
1052 signature = 'const Tuples::Tuple& tuple, const string& name, const %s value'%(mapping[k])
1053 mapping[k] = func.disp(signature)
1054 self.mapping = mapping
1055
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping
mapping
Definition: GaudiAlgs.py:1054
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__doc__
__doc__
Definition: GaudiAlgs.py:1048
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func
func
Definition: GaudiAlgs.py:1047
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__init__
def __init__(self, func)
Definition: GaudiAlgs.py:1046

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

1056 def __call__(self, *a):
1057 '''
1058 Explicitly call the explicit signature for the case with 3 arguments and
1059 the last one is 'int', 'bool' or 'float', for the other cases fall back
1060 on the default dispatcher.
1061 '''
1062 if len(a) == 3:
1063 t = type(a[-1])
1064 try:
1065 return self.mapping[t](*a)
1066 except KeyError:
1067 pass
1068 return self.func(*a)
1069
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping
mapping
Definition: GaudiAlgs.py:1054
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__call__
def __call__(self, a)
Definition: GaudiAlgs.py:1056
GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func
func
Definition: GaudiAlgs.py:1047
gaudirun.type
type
Definition: gaudirun.py:125

## Member Data Documentation

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.__doc__
| private

Definition at line 1048 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.func

Definition at line 1047 of file GaudiAlgs.py.

GaudiPython.GaudiAlgs.TupleDecColumnDispatcher.mapping

Definition at line 1054 of file GaudiAlgs.py.

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

- GaudiPython/python/GaudiPython/GaudiAlgs.py