30 testInvariant ()
const
48 m_algorithmCount (that.m_algorithmCount),
49 m_algSequenceStartIndices (that.m_algSequenceStartIndices)
53 for (
const auto&
algorithm : that.m_algorithms)
57 m_algorithms.push_back (
algorithm->makeClone ());
60 m_algorithms.emplace_back (
nullptr);
81 ~JobConfig ()
noexcept
116 std::swap (m_algorithmCount, that.m_algorithmCount);
117 m_algorithms.swap (that.m_algorithms);
118 m_algSequenceStartIndices.swap (that.m_algSequenceStartIndices);
124 addAlgorithm (std::unique_ptr<IAlgorithmWrapper>&& val_algorithm)
126 using namespace msgEventLoop;
131 if (getAlgorithm (val_algorithm->getName()) !=
nullptr)
133 ANA_MSG_ERROR (
"can't have two algorithms with the same name: " << val_algorithm->getName());
134 return ::StatusCode::FAILURE;
137 m_algorithms.push_back (std::move (val_algorithm));
139 return ::StatusCode::SUCCESS;
144 const IAlgorithmWrapper *JobConfig ::
145 getAlgorithm (std::string_view name)
const noexcept
148 for (
const auto&
algorithm : m_algorithms)
158 std::vector<Detail::AlgorithmData> JobConfig ::
162 if (m_algorithmCount != m_algorithms.size())
163 RCU_THROW_MSG (
"algorithm count missmatch. streaming error?");
164 for (
const auto&
algorithm : m_algorithms)
169 m_algorithmCount = 0;
170 std::vector<Detail::AlgorithmData> result;
171 result.reserve (m_algorithms.size());
173 result.emplace_back (std::move (
algorithm));
174 m_algorithms.clear();
175 for (
auto sequenceStartIndex : m_algSequenceStartIndices)
180 if (sequenceStartIndex < result.size())
181 result[sequenceStartIndex].m_sequenceStart =
true;
188 std::size_t JobConfig ::
189 numberOfAlgorithms ()
const noexcept
192 return m_algorithms.size();
199 startNewAlgSequence ()
202 m_algSequenceStartIndices.push_back (m_algorithms.size());