Gaudi Framework, version v20r2

Generated: 18 Jul 2008

GaudiPython::PyAlg< ALGORITHM > Class Template Reference

#include <Algorithm.h>

Inheritance diagram for GaudiPython::PyAlg< ALGORITHM >:

Inheritance graph
[legend]
Collaboration diagram for GaudiPython::PyAlg< ALGORITHM >:

Collaboration graph
[legend]
List of all members.

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

Public Member Functions

 PyAlg (PyObject *self, const std::string &name)
 constructor from Python object and the name
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED).
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING).
virtual StatusCode beginRun ()
 Algorithm begin run.
virtual StatusCode endRun ()
 Algorithm end run.
virtual StatusCode execute ()
 The action to be performed by the algorithm on an event.
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED).
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED).
virtual IAlgorithmialgorithm ()
virtual IPropertyiproperty ()
virtual StatusCode initialize_ ()
virtual StatusCode finalize_ ()

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


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

References IInterface::addRef(), and IProperty::setProperty().

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

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

virtual destructor

Definition at line 94 of file Algorithm.h.

00094 {}

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

References GaudiPython::PyAlg< ALGORITHM >::m_self.

00095 { return m_self ; }

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

Initialization (from CONFIGURED to INITIALIZED).

Implements IAlgorithm.

Definition at line 98 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Start (from INITIALIZED to RUNNING).

Implements IAlgorithm.

Definition at line 101 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Algorithm begin run.

This method is called at the beginning of the event loop.

Implements IAlgorithm.

Definition at line 104 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Algorithm end run.

This method is called at the end of the event loop.

Implements IAlgorithm.

Definition at line 106 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

The action to be performed by the algorithm on an event.

This method is invoked once per event for top level algorithms by the application manager.

Implements IAlgorithm.

Definition at line 109 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Stop (from RUNNING to INITIALIZED).

Implements IAlgorithm.

Definition at line 112 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Finalize (from INITIALIZED to CONFIGURED).

Implements IAlgorithm.

Definition at line 114 of file Algorithm.h.

References GaudiPython::call_python_method(), and GaudiPython::PyAlg< ALGORITHM >::m_self.

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

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

Definition at line 117 of file Algorithm.h.

00117 { return this ; }

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

Definition at line 118 of file Algorithm.h.

00118 { return this ; }

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

Definition at line 121 of file Algorithm.h.

00121 { return ALGORITHM::initialize () ; }

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

Definition at line 122 of file Algorithm.h.

00122 { 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 133 of file Algorithm.h.

Referenced by GaudiPython::PyAlg< ALGORITHM >::_obj(), GaudiPython::PyAlg< ALGORITHM >::beginRun(), GaudiPython::PyAlg< ALGORITHM >::endRun(), GaudiPython::PyAlg< ALGORITHM >::execute(), GaudiPython::PyAlg< ALGORITHM >::finalize(), GaudiPython::PyAlg< ALGORITHM >::initialize(), GaudiPython::PyAlg< ALGORITHM >::start(), and GaudiPython::PyAlg< ALGORITHM >::stop().


The documentation for this class was generated from the following file:
Generated at Fri Jul 18 12:10:32 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004