File indexing completed on 2025-01-18 09:11:49
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/Framework/RandomNumbers.hpp"
0010 #include "ActsExamples/Framework/Sequencer.hpp"
0011
0012 #include <cstdlib>
0013 #include <memory>
0014
0015 #include "HelloLoggerAlgorithm.hpp"
0016 #include "HelloRandomAlgorithm.hpp"
0017 #include "HelloWhiteBoardAlgorithm.hpp"
0018
0019 int main(void) {
0020 Acts::Logging::Level logLevel = Acts::Logging::INFO;
0021
0022
0023 auto rnd = std::make_shared<ActsExamples::RandomNumbers>(
0024 ActsExamples::RandomNumbers::Config{});
0025
0026
0027 ActsExamples::Sequencer::Config seqCfg;
0028 seqCfg.events = 10;
0029 seqCfg.numThreads = -1;
0030 ActsExamples::Sequencer sequencer(seqCfg);
0031
0032
0033 sequencer.addAlgorithm(
0034 std::make_shared<ActsExamples::HelloLoggerAlgorithm>(logLevel));
0035
0036
0037
0038 ActsExamples::HelloRandomAlgorithm::Config rndCfg;
0039 rndCfg.randomNumbers = rnd;
0040 rndCfg.gaussParameters = {{0., 2.5}};
0041 rndCfg.uniformParameters = {{-1.23, 4.25}};
0042 rndCfg.gammaParameters = {{1., 1.}};
0043 rndCfg.drawsPerEvent = 5000;
0044 rndCfg.output = "random_data";
0045 sequencer.addAlgorithm(
0046 std::make_shared<ActsExamples::HelloRandomAlgorithm>(rndCfg, logLevel));
0047
0048
0049 ActsExamples::HelloWhiteBoardAlgorithm::Config wbCfg;
0050
0051 wbCfg.input = rndCfg.output;
0052 wbCfg.output = "copied_data";
0053 sequencer.addAlgorithm(
0054 std::make_shared<ActsExamples::HelloWhiteBoardAlgorithm>(wbCfg,
0055 logLevel));
0056
0057
0058 return sequencer.run();
0059 }