File indexing completed on 2025-01-18 09:11:49
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "ActsExamples/Framework/DataHandle.hpp"
0012 #include "ActsExamples/Framework/IAlgorithm.hpp"
0013 #include "ActsExamples/Framework/RandomNumbers.hpp"
0014
0015 #include <array>
0016 #include <memory>
0017 #include <string>
0018
0019 #include "HelloData.hpp"
0020
0021 namespace ActsExamples {
0022
0023
0024 class HelloRandomAlgorithm : public ActsExamples::IAlgorithm {
0025 public:
0026 struct Config {
0027 std::shared_ptr<ActsExamples::RandomNumbers> randomNumbers = nullptr;
0028
0029 std::array<double, 2> gaussParameters = {{0., 1.}};
0030 std::array<double, 2> uniformParameters = {{0., 1.}};
0031 std::array<double, 2> gammaParameters = {{0., 1.}};
0032 int poissonParameter = 40;
0033 std::size_t drawsPerEvent = 0;
0034
0035 std::string output;
0036 };
0037
0038 HelloRandomAlgorithm(const Config& cfg,
0039 Acts::Logging::Level level = Acts::Logging::INFO);
0040
0041
0042 ActsExamples::ProcessCode execute(const AlgorithmContext& ctx) const override;
0043
0044 WriteDataHandle<HelloDataCollection> m_writeHandle{this, "Output"};
0045
0046 private:
0047 Config m_cfg;
0048 };
0049
0050 }