File indexing completed on 2026-03-28 07:46:22
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Utilities/Logger.hpp"
0010 #include "ActsExamples/HelloWorld/HelloLoggerAlgorithm.hpp"
0011 #include "ActsExamples/HelloWorld/HelloRandomAlgorithm.hpp"
0012 #include "ActsExamples/HelloWorld/HelloWhiteBoardAlgorithm.hpp"
0013 #include "ActsPython/Utilities/Macros.hpp"
0014
0015 #include <memory>
0016
0017 #include <pybind11/pybind11.h>
0018 #include <pybind11/stl.h>
0019
0020 namespace py = pybind11;
0021
0022 using namespace ActsExamples;
0023 using namespace Acts;
0024
0025 namespace ActsPython {
0026
0027 void addHelloWorld(py::module& mex) {
0028 py::class_<HelloLoggerAlgorithm, IAlgorithm,
0029 std::shared_ptr<HelloLoggerAlgorithm>>(mex, "HelloLoggerAlgorithm")
0030 .def(py::init([](Logging::Level level) {
0031 return std::make_shared<HelloLoggerAlgorithm>(
0032 getDefaultLogger("HelloLoggerAlgorithm", level));
0033 }),
0034 py::arg("level"))
0035 .def(py::init([](std::unique_ptr<const Logger> logger) {
0036 return std::make_shared<HelloLoggerAlgorithm>(std::move(logger));
0037 }),
0038 py::arg("logger"));
0039
0040 ACTS_PYTHON_DECLARE_ALGORITHM(
0041 HelloRandomAlgorithm, mex, "HelloRandomAlgorithm", randomNumbers,
0042 gaussParameters, uniformParameters, gammaParameters, poissonParameter,
0043 drawsPerEvent, output);
0044
0045 ACTS_PYTHON_DECLARE_ALGORITHM(HelloWhiteBoardAlgorithm, mex,
0046 "HelloWhiteBoardAlgorithm", input, output);
0047 }
0048
0049 }