30 testInvariant ()
const
48 m_algorithmCount (that.m_algorithmCount)
52 for (
const auto&
algorithm : that.m_algorithms)
56 m_algorithms.push_back (
algorithm->makeClone ());
59 m_algorithms.emplace_back (
nullptr);
80 ~JobConfig ()
noexcept
115 std::swap (m_algorithmCount, that.m_algorithmCount);
116 m_algorithms.swap (that.m_algorithms);
122 addAlgorithm (std::unique_ptr<IAlgorithmWrapper>&& val_algorithm)
124 using namespace msgEventLoop;
129 if (getAlgorithm (val_algorithm->getName()) !=
nullptr)
131 ANA_MSG_ERROR (
"can't have two algorithms with the same name: " << val_algorithm->getName());
132 return ::StatusCode::FAILURE;
135 m_algorithms.push_back (std::move (val_algorithm));
137 return ::StatusCode::SUCCESS;
142 const IAlgorithmWrapper *JobConfig ::
143 getAlgorithm (std::string_view name)
const noexcept
146 for (
const auto&
algorithm : m_algorithms)
156 std::vector<Detail::AlgorithmData> JobConfig ::
160 if (m_algorithmCount != m_algorithms.size())
161 RCU_THROW_MSG (
"algorithm count missmatch. streaming error?");
162 for (
const auto&
algorithm : m_algorithms)
167 m_algorithmCount = 0;
168 std::vector<Detail::AlgorithmData> result;
169 result.reserve (m_algorithms.size());
171 result.emplace_back (std::move (
algorithm));
172 m_algorithms.clear();
173 for (
auto sequenceStartIndex : m_algSequenceStartIndices)
178 if (sequenceStartIndex < result.size())
179 result[sequenceStartIndex].m_sequenceStart =
true;
186 std::size_t JobConfig ::
187 numberOfAlgorithms ()
const noexcept
190 return m_algorithms.size();
197 startNewAlgSequence ()
200 m_algSequenceStartIndices.push_back (m_algorithms.size());