|
||||
File indexing completed on 2024-11-15 09:38:45
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIPYTHON_ALGORITHM_H 0012 #define GAUDIPYTHON_ALGORITHM_H 0013 // ============================================================================ 0014 // Include Files 0015 // ============================================================================ 0016 // Python 0017 // ============================================================================ 0018 #include "Python.h" 0019 // ============================================================================ 0020 // GaudiKernel 0021 // ============================================================================ 0022 #include "GaudiKernel/Algorithm.h" 0023 #include "GaudiKernel/Bootstrap.h" 0024 // ============================================================================ 0025 // GaudiPython 0026 // ============================================================================ 0027 #include "GaudiPython/GaudiPython.h" 0028 // ============================================================================ 0029 0030 namespace GaudiPython { 0031 /// call the python method 0032 GAUDI_API StatusCode call_python_method( PyObject* self, const char* method ); 0033 } // namespace GaudiPython 0034 0035 namespace GaudiPython { 0036 0037 /** @class PyAlgorithm 0038 * Python Algorithm base class 0039 */ 0040 class GAUDI_API PyAlgorithm : public Algorithm { 0041 public: 0042 /** constructor 0043 * @param self python objects 0044 * @param name name of algorithm instance 0045 */ 0046 PyAlgorithm( PyObject* self, const std::string& name ); 0047 0048 public: 0049 StatusCode initialize() override; 0050 StatusCode start() override; 0051 StatusCode execute() override; 0052 StatusCode stop() override; 0053 StatusCode finalize() override; 0054 IAlgorithm* myself() { return this; } 0055 0056 private: 0057 PyObject* m_self; 0058 }; 0059 // ========================================================================== 0060 } // end of namespace GaudiPython 0061 // ============================================================================ 0062 // The END 0063 // ============================================================================ 0064 #endif // GAUDIPYTHON_ALGORITHM_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |