File indexing completed on 2026-03-28 07:45:49
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/HelloWorld/HelloWhiteBoardAlgorithm.hpp"
0010
0011 namespace ActsExamples {
0012
0013 HelloWhiteBoardAlgorithm::HelloWhiteBoardAlgorithm(
0014 const Config& cfg, std::unique_ptr<const Acts::Logger> logger)
0015 : IAlgorithm("HelloWhiteBoard", std::move(logger)), m_cfg(cfg) {
0016
0017 if (m_cfg.input.empty()) {
0018 throw std::invalid_argument("Missing input collection");
0019 }
0020 m_readHandle.initialize(m_cfg.input);
0021 if (m_cfg.output.empty()) {
0022 throw std::invalid_argument("Missing output collection");
0023 }
0024 m_writeHandle.initialize(m_cfg.output);
0025 }
0026
0027 ProcessCode HelloWhiteBoardAlgorithm::execute(
0028 const AlgorithmContext& ctx) const {
0029
0030 ACTS_INFO("Reading HelloDataCollection " << m_cfg.input);
0031 const auto& in = m_readHandle(ctx);
0032 ACTS_VERBOSE("Read HelloDataCollection with size " << in.size());
0033
0034
0035 HelloDataCollection copy(in);
0036
0037
0038
0039 ACTS_INFO("Writing HelloDataCollection " << m_cfg.output);
0040 m_writeHandle(ctx, std::move(copy));
0041
0042 return ProcessCode::SUCCESS;
0043 }
0044
0045 }