| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GaudiPython::PyAlg< ALGORITHM > Class Template Reference

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

#include <Algorithm.h>

Inheritance diagram for GaudiPython::PyAlg< ALGORITHM >:

[legend]
Collaboration diagram for GaudiPython::PyAlg< ALGORITHM >:
[legend]
List of all members.

Public Types

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  Status
 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  Status

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_ ()
virtual const std::string & version () const =0
virtual bool isInitialized () const =0
virtual bool isFinalized () const =0
virtual bool isExecuted () const =0
virtual StatusCode configure ()=0
virtual StatusCode terminate ()=0
virtual StatusCode reinitialize ()=0
virtual StatusCode restart ()=0
virtual Gaudi::StateMachine::State FSMState () const =0
virtual StatusCode sysInitialize ()=0
virtual StatusCode sysStart ()=0
virtual StatusCode sysReinitialize ()=0
virtual StatusCode sysRestart ()=0
virtual StatusCode sysExecute ()=0
virtual StatusCode sysStop ()=0
virtual StatusCode sysFinalize ()=0
virtual StatusCode sysBeginRun ()=0
virtual StatusCode sysEndRun ()=0
virtual void resetExecuted ()=0
virtual void setExecuted (bool state)=0
virtual bool isEnabled () const =0
virtual bool filterPassed () const =0
virtual void setFilterPassed (bool state)=0
virtual const std::string & name () const =0
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)=0
virtual unsigned long addRef ()=0
virtual unsigned long release ()=0
virtual StatusCode setProperty (const Property &p)=0
virtual StatusCode setProperty (const std::string &s)=0
virtual StatusCode setProperty (const std::string &n, const std::string &v)=0
virtual StatusCode getProperty (Property *p) const =0
virtual const PropertygetProperty (const std::string &name) const =0
virtual StatusCode getProperty (const std::string &n, std::string &v) const =0
virtual const std::vector<
Property * > & 
getProperties () const =0
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)=0
virtual unsigned long addRef ()=0
virtual unsigned long release ()=0

Static Public Member Functions

static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()

Public Attributes

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR

Protected Member Functions

virtual ~PyAlg ()
 virtual destructor
PyObject * _obj () const

Private Member Functions

 PyAlg ()
 PyAlg (const PyAlg &)
PyAlgoperator= (const PyAlg &)

Private Attributes

PyObject * m_self

Detailed Description

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

general class to embedd 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 76 of file Algorithm.h.

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

template<class ALGORITHM>
virtual GaudiPython::PyAlg< ALGORITHM >::~PyAlg (  )  [inline, protected, virtual]

virtual destructor

Definition at line 92 of file Algorithm.h.

00092 {}

template<class ALGORITHM>
GaudiPython::PyAlg< ALGORITHM >::PyAlg (  )  [private]

template<class ALGORITHM>
GaudiPython::PyAlg< ALGORITHM >::PyAlg ( const PyAlg< ALGORITHM > &   )  [private]


Member Function Documentation

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

Definition at line 93 of file Algorithm.h.

00093 { return m_self ; }

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

Implements IAlgorithm.

Definition at line 96 of file Algorithm.h.

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

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

Implements IAlgorithm.

Definition at line 99 of file Algorithm.h.

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

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

Implements IAlgorithm.

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]

Implements IAlgorithm.

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]

Implements IAlgorithm.

Definition at line 107 of file Algorithm.h.

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

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

Implements IAlgorithm.

Definition at line 110 of file Algorithm.h.

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

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

Implements IAlgorithm.

Definition at line 112 of file Algorithm.h.

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

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

Definition at line 115 of file Algorithm.h.

00115 { return this ; }

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

Definition at line 116 of file Algorithm.h.

00116 { return this ; }

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

Definition at line 119 of file Algorithm.h.

00119 { return ALGORITHM::initialize () ; }

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

Definition at line 120 of file Algorithm.h.

00120 { return ALGORITHM::finalize   () ; }

template<class ALGORITHM>
PyAlg& GaudiPython::PyAlg< ALGORITHM >::operator= ( const PyAlg< ALGORITHM > &   )  [private]


Member Data Documentation

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

Definition at line 131 of file Algorithm.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:58:57 2011 for GaudiPython by doxygen 1.4.7