| 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 | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
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 >:
[legend]
Collaboration diagram for GaudiPython::PyAlg< ALGORITHM >:
[legend]

## Public Member Functions
| PyAlg (PyObject *self, const std::string &name)
| constructor from Python object and the name More...
StatusCode | initialize () override
StatusCode | start () override
StatusCode | beginRun () override
StatusCode | endRun () override
StatusCode | execute () override
StatusCode | stop () override
StatusCode | finalize () override
virtual IAlgorithm * | ialgorithm ()
virtual IProperty * | iproperty ()
virtual StatusCode | initialize_ ()
virtual StatusCode | finalize_ ()

## Protected Member Functions
| ~PyAlg () override=default
| virtual destructor More...
PyObject * | _obj () const
| get the object More...

## Private Member Functions
| PyAlg ()=delete
| the default constructor is disabled More...
| PyAlg (const PyAlg &)=delete
| the copy constructor is disabled More...
PyAlg & | operator= (const PyAlg &)=delete
| 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 62 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 72 of file Algorithm.h.

74 : ALGORITHM ( name , Gaudi::svcLocator() )
75 , m_self ( self )
76 {
77 // the printout of actual type for embedded algorithm has no sense
78 this->setProperty ( "TypePrint" , "false" ) ;
79 this->setProperty ( "StatPrint" , "true" ) ;
80 // The owner of the Algorithm is Python (as creator) therefore
81 // it should not be deleted by Gaudi (added an extra addRef()).
82 this->addRef() ;
83 this->addRef() ;
84 }
Gaudi::Utils::setProperty
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:1138
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:129
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
template<class ALGORITHM >

GaudiPython::PyAlg< ALGORITHM >::~PyAlg | ( |  | ) |
| override protected default

virtual destructor

template<class ALGORITHM >

GaudiPython::PyAlg< ALGORITHM >::PyAlg | ( |  | ) |
| private delete

the default constructor is disabled

template<class ALGORITHM >

GaudiPython::PyAlg< ALGORITHM >::PyAlg | ( | const PyAlg< ALGORITHM > & |  | ) |
| private delete

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 91 of file Algorithm.h.

91 { return m_self ; } // get the object
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:129
template<class ALGORITHM >

StatusCode GaudiPython::PyAlg< ALGORITHM >::beginRun | ( |  | ) |
| inline override

Definition at line 99 of file Algorithm.h.

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

StatusCode GaudiPython::PyAlg< ALGORITHM >::endRun | ( |  | ) |
| inline override

Definition at line 101 of file Algorithm.h.

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

StatusCode GaudiPython::PyAlg< ALGORITHM >::execute | ( |  | ) |
| inline override

Definition at line 103 of file Algorithm.h.

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

StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize | ( |  | ) |
| inline override

Definition at line 107 of file Algorithm.h.

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

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::finalize_ | ( |  | ) |
| inline virtual

Definition at line 115 of file Algorithm.h.

115 { return ALGORITHM::finalize () ; }
template<class ALGORITHM >

virtual IAlgorithm* GaudiPython::PyAlg< ALGORITHM >::ialgorithm | ( |  | ) |
| inline virtual

Definition at line 110 of file Algorithm.h.

110 { return this ; }
template<class ALGORITHM >

StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize | ( |  | ) |
| inline override

Definition at line 95 of file Algorithm.h.

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

virtual StatusCode GaudiPython::PyAlg< ALGORITHM >::initialize_ | ( |  | ) |
| inline virtual

Definition at line 114 of file Algorithm.h.

114 { return ALGORITHM::initialize () ; }
template<class ALGORITHM >

virtual IProperty* GaudiPython::PyAlg< ALGORITHM >::iproperty | ( |  | ) |
| inline virtual

Definition at line 111 of file Algorithm.h.

111 { return this ; }
template<class ALGORITHM >

PyAlg& GaudiPython::PyAlg< ALGORITHM >::operator= | ( | const PyAlg< ALGORITHM > & |  | ) |
| private delete

the assignment operator is disabled

template<class ALGORITHM >

StatusCode GaudiPython::PyAlg< ALGORITHM >::start | ( |  | ) |
| inline override

Definition at line 97 of file Algorithm.h.

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

StatusCode GaudiPython::PyAlg< ALGORITHM >::stop | ( |  | ) |
| inline override

Definition at line 105 of file Algorithm.h.

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

## Member Data Documentation

template<class ALGORITHM >

PyObject* GaudiPython::PyAlg< ALGORITHM >::m_self
| private

"shadow" python class

Definition at line 129 of file Algorithm.h.

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

- GaudiPython/GaudiPython/Algorithm.h