ATLAS Offline Software
FeatureRequestHelpers.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigAnalysisHelpers_FeatureRequestHelper_h
6 #define TrigAnalysisHelpers_FeatureRequestHelper_h
7 
9 
12 
14 
18 
20 
21 #include <vector>
22 
23 namespace FeatureRequestHelpers {
25 
33  template<class CONTAINER>
34  std::vector<TrigCompositeUtils::LinkInfo<CONTAINER>> typedFeaturesWrapper(
35  const std::vector<TrigCompositeUtils::TypelessLinkInfo>& typelessLinkInfos,
36  const EventContext& ctx,
37  const asg::EventStoreType* eventStore = nullptr);
38 
51  std::vector<TrigCompositeUtils::TypelessLinkInfo> typelessFeaturesImplimentation(
53  const CLID clid,
55  MsgStream& msg,
56  const EventContext& ctx,
57  const asg::EventStoreType* eventStore = nullptr,
58  const bool printWarningMessages = true);
59 
73  const std::vector<TrigCompositeUtils::TypelessLinkInfo> typelessGetFeatures(
74  const TrigCompositeUtils::NavGraph& navGraph,
76  const CLID clid,
78  const EventContext& ctx,
79  const asg::EventStoreType* eventStore = nullptr);
80 
89  std::vector<TrigCompositeUtils::TypelessLinkInfo>& features,
90  std::set<const TrigCompositeUtils::NavGraphNode*>& fullyExploredFrom,
91  const TrigCompositeUtils::NavGraphNode* navGraphNode,
92  // Following are passed down from typelessGetFeatures
94  const CLID clid,
96  const EventContext& ctx,
97  const asg::EventStoreType* eventStore = nullptr);
98 
109  const std::regex& expression,
110  std::vector<sgkey_t>& keyVec,
111  std::vector<CLID>& clidVec,
112  std::vector<TrigCompositeUtils::Decision::index_type>&indexVec,
113  const EventContext& ctx,
114  const asg::EventStoreType* eventStore = nullptr);
115 
116 }
117 
118 #include "FeatureRequestHelpers.icc"
119 
120 #endif
FeatureRequestHelpers
Definition: FeatureRequestHelpers.cxx:14
TypelessLinkInfo.h
Trig::FeatureRequestDescriptor
Definition: TrigAnalysisHelpers/TrigAnalysisHelpers/FeatureRequestDescriptor.h:33
FeatureRequestDescriptor.h
FeatureRequestHelpers::typelessGetFeatures
const std::vector< TrigCompositeUtils::TypelessLinkInfo > typelessGetFeatures(const TrigCompositeUtils::NavGraph &navGraph, const Trig::FeatureRequestDescriptor &frd, const CLID clid, const TrigCompositeUtils::DecisionIDContainer chainIDs, const EventContext &ctx, const asg::EventStoreType *eventStore)
Extract features from the supplied navGraph (obtained through typelessGetFeaturesInternal).
Definition: FeatureRequestHelpers.cxx:152
python.HION12.expression
string expression
Definition: HION12.py:55
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:122
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TrigCompositeUtils::NavGraph
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
Definition: NavGraph.h:111
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
sgkey_utilities.h
Additional utilities and types related to sgkey_t.
TrigCompositeAuxContainer.h
TrigCompositeContainer.h
FeatureRequestHelpers::filterLinkVectorByContainerKey
void filterLinkVectorByContainerKey(const std::regex &expression, std::vector< sgkey_t > &keyVec, std::vector< CLID > &clidVec, std::vector< TrigCompositeUtils::Decision::index_type > &indexVec, [[maybe_unused]] const EventContext &ctx, [[maybe_unused]] const asg::EventStoreType *eventStore)
Definition: FeatureRequestHelpers.cxx:326
LinkInfo.h
FeatureRequestHelpers.icc
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: sgkey_t.h:32
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
TrigCompositeUtils::NavGraphNode
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
Definition: NavGraph.h:20
FeatureRequestHelpers::typelessGetFeaturesInternal
void typelessGetFeaturesInternal(std::vector< TrigCompositeUtils::TypelessLinkInfo > &features, std::set< const TrigCompositeUtils::NavGraphNode * > &fullyExploredFrom, const TrigCompositeUtils::NavGraphNode *navGraphNode, const Trig::FeatureRequestDescriptor &frd, const CLID clid, const TrigCompositeUtils::DecisionIDContainer chainIDs, const EventContext &ctx, const asg::EventStoreType *eventStore)
Internal implementation called by typelessGetFeatures, and by itself.
Definition: FeatureRequestHelpers.cxx:181
NavGraph.h
FeatureRequestHelpers::sgkey_t
SG::sgkey_t sgkey_t
Definition: FeatureRequestHelpers.h:24
FeatureRequestHelpers::typelessFeaturesImplimentation
std::vector< TrigCompositeUtils::TypelessLinkInfo > typelessFeaturesImplimentation(const Trig::FeatureRequestDescriptor &frd, const CLID clid, const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > &navRHKey, MsgStream &msg, const EventContext &ctx, const asg::EventStoreType *eventStore, const bool printWarningMessages)
Standalone implementation of feature retrieval, common between TrigDecisionTool and TrigDecisionToolL...
Definition: FeatureRequestHelpers.cxx:16
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
FeatureRequestHelpers::typedFeaturesWrapper
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > typedFeaturesWrapper(const std::vector< TrigCompositeUtils::TypelessLinkInfo > &typelessLinkInfos, const EventContext &ctx, const asg::EventStoreType *eventStore=nullptr)
Wrapper function to convert between vector<TypelessLinkInfo> and vector<LinkInfo<T>>.