ATLAS Offline Software
Loading...
Searching...
No Matches
FeatureRequestHelpers.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#include "TrigCompositeUtils/LinkInfo.h"
6#include "TrigCompositeUtils/TypelessLinkInfo.h"
7
8namespace FeatureRequestHelpers {
9
10 template<class CONTAINER>
11 std::vector<TrigCompositeUtils::LinkInfo<CONTAINER>> typedFeaturesWrapper(
12 const std::vector<TrigCompositeUtils::TypelessLinkInfo>& typelessLinkInfos,
13 [[maybe_unused]] const EventContext& ctx,
14 [[maybe_unused]] const asg::EventStoreType* eventStore)
15 {
16 std::vector<TrigCompositeUtils::LinkInfo<CONTAINER>> returnVector;
17 returnVector.reserve(typelessLinkInfos.size());
18 for (const TrigCompositeUtils::TypelessLinkInfo& f : typelessLinkInfos) {
19#ifdef XAOD_STANDALONE
20 returnVector.emplace_back(f, ElementLink<CONTAINER>(f.key, f.index, eventStore->event()));
21#else
22 returnVector.emplace_back(f, ElementLink<CONTAINER>(f.key, f.index, ctx));
23#endif
24 }
25 return returnVector;
26 }
27
28} // namespace FeatureRequestHelpers