All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiPython::PyAlg< ALGORITHM > Class Template Reference

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

#include <GaudiPython/Algorithm.h>

Inheritance diagram for GaudiPython::PyAlg< ALGORITHM >:
Collaboration diagram for GaudiPython::PyAlg< ALGORITHM >:

Public Member Functions

 PyAlg (PyObject *self, const std::string &name)
 constructor from Python object and the name More...
 
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 More...
 
PyObject * _obj () const
 get the object More...
 

Private Member Functions

 PyAlg ()
 the default constructor is disabled More...
 
 PyAlg (const PyAlg &)
 the copy constructor is disabled More...
 
PyAlgoperator= (const PyAlg &)
 the assignment operator is disabled More...
 

Private Attributes

PyObject * m_self
 "shadow" python class More...
 

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..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..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.

77  : ALGORITHM ( name , Gaudi::svcLocator() )
78  , m_self ( self )
79  {
80  // the printout of actual type for embedded algorithm has no sense
81  this -> setProperty ( "TypePrint" , "false" ) ;
82  this -> setProperty ( "StatPrint" , "true" ) ;
83  // The owner of the Algorithm is Python (as creator) therefore
84  // it should not be deleted by Gaudi (added an extra addRef()).
85  this -> addRef() ;
86  this -> addRef() ;
87  }
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1212
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API ISvcLocator * svcLocator()
template<class ALGORITHM >
virtual GaudiPython::PyAlg< ALGORITHM >::~PyAlg ( )
inlineprotectedvirtual

virtual destructor

Definition at line 92 of file Algorithm.h.

92 {} // 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
inlineprotected

get the object

Definition at line 94 of file Algorithm.h.

94 { return m_self ; } // get the object
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::beginRun ( )
inlinevirtual

Definition at line 102 of file Algorithm.h.

103  { return GaudiPython::call_python_method ( m_self , "beginRun" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::endRun ( )
inlinevirtual

Definition at line 104 of file Algorithm.h.

105  { return GaudiPython::call_python_method ( m_self , "endRun" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::execute ( )
inlinevirtual

Definition at line 106 of file Algorithm.h.

107  { return GaudiPython::call_python_method ( m_self , "execute" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize ( )
inlinevirtual

Definition at line 110 of file Algorithm.h.

111  { return GaudiPython::call_python_method ( m_self , "finalize" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize_ ( )
inlinevirtual

Definition at line 118 of file Algorithm.h.

118 { return ALGORITHM::finalize () ; }
template<class ALGORITHM >
virtual IAlgorithm* GaudiPython::PyAlg< ALGORITHM >::ialgorithm ( )
inlinevirtual

Definition at line 113 of file Algorithm.h.

113 { return this ; }
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize ( )
inlinevirtual

Definition at line 98 of file Algorithm.h.

99  { return GaudiPython::call_python_method ( m_self , "initialize" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize_ ( )
inlinevirtual

Definition at line 117 of file Algorithm.h.

117 { return ALGORITHM::initialize () ; }
template<class ALGORITHM >
virtual IProperty* GaudiPython::PyAlg< ALGORITHM >::iproperty ( )
inlinevirtual

Definition at line 114 of file Algorithm.h.

114 { 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 ( )
inlinevirtual

Definition at line 100 of file Algorithm.h.

101  { return GaudiPython::call_python_method ( m_self , "start" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30
template<class ALGORITHM >
virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::stop ( )
inlinevirtual

Definition at line 108 of file Algorithm.h.

109  { return GaudiPython::call_python_method ( m_self , "stop" ) ; }
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:132
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:30

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: