Gaudi Framework, version v23r0

Home   Generated: Mon Jan 30 2012
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

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 IAlgorithmialgorithm ()
virtual IPropertyiproperty ()
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
PyAlgoperator= (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:
selfpython object
namename of algorithm instance

Definition at line 75 of file Algorithm.h.

      : ALGORITHM ( name , Gaudi::svcLocator() )
      , m_self ( self )
    {
      // the printout of actual type for embedded algorithm has no sense
      this -> setProperty ( "TypePrint" , "false" ) ;
      this -> setProperty ( "StatPrint" , "true"  ) ;
      // The owner of the Algorithm is Python (as creator) therefore
      // it should not be deleted by Gaudi (added an extra addRef()).
      this -> addRef() ;
      this -> addRef() ;
    }
template<class ALGORITHM >
virtual GaudiPython::PyAlg< ALGORITHM >::~PyAlg (  ) [inline, protected, virtual]

virtual destructor

Definition at line 92 of file Algorithm.h.

{}                                   // 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.

{ return m_self ; }            //     get the object 
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::beginRun (  ) [inline, virtual]

Definition at line 102 of file Algorithm.h.

    { 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.

    { 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.

    { return GaudiPython::call_python_method ( m_self , "execute"    ) ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize (  ) [inline, virtual]

Definition at line 110 of file Algorithm.h.

    { return GaudiPython::call_python_method ( m_self , "finalize"   ) ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize_ (  ) [inline, virtual]

Definition at line 118 of file Algorithm.h.

{ return ALGORITHM::finalize   () ; }
template<class ALGORITHM >
virtual IAlgorithm* GaudiPython::PyAlg< ALGORITHM >::ialgorithm (  ) [inline, virtual]

Definition at line 113 of file Algorithm.h.

{ return this ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize (  ) [inline, virtual]

Definition at line 98 of file Algorithm.h.

    { return GaudiPython::call_python_method ( m_self , "initialize" ) ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize_ (  ) [inline, virtual]

Definition at line 117 of file Algorithm.h.

{ return ALGORITHM::initialize () ; }
template<class ALGORITHM >
virtual IProperty* GaudiPython::PyAlg< ALGORITHM >::iproperty (  ) [inline, virtual]

Definition at line 114 of file Algorithm.h.

{ return this ; }
template<class ALGORITHM >
PyAlg& GaudiPython::PyAlg< ALGORITHM >::operator= ( const PyAlg< ALGORITHM > &   ) [private]

the assignment operator is disabled

template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::start (  ) [inline, virtual]

Definition at line 100 of file Algorithm.h.

    { return GaudiPython::call_python_method ( m_self , "start"      ) ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::stop (  ) [inline, virtual]

Definition at line 108 of file Algorithm.h.

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

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Mon Jan 30 2012 13:53:34 for Gaudi Framework, version v23r0 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004