| The Gaudi Framework v32r1 (f65d50dc)

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

## Constructor & Destructor Documentation

## ◆ PyAlg() [1/3]

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

67 : ALGORITHM( name, Gaudi::svcLocator() ), m_self( self ) {
68 // the printout of actual type for embedded algorithm has no sense
69 this->setProperty( "TypePrint", "false" );
70 this->setProperty( "StatPrint", "true" );
71 // The owner of the Algorithm is Python (as creator) therefore
72 // it should not be deleted by Gaudi (added an extra addRef()).
73 this->addRef();
74 this->addRef();
75 }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
setProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:233

## ◆ PyAlg() [2/3]

template<class ALGORITHM >

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

the default constructor is disabled

## ◆ PyAlg() [3/3]

template<class ALGORITHM >

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

the copy constructor is disabled

## Member Function Documentation

## ◆ _obj()

template<class ALGORITHM >

PyObject* GaudiPython::PyAlg< ALGORITHM >::_obj | ( |  | ) | const
| inline protected

get the object

Definition at line 80 of file Algorithm.h.

80 { return m_self; } // get the object
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111

## ◆ beginRun()

template<class ALGORITHM >

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

Definition at line 86 of file Algorithm.h.

86 { return GaudiPython::call_python_method( m_self, "beginRun" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ endRun()

template<class ALGORITHM >

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

Definition at line 87 of file Algorithm.h.

87 { return GaudiPython::call_python_method( m_self, "endRun" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ execute()

template<class ALGORITHM >

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

Definition at line 88 of file Algorithm.h.

88 { return GaudiPython::call_python_method( m_self, "execute" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ finalize()

template<class ALGORITHM >

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

Definition at line 90 of file Algorithm.h.

90 { return GaudiPython::call_python_method( m_self, "finalize" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ finalize_()

template<class ALGORITHM >

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

Definition at line 97 of file Algorithm.h.

97 { return ALGORITHM::finalize(); }

## ◆ ialgorithm()

template<class ALGORITHM >

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

Definition at line 92 of file Algorithm.h.

92 { return this; }

## ◆ initialize()

template<class ALGORITHM >

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

Definition at line 84 of file Algorithm.h.

84 { return GaudiPython::call_python_method( m_self, "initialize" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ initialize_()

template<class ALGORITHM >

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

Definition at line 96 of file Algorithm.h.

96 { return ALGORITHM::initialize(); }

## ◆ iproperty()

template<class ALGORITHM >

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

Definition at line 93 of file Algorithm.h.

93 { return this; }

## ◆ operator=()

template<class ALGORITHM >

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

the assignment operator is disabled

## ◆ start()

template<class ALGORITHM >

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

Definition at line 85 of file Algorithm.h.

85 { return GaudiPython::call_python_method( m_self, "start" ); }
GaudiPython::PyAlg::m_self
PyObject * m_self
"shadow" python class
Definition: Algorithm.h:111
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

## ◆ stop()

template<class ALGORITHM >

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

Definition at line 89 of file Algorithm.h.

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

## Member Data Documentation

## ◆ m_self

template<class ALGORITHM >

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

"shadow" python class

Definition at line 111 of file Algorithm.h.

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

- GaudiPython/GaudiPython/Algorithm.h