The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Algorithm.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12// ============================================================================
13// Include Files
14// ============================================================================
15// Python
16// ============================================================================
17#include <Python.h>
18// ============================================================================
19// GaudiKernel
20// ============================================================================
23// ============================================================================
24// GaudiPython
25// ============================================================================
27// ============================================================================
28
29namespace GaudiPython {
31 GAUDI_API StatusCode call_python_method( PyObject* self, const char* method );
32} // namespace GaudiPython
33
34namespace GaudiPython {
35
40 public:
45 PyAlgorithm( PyObject* self, const std::string& name );
46
47 public:
48 StatusCode initialize() override;
49 StatusCode start() override;
50 StatusCode execute() override;
51 StatusCode stop() override;
52 StatusCode finalize() override;
53 IAlgorithm* myself() { return this; }
54
55 private:
56 PyObject* m_self;
57 };
58 // ==========================================================================
59} // end of namespace GaudiPython
60// ============================================================================
61// The END
62// ============================================================================
#define GAUDI_API
Definition Kernel.h:49
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition Algorithm.h:98
const std::string & name() const override
The identifying name of the algorithm object.
StatusCode initialize() override
StatusCode execute() override
StatusCode finalize() override
IAlgorithm * myself()
Definition Algorithm.h:53
StatusCode start() override
PyAlgorithm(PyObject *self, const std::string &name)
constructor
Definition Algorithm.cpp:96
StatusCode stop() override
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition IAlgorithm.h:37
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
GaudiPython.h GaudiPython/GaudiPython.h.
Definition Algorithm.h:29
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition Algorithm.cpp:48