Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TrackFindingAlg.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 namespace ActsTrk {
6  template <class HandleArrayKeyType, class ContainerType>
7  StatusCode TrackFindingAlg::getContainersFromKeys(
8  const EventContext &ctx,
9  HandleArrayKeyType &handleKeyArray,
10  std::vector<const ContainerType *> &outputContainers,
11  std::size_t &sum) const {
12  outputContainers.reserve(handleKeyArray.size());
13  for (const auto &handleKey : handleKeyArray) {
14  ATH_MSG_DEBUG("Reading input collection with key " << handleKey.key());
15  auto handle = SG::makeHandle(handleKey, ctx);
16  ATH_CHECK(handle.isValid());
17  outputContainers.push_back(handle.cptr());
18  ATH_MSG_DEBUG("Retrieved " << outputContainers.back()->size()
19  << " input elements from key " << handle.key());
20  sum += outputContainers.back()->size();
21  }
22 
23  return StatusCode::SUCCESS;
24  }
25 } // namespace ActsTrk