| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# GaudiPython::PyAlg< ALGORITHM > Class Template Reference

general class to embed the existing algorithm/base class into the python More...

`#include <Algorithm.h>`

List of all members.

## Public Member Functions
| PyAlg (PyObject *self, const std::string &name)
| constructor from Python object and the name
virtual StatusCode | initialize ()
virtual StatusCode | start ()
virtual StatusCode | beginRun ()
virtual StatusCode | endRun ()
virtual StatusCode | execute ()
virtual StatusCode | stop ()
virtual StatusCode | finalize ()
virtual IAlgorithm * | ialgorithm ()
virtual IProperty * | iproperty ()
virtual StatusCode | initialize_ ()
virtual StatusCode | finalize_ ()
## Protected Member Functions
virtual | ~PyAlg ()
| virtual destructor
PyObject * | _obj () const
| get the object
## Private Member Functions
| PyAlg ()
| the default constructor is disabled
| PyAlg (const PyAlg &)
| the copy constructor is disabled
PyAlg & | operator= (const PyAlg &)
| the assignment operator is disabled
## Private Attributes
PyObject * | m_self
| "shadow" python class

## Detailed Description

### template<class ALGORITHM>
class GaudiPython::PyAlg< ALGORITHM >

general class to embed the existing algorithm/base class into the python

Author:
  Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr

Date:
  2005-08-03

Definition at line 65 of file Algorithm.h.

## Constructor & Destructor Documentation

template<class ALGORITHM>

GaudiPython::PyAlg< ALGORITHM >::PyAlg | ( | PyObject * | self,
|  | const std::string & | name |
| ) |  |  | `[inline]`

constructor from Python object and the name

Parameters:

  | self | python object
  | name | name of algorithm instance

Definition at line 75 of file Algorithm.h.

    00077       : ALGORITHM ( name , Gaudi::svcLocator() )
    00078       , m_self ( self )
    00079     {
    00080       // the printout of actual type for embedded algorithm has no sense
    00081       this -> setProperty ( "TypePrint" , "false" ) ;
    00082       this -> setProperty ( "StatPrint" , "true"  ) ;
    00083       // The owner of the Algorithm is Python (as creator) therefore
    00084       // it should not be deleted by Gaudi (added an extra addRef()).
    00085       this -> addRef() ;
    00086       this -> addRef() ;
    00087     }

template<class ALGORITHM>

virtual GaudiPython::PyAlg< ALGORITHM >::~PyAlg | ( |  | ) | `[inline, protected, virtual]`

virtual destructor

Definition at line 92 of file Algorithm.h.

    00092 {}                                   // virtual destructor

template<class ALGORITHM>

GaudiPython::PyAlg< ALGORITHM >::PyAlg | ( |  | ) | `[private]`

the default constructor is disabled

template<class ALGORITHM>

GaudiPython::PyAlg< ALGORITHM >::PyAlg | ( | const PyAlg< ALGORITHM > & |  | ) | `[private]`

the copy constructor is disabled

## Member Function Documentation

template<class ALGORITHM>

PyObject* GaudiPython::PyAlg< ALGORITHM >::_obj | ( |  | ) | const`[inline, protected]`

get the object

Definition at line 94 of file Algorithm.h.

    00094 { return m_self ; }            //     get the object

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize | ( |  | ) | `[inline, virtual]`

Definition at line 98 of file Algorithm.h.

    00099     { return GaudiPython::call_python_method ( m_self , "initialize" ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::start | ( |  | ) | `[inline, virtual]`

Definition at line 100 of file Algorithm.h.

    00101     { return GaudiPython::call_python_method ( m_self , "start"      ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::beginRun | ( |  | ) | `[inline, virtual]`

Definition at line 102 of file Algorithm.h.

    00103     { return GaudiPython::call_python_method ( m_self , "beginRun"   ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::endRun | ( |  | ) | `[inline, virtual]`

Definition at line 104 of file Algorithm.h.

    00105     { return GaudiPython::call_python_method ( m_self , "endRun"     ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::execute | ( |  | ) | `[inline, virtual]`

Definition at line 106 of file Algorithm.h.

    00107     { return GaudiPython::call_python_method ( m_self , "execute"    ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::stop | ( |  | ) | `[inline, virtual]`

Definition at line 108 of file Algorithm.h.

    00109     { return GaudiPython::call_python_method ( m_self , "stop"       ) ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize | ( |  | ) | `[inline, virtual]`

Definition at line 110 of file Algorithm.h.

    00111     { return GaudiPython::call_python_method ( m_self , "finalize"   ) ; }

template<class ALGORITHM>

virtual IAlgorithm* GaudiPython::PyAlg< ALGORITHM >::ialgorithm | ( |  | ) | `[inline, virtual]`

Definition at line 113 of file Algorithm.h.

    00113 { return this ; }

template<class ALGORITHM>

virtual IProperty* GaudiPython::PyAlg< ALGORITHM >::iproperty | ( |  | ) | `[inline, virtual]`

Definition at line 114 of file Algorithm.h.

    00114 { return this ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize_ | ( |  | ) | `[inline, virtual]`

Definition at line 117 of file Algorithm.h.

    00117 { return ALGORITHM::initialize () ; }

template<class ALGORITHM>

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize_ | ( |  | ) | `[inline, virtual]`

Definition at line 118 of file Algorithm.h.

    00118 { return ALGORITHM::finalize   () ; }

template<class ALGORITHM>

PyAlg& GaudiPython::PyAlg< ALGORITHM >::operator= | ( | const PyAlg< ALGORITHM > & |  | ) | `[private]`

the assignment operator is disabled

## Member Data Documentation

template<class ALGORITHM>

PyObject* GaudiPython::PyAlg< ALGORITHM >::m_self`[private]`

"shadow" python class

Definition at line 132 of file Algorithm.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiPython/GaudiPython/Algorithm.h