File indexing completed on 2025-01-18 09:11:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/Utilities/SeedsToPrototracks.hpp"
0010
0011 #include "ActsExamples/EventData/ProtoTrack.hpp"
0012 #include "ActsExamples/EventData/SimSeed.hpp"
0013 #include "ActsExamples/Utilities/EventDataTransforms.hpp"
0014
0015 #include <utility>
0016
0017 namespace ActsExamples {
0018 struct AlgorithmContext;
0019
0020 SeedsToPrototracks::SeedsToPrototracks(Config cfg, Acts::Logging::Level lvl)
0021 : IAlgorithm("SeedsToPrototracks", lvl), m_cfg(std::move(cfg)) {
0022 m_inputSeeds.initialize(m_cfg.inputSeeds);
0023 m_outputProtoTracks.initialize(m_cfg.outputProtoTracks);
0024 }
0025
0026 ProcessCode SeedsToPrototracks::execute(const AlgorithmContext& ctx) const {
0027 const auto seeds = m_inputSeeds(ctx);
0028
0029 ProtoTrackContainer tracks;
0030 tracks.reserve(seeds.size());
0031
0032 std::transform(seeds.begin(), seeds.end(), std::back_inserter(tracks),
0033 seedToPrototrack);
0034
0035 m_outputProtoTracks(ctx, std::move(tracks));
0036
0037 return ProcessCode::SUCCESS;
0038 }
0039 }