ATLAS Offline Software
Typedefs | Functions
FeatureRequestHelpers Namespace Reference

Typedefs

using sgkey_t = SG::sgkey_t
 

Functions

std::vector< TrigCompositeUtils::TypelessLinkInfotypelessFeaturesImplimentation (const Trig::FeatureRequestDescriptor &frd, const CLID clid, const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > &navRH, MsgStream &msg, const EventContext &ctx, const asg::EventStoreType *eventStore=nullptr, const bool printWarningMessages=true)
 Standalone implementation of feature retrieval, common between TrigDecisionTool and TrigDecisionToolLite This is a type erased implementation which accepts a CLID. More...
 
const std::vector< TrigCompositeUtils::TypelessLinkInfotypelessGetFeatures (const TrigCompositeUtils::NavGraph &navGraph, const Trig::FeatureRequestDescriptor &frd, const CLID clid, const TrigCompositeUtils::DecisionIDContainer chainIDs, const EventContext &ctx, const asg::EventStoreType *eventStore=nullptr)
 Extract features from the supplied navGraph (obtained through typelessGetFeaturesInternal). More...
 
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=nullptr)
 Internal implementation called by typelessGetFeatures, and by itself. More...
 
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)
 
template<class CONTAINER >
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>>. More...
 
void filterLinkVectorByContainerKey (const std::regex &expression, std::vector< sgkey_t > &keyVec, std::vector< CLID > &clidVec, std::vector< TrigCompositeUtils::Decision::index_type > &indexVec, const EventContext &ctx, const asg::EventStoreType *eventStore=nullptr)
 Removes type erased element links from the supplied vectors if they do not come from the specified collection (regex match). More...
 

Typedef Documentation

◆ sgkey_t

Definition at line 24 of file FeatureRequestHelpers.h.

Function Documentation

◆ filterLinkVectorByContainerKey() [1/2]

void FeatureRequestHelpers::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 at line 326 of file FeatureRequestHelpers.cxx.

333  {
334  if (std::regex_match("", expression)) { // No filtering if empty string supplied as pattern
335  return;
336  }
337  std::vector<size_t> indicesToRemove;
338  for (size_t i = 0; i < keyVec.size(); ++i) {
339 #ifdef XAOD_STANDALONE
340  const std::string keyStr = eventStore->event()->getName(keyVec[i]);
341  const std::string* keyStrPtr = (keyStr.empty() ? nullptr : &keyStr);
342 #else
343  const std::string* keyStrPtr = Atlas::getExtendedEventContext(ctx).proxy()->keyToString(keyVec[i], clidVec[i]);
344 
345 #endif
346  // We will not be able to resolve the key for any collection which isn't in the POOL file.
347  // We reject the link in this case
348  if (not keyStrPtr or not std::regex_match(*keyStrPtr, expression)) {
349  indicesToRemove.push_back(i);
350  }
351  }
352  // Do the erasing. NOTE, must back-iterate to keep the indices matching
353  for (auto it = indicesToRemove.rbegin(); it != indicesToRemove.rend(); ++it) {
354  keyVec.erase(keyVec.begin() + *it);
355  clidVec.erase(clidVec.begin() + *it);
356  indexVec.erase(indexVec.begin() + *it);
357  }
358  }

◆ filterLinkVectorByContainerKey() [2/2]

void FeatureRequestHelpers::filterLinkVectorByContainerKey ( const std::regex &  expression,
std::vector< sgkey_t > &  keyVec,
std::vector< CLID > &  clidVec,
std::vector< TrigCompositeUtils::Decision::index_type > &  indexVec,
const EventContext &  ctx,
const asg::EventStoreType eventStore = nullptr 
)

Removes type erased element links from the supplied vectors if they do not come from the specified collection (regex match).

Parameters
[in]expressionRegex compiled StoreGate key of the collection to match against. Passing "" as the string wrapped in the expression performs no filtering.
[in,out]keyVecMutable vector of element link keys on which to filter.
[in,out]clidVecMutable vector of element link CLIDs on which to filter.
[in,out]indexVecMutable vector of element link indices on which to filter.
[in]ctxEvent context.
[in]eventStoreOptional pointer to event store, only needed in AnalysisBase.

◆ typedFeaturesWrapper()

template<class CONTAINER >
std::vector<TrigCompositeUtils::LinkInfo<CONTAINER> > FeatureRequestHelpers::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>>.

Parameters
[in]typelessLinkInfosVector of type erased LinkInfo objects of which we will apply type wrapping.
[in]ctxEvent context for Element Link construction.
[in]eventStorePointer to event store, only used in AnalysisBase for Element Link construction.
Returns
Vector of typed LinkInfo objects each containing an ElementLink to a feature and a pointer to the feature's Decision object in the navigation.

◆ typelessFeaturesImplimentation()

std::vector< TrigCompositeUtils::TypelessLinkInfo > FeatureRequestHelpers::typelessFeaturesImplimentation ( const Trig::FeatureRequestDescriptor frd,
const CLID  clid,
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > &  navRH,
MsgStream &  msg,
const EventContext &  ctx,
const asg::EventStoreType eventStore = nullptr,
const bool  printWarningMessages = true 
)

Standalone implementation of feature retrieval, common between TrigDecisionTool and TrigDecisionToolLite This is a type erased implementation which accepts a CLID.

Users are expected to use typed interfaces in the respective tools.

Parameters
[in]frdFeature request descriptor containing details of the feature request.
[in]clidThe Class ID of the requested feature's container. Originates from typed caller template parameter. May be CLID of xAOD::IParticleContainer for generic four vector access.
[in]navRHRead handle key for the primary navigation container (containing the terminus node)
[in]msgReference to message stream for printing
[in]ctxEvent context for Read Handle construction and SG key hash resolution
[in]eventStorePointer to event store, only used in AnalysisBase for SG key hash resolution
[in]printWarningMessagesFlag if warnings should be printed regarding leg multiplicity checks
Returns
Typed erased vector of TypelessLinkInfo. Each LinkInfo wraps the raw data needed to construct an ElementLink to a feature and a pointer to the feature's Decision object in the navigation.

Definition at line 16 of file FeatureRequestHelpers.cxx.

24  {
25  HLT::Identifier chainID(frd.chainGroup());
26 
27  bool errState = false;
28  if ( frd.condition() != TrigDefs::Physics && frd.condition() != TrigDefs::includeFailedDecisions ) {
29  msg << MSG::ERROR << "features may only be called with: "
30  "TrigDefs::Physics - features from the legs of the chain(s) which passed the trigger. "
31  "TrigDefs::includeFailedDecisions - all features from the chain(s) irrespective of pass/fail of each Step." << endmsg;
32  errState = true;
33  }
34 
35  if ( frd.featureCollectionMode() != TrigDefs::lastFeatureOfType && frd.featureCollectionMode() != TrigDefs::allFeaturesOfType ) {
36  msg << MSG::ERROR << "featureCollectionMode may only be called with: "
37  "TrigDefs::lastFeatureOfType - stop exploring each route through the navigation once a feature matching all requirements is found. "
38  "TrigDefs::allFeaturesOfType - always fully explore each route through the navigation graph and collect all matching features." << endmsg;
39  errState = true;
40  }
41 
43  if (!navigationRH.isValid()) {
44  msg << MSG::ERROR << "Unable to read trigger navigation from " << navRHKey.key() << ". Cannot retrieve features." << endmsg;
45  errState = true;
46  }
47 
48  // We always want to search from the passed raw terminus node to find features for passed chains.
49  const TrigCompositeUtils::Decision* terminusNode = nullptr;
50  if (!errState) {
51  terminusNode = TrigCompositeUtils::getTerminusNode(navigationRH);
52  if (terminusNode == nullptr) {
53  msg << MSG::ERROR << "Unable to locate HLTPassRaw element of " << navRHKey.key()
54  << ", collection contains " << navigationRH->size() << " nodes." << endmsg;
55  errState = true;
56  }
57  }
58 
59  if (errState) {
60  msg << MSG::ERROR << "Encountered one or more errors in FeatureRequestHelpers::typelessFeaturesImplimentation" << endmsg;
61  throw std::runtime_error("Encountered one or more errors in FeatureRequestHelpers::typelessFeaturesImplimentation");
62  }
63 
64  // The sub-graph from which we will extract features
66 
67  // Collect the set of chain legs for the chain we are fetching
69  chainIDs.insert( chainID.numeric() );
70 
71  const std::vector<int> legMultiplicites = ChainNameParser::multiplicities(chainID.name());
72  if (legMultiplicites.size() == 0) {
73  msg << MSG::ERROR << "chain " << chainID << " has invalid configuration, no parsed multiplicity data." << endmsg;
74  throw std::runtime_error("Encountered chain which could not be parsed in FeatureRequestHelpers::typelessFeaturesImplimentation");
75  } else if (legMultiplicites.size() > 1) {
76  if (frd.restrictRequestToLeg() >= static_cast<int>(legMultiplicites.size()) && printWarningMessages) {
77  msg << MSG::WARNING << "Requested features from leg index " << frd.restrictRequestToLeg() << " for chain " << chainID <<
78  " but this chain only has " << legMultiplicites.size() << " legs" << endmsg;
79  }
80  // For multi-leg chains, the DecisionIDs are handled per leg.
81  // We don't care here exactly how many objects are required per leg, just that there are two-or-more legs
82  for (size_t legNumeral = 0; legNumeral < legMultiplicites.size(); ++legNumeral) {
83  // If frd.restrictRequestToLeg() is -1 then we are NOT filtering on legs, we return features over all legs.
84  if (frd.restrictRequestToLeg() != -1 and frd.restrictRequestToLeg() != static_cast<int>(legNumeral)) {
85  continue;
86  }
87  HLT::Identifier legID = TrigCompositeUtils::createLegName(chainID, legNumeral);
88  chainIDs.insert( legID.numeric() );
89  }
90  }
91  if (msg.level() <= MSG::DEBUG) msg << MSG::DEBUG << "Fetching navigation data for chain " << chainID << " with " << legMultiplicites.size() << " leg(s)." << endmsg;
92  if (msg.level() <= MSG::VERBOSE) {
93  for (const TrigCompositeUtils::DecisionID printID : chainIDs) {
94  msg << MSG::VERBOSE << " -- Collecting for chain or chain-leg: " << HLT::Identifier(printID) << endmsg;
95  }
96  }
97 
98  // Obtain navigation routes for objects which pass
99  // Final parameter TRUE as the chain passed (has its ID in terminusNode)
100  TrigCompositeUtils::recursiveGetDecisions(terminusNode, navGraph, chainIDs, true);
101 
102  if (msg.level() <= MSG::DEBUG) {
103  msg << "Added all passed navigation data for chain " << chainID
104  << ", total nodes:" << navGraph.nodes() << " total edges:" << navGraph.edges() << " final nodes:" << navGraph.finalNodes().size() << endmsg;
105  }
106 
107  // Obtain navigation routes for objects which fail.
108  // Supplying nullptr as the first argument instead of a pointer to the event store means that we can
109  // only seach in compact navigation collections (everything in a single container).
110  // This is always the case offline.
111  if (frd.condition() == TrigDefs::includeFailedDecisions) {
112  std::vector<const TrigCompositeUtils::Decision*> rejectedDecisionNodes =
113  TrigCompositeUtils::getRejectedDecisionNodes(nullptr, ctx, navRHKey.key(), chainIDs);
114 
115  if (msg.level() <= MSG::DEBUG) {
116  msg << MSG::DEBUG << "Chain " << chainID << " has " << rejectedDecisionNodes.size()
117  << " dangling nodes in the graph from objects which were rejected." << endmsg;
118  }
119 
120  for (const TrigCompositeUtils::Decision* rejectedNode : rejectedDecisionNodes) {
121  // Final parameter FALSE as the chain failed here (its ID was removed from rejectedNode)
122  TrigCompositeUtils::recursiveGetDecisions(rejectedNode, navGraph, chainIDs, false);
123  }
124 
125  if (msg.level() <= MSG::DEBUG) {
126  msg << MSG::DEBUG << "Added all failed navigation data for chain " << chainID
127  << ", total nodes:" << navGraph.nodes() << " total edges:" << navGraph.edges() << " final nodes:" << navGraph.finalNodes().size() << endmsg;
128  }
129  }
130 
131  if (msg.level() <= MSG::DEBUG) {
132  msg << MSG::DEBUG << "Finished adding nodes to sub-graph. "
133  << "Total nodes:" << navGraph.nodes() << " total edges:" << navGraph.edges() << " final nodes:" << navGraph.finalNodes().size() << endmsg;
134  }
135  if (msg.level() <= MSG::VERBOSE && navGraph.finalNodes().size()) {
136  for (const TrigCompositeUtils::NavGraphNode* n : navGraph.finalNodes()) {
137  msg << MSG::VERBOSE << " Final node:" << TrigCompositeUtils::decisionToElementLink(n->node(), ctx).dataID() << " #" << n->node()->index() << endmsg;
138  }
139  navGraph.printAllPaths(msg, MSG::VERBOSE);
140  }
141 
142  return typelessGetFeatures(
143  navGraph,
144  frd,
145  clid,
146  std::move(chainIDs),
147  ctx,
148  eventStore);
149  }

◆ typelessGetFeatures()

const std::vector< TrigCompositeUtils::TypelessLinkInfo > FeatureRequestHelpers::typelessGetFeatures ( const TrigCompositeUtils::NavGraph navGraph,
const Trig::FeatureRequestDescriptor frd,
const CLID  clid,
const TrigCompositeUtils::DecisionIDContainer  chainIDs,
const EventContext &  ctx,
const asg::EventStoreType eventStore = nullptr 
)

Extract features from the supplied navGraph (obtained through typelessGetFeaturesInternal).

This is a lower level function call than typelessFeaturesImplimentation, and its use implies that the requisite sub-graph to be explored and set of chain IDs of interest have already been obtained. The feature request descriptor is still passed down as some aspects of the request are only handled at the lower levels (such as store gate key filtering, and link name matching)

Parameters
[in]frdFeature request descriptor containing details of the feature request.
[in]clidThe Class Identifier to use instead of the CONTAINER template type in this type erased function
[in]navGraphSub-graph of the trigger navigation which is to be considered.
[in]chainIDsSet of Chain IDs which features are being requested for. Used to set the ActiveState of returned LinkInfo objects. Empty set denotes no chain filtering.
[in]ctxEvent context.
[in]eventStoreOptional pointer to event store, only needed in AnalysisBase.
Returns
Typed erased vector of TypelessLinkInfo. Each LinkInfo wraps the raw data needed to construct an ElementLink to a feature and a pointer to the feature's Decision object in the navigation.

Definition at line 152 of file FeatureRequestHelpers.cxx.

159  {
160  std::vector<TrigCompositeUtils::TypelessLinkInfo> features; // The return vector
161  std::set<const TrigCompositeUtils::NavGraphNode*> fullyExploredFrom; // Lets us navigate more efficiently
162 
163  // For each starting point through the navigation for a given chain-group
164  for (const TrigCompositeUtils::NavGraphNode* finalNode : navGraph.finalNodes()) {
166  features,
167  fullyExploredFrom,
168  finalNode,
169  //
170  frd,
171  clid,
172  chainIDs,
173  ctx,
174  eventStore);
175  }
176 
177  return features;
178  }

◆ typelessGetFeaturesInternal()

void FeatureRequestHelpers::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 = nullptr 
)

Internal implementation called by typelessGetFeatures, and by itself.

See also
typelessGetFeatures
Parameters
[in,out]featuresThe ultimate return vector. New links are to be appended.
[in,out]fullyExploredFromCache of graph nodes which have been fully explored, and hence don't need exploring again should they show up.
[in]navGraphNodeThe current node in the navGraph which is being explored.

Definition at line 181 of file FeatureRequestHelpers.cxx.

191  {
192 
193  const TrigCompositeUtils::Decision* decisionObj = navGraphNode->node();
194  const TrigCompositeUtils::Decision* decisionObjChild = (navGraphNode->children().size() == 1 ? navGraphNode->children()[0]->node() : nullptr);
195  const std::vector<TrigCompositeUtils::DecisionID> &ids = TrigCompositeUtils::decisionIDs(decisionObj);
196  std::vector<sgkey_t> featureKeys;
197  std::vector<CLID> featureClids;
198  std::vector<TrigCompositeUtils::Decision::index_type> featureIndices;
199 
200  // Look up what named links are available in the Decision Object
201  std::vector<std::string> availableLinkNames;
202  if (frd.linkName().empty()) { // If no link name is requested, then use all available names (look these up)
203  const std::vector<std::string> getSingleLinkNames = decisionObj->getObjectNames(clid);
204  const std::vector<std::string> getCollectionLinkNames = decisionObj->getObjectCollectionNames(clid);
205  std::copy(getSingleLinkNames.begin(), getSingleLinkNames.end(), std::back_inserter(availableLinkNames));
206  std::copy(getCollectionLinkNames.begin(), getCollectionLinkNames.end(), std::back_inserter(availableLinkNames));
207  } else { // Just looking for an explicitly named feature
208  availableLinkNames.push_back( frd.linkName() );
209  }
210 
211  // Fetch the named links that we're interested in
212  for (const std::string& featureNameToGet : availableLinkNames) {
213  // This try block protects against ExcCLIDMismatch throws from
214  // features which do not derive from IParticle, when an IParticle interface is requested.
215 #ifndef XAOD_STANDALONE
216  try {
217 #endif
218  // Slices may have added link collections. These links may have been to objects in different containers.
219  if (decisionObj->hasObjectCollectionLinks(featureNameToGet, clid)) {
220  std::vector<sgkey_t> keyVec;
221  std::vector<CLID> clidVec;
222  std::vector<TrigCompositeUtils::Decision::index_type> indexVec;
223  decisionObj->typelessGetObjectCollectionLinks(featureNameToGet, keyVec, clidVec, indexVec);
224  filterLinkVectorByContainerKey(frd.SGKeyExpression(), keyVec, clidVec, indexVec, ctx, eventStore);
225  std::copy(keyVec.begin(), keyVec.end(), std::back_inserter(featureKeys));
226  std::copy(clidVec.begin(), clidVec.end(), std::back_inserter(featureClids));
227  std::copy(indexVec.begin(), indexVec.end(), std::back_inserter(featureIndices));
228  }
229 #ifndef XAOD_STANDALONE
230  } catch (SG::ExcCLIDMismatch&) {
231  // This is in place to catch the exception caused by non-IParticle features when an IParticle interface is requested.
232  // We're fine to catch this silently and carry on looking at the next Decision object in the graph
233  }
234  try {
235 #endif
236  // Slices may have added single links. Note: the framework-specified "feature" link is always a single link.
237  if (decisionObj->hasObjectLink(featureNameToGet, clid)) {
238  sgkey_t fKey;
239  CLID fClid;
241  decisionObj->typelessGetObjectLink(featureNameToGet, fKey, fClid, fIndex);
242  // Filtering function operates on a vector
243  std::vector<sgkey_t> keyVec = {fKey};
244  std::vector<CLID> clidVec = {fClid};
245  std::vector<TrigCompositeUtils::Decision::index_type> indexVec = {fIndex};
246  filterLinkVectorByContainerKey(frd.SGKeyExpression(), keyVec, clidVec, indexVec, ctx, eventStore);
247  std::copy(keyVec.begin(), keyVec.end(), std::back_inserter(featureKeys));
248  std::copy(clidVec.begin(), clidVec.end(), std::back_inserter(featureClids));
249  std::copy(indexVec.begin(), indexVec.end(), std::back_inserter(featureIndices));
250  }
251 #ifndef XAOD_STANDALONE
252  } catch (SG::ExcCLIDMismatch&) {
253  // Silently. As above.
254  }
255 #endif
256  }
257 
258  // Check if the Decision object is active for a specific set of Chains-of-interest (as supplied by the TDT)
260  if (chainIDs.size() > 0) {
261  // If we were given a list of chains to consider then we start assuming none passed this decisionObj
263  for (TrigCompositeUtils::DecisionID id : chainIDs) {
264  if (std::count(decisionObj->decisions().begin(), decisionObj->decisions().end(), id) == 1) {
266  break;
267  }
268  }
269  // But consider also the ComboHypo, this will have run immediately after the Hypo and could have failed this chain due to combinatorics.
270  // This statement will only activate for the case that we are looking for "feature" edges (which is the default).
271  if (state == TrigCompositeUtils::ActiveState::ACTIVE && decisionObjChild && decisionObjChild->name() == TrigCompositeUtils::comboHypoAlgNodeName()) {
273  for (TrigCompositeUtils::DecisionID id : chainIDs) {
274  if (std::count(decisionObjChild->decisions().begin(), decisionObjChild->decisions().end(), id) == 1) {
276  break;
277  }
278  }
279  }
280  }
281 
282  for (size_t i = 0; i < featureKeys.size(); ++i) {
284  std::find_if(features.begin(), features.end(), [&](const auto& li) { return li.key == featureKeys[i] and li.clid == featureClids[i] and li.index == featureIndices[i]; } );
285  if (vecIt == features.end()) {
286  // Link did not already exist - add it to the output
287  features.emplace_back( decisionObj, featureKeys[i], featureClids[i], featureIndices[i], state ); // Note: This populates the set of passed IDs from decisionObj
288  } else {
289  // Link already existed - if the link's state in the return vector is INACTIVE but is ACTIVE here,
290  // then we need to change it to ACTIVE as this denotes one-or-more of the requested chains were active for the object.
293  }
294  // Always update the set of passed IDs for feature retrieval. The std::optional must have_value due to the choice of constructor above
295  vecIt->decisions->insert(ids.begin(), ids.end());
296  }
297  }
298 
299  // Stop processing this path through the navigation if the lastFeatureOfType flag is set
300  if (featureKeys.size() && (frd.featureCollectionMode() & TrigDefs::lastFeatureOfType)) {
301  return;
302  }
303 
304  // Recurse to decisionObj's seeds
305  for (const TrigCompositeUtils::NavGraphNode* seedNavNode : navGraphNode->seeds()) {
306  if (fullyExploredFrom.count(seedNavNode) == 1) {
307  continue; // Already explored down from here
308  }
310  features,
311  fullyExploredFrom,
312  seedNavNode,
313  // Following are passed down from typelessGetFeatures
314  frd,
315  clid,
316  chainIDs,
317  ctx,
318  eventStore);
319  }
320 
321  // If we encounter this node again in the future, we don't need to explore it again as it's now fully explored.
322 
323  fullyExploredFrom.insert( navGraphNode );
324  }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonR4::printID
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
Definition: TrackingHelpers.cxx:17
TrigCompositeUtils::ActiveState
ActiveState
Additional information returned by the TrigerDecisionTool's feature retrieval, contained within the L...
Definition: ActiveState.h:18
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
TrigCompositeUtils::recursiveGetDecisions
void recursiveGetDecisions(const Decision *start, NavGraph &navGraph, const DecisionIDContainer &ids, const bool enforceDecisionOnStartNode)
Search back in time from "node" and locate all paths back through Decision objects for a given chain.
Definition: TrigCompositeUtilsRoot.cxx:446
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:41
xAOD::TrigComposite_v1::typelessGetObjectLink
bool typelessGetObjectLink(const std::string &name, sgkey_t &key, uint32_t &clid, index_type &index) const
Fetches a single link without type.
Definition: TrigComposite_v1.cxx:409
Trig::FeatureRequestDescriptor::featureCollectionMode
unsigned int featureCollectionMode() const
Definition: FeatureRequestDescriptor.cxx:140
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
TrigCompositeUtils::NavGraph::finalNodes
const std::vector< NavGraphNode * > & finalNodes() const
Get all final nodes.
Definition: NavGraph.cxx:99
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
TrigCompositeUtils::NavGraphNode::seeds
const std::vector< NavGraphNode * > & seeds() const
Return a vector of const pointers to the Decision object nodes which this NavGraphNode seeds from.
Definition: NavGraph.cxx:46
xAOD::TrigComposite_v1::hasObjectLink
bool hasObjectLink(const std::string &name, const CLID clid=CLID_NULL) const
Check if a link to an object with a given name and type exists. CLID_NULL to not check type.
Definition: TrigComposite_v1.cxx:244
Trig::FeatureRequestDescriptor::linkName
const std::string & linkName() const
Definition: FeatureRequestDescriptor.cxx:145
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TrigCompositeUtils::comboHypoAlgNodeName
const std::string & comboHypoAlgNodeName()
Definition: TrigCompositeUtils.h:428
python.HION12.expression
string expression
Definition: HION12.py:55
TrigCompositeUtils::NavGraph::printAllPaths
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
Definition: NavGraph.cxx:165
xAOD::TrigComposite_v1::hasObjectCollectionLinks
bool hasObjectCollectionLinks(const std::string &collectionName, const CLID clid=CLID_NULL) const
Check if links exist to a collection of objects with given name and type. CLID_NULL to not check type...
Definition: TrigComposite_v1.cxx:273
TrigCompositeUtils::NavGraph::edges
size_t edges() const
Definition: NavGraph.cxx:119
TrigCompositeUtils::NavGraphNode::children
const std::vector< NavGraphNode * > & children() const
Return a vector of const pointers to the Decision object nodes which are the children of this NavGrap...
Definition: NavGraph.cxx:50
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
Trig::FeatureRequestDescriptor::condition
unsigned int condition() const
Definition: FeatureRequestDescriptor.cxx:125
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
TrigCompositeUtils::getTerminusNode
const Decision * getTerminusNode(SG::ReadHandle< DecisionContainer > &container)
Definition: TrigCompositeUtilsRoot.cxx:258
xAOD::TrigComposite_v1::getObjectNames
std::vector< std::string > getObjectNames() const
Look up all links stored to objects of (container) type CONTAINER.
TrigCompositeUtils::NavGraph::nodes
size_t nodes() const
Definition: NavGraph.cxx:114
Trig::FeatureRequestDescriptor::SGKeyExpression
const std::regex & SGKeyExpression() const
Definition: FeatureRequestDescriptor.cxx:135
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:727
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAOD::TrigComposite_v1::getObjectCollectionNames
std::vector< std::string > getObjectCollectionNames() const
Look up all links stored to collections objects from (container) type CONTAINER.
TrigCompositeUtils::NavGraph
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
Definition: NavGraph.h:111
xAOD::TrigComposite_v1::decisions
const std::vector< TrigCompositeUtils::DecisionID > & decisions() const
Get positive HLT chain decisions associated with this TrigComposite. Navigation use.
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:49
Trig::FeatureRequestDescriptor::chainGroup
const std::string & chainGroup() const
Definition: FeatureRequestDescriptor.cxx:117
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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
ChainNameParser::multiplicities
std::vector< int > multiplicities(const std::string &chain)
Definition: ChainNameParser.cxx:226
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TrigCompositeUtils::NavGraphNode::node
const Decision * node() const
Return a const pointer to the Decision object node which this NavGraphNode is shadowing.
Definition: NavGraph.cxx:41
xAOD::TrigComposite_v1::index_type
uint32_t index_type
Definition: TrigComposite_v1.h:53
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: sgkey_t.h:32
SG::ExcCLIDMismatch
Exception — Attempt to set DataLink / ElementLink with CLID <clid> to object with CLID <clid>.
Definition: Control/AthLinks/AthLinks/exceptions.h:59
TrigCompositeUtils::createLegName
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
Definition: TrigCompositeUtilsRoot.cxx:166
TrigCompositeUtils::getRejectedDecisionNodes
std::vector< const Decision * > getRejectedDecisionNodes([[maybe_unused]] const asg::EventStoreType *eventStore, const EventContext &ctx, const std::string &summaryCollectionKey, const DecisionIDContainer &ids, const std::set< std::string > &keysToIgnore)
Definition: TrigCompositeUtilsRoot.cxx:276
xAOD::TrigComposite_v1::name
const std::string & name() const
Get a human-readable name for the object.
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
DEBUG
#define DEBUG
Definition: page_access.h:11
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
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:65
Trig::FeatureRequestDescriptor::restrictRequestToLeg
int restrictRequestToLeg() const
Definition: FeatureRequestDescriptor.cxx:150
ACTIVE
@ ACTIVE
Definition: ZdcID.h:21
calibdata.copy
bool copy
Definition: calibdata.py:26
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
jet::ExtendedBool::UNSET
@ UNSET
Definition: UncertaintyEnum.h:232
INACTIVE
@ INACTIVE
Definition: ZdcID.h:21
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
xAOD::TrigComposite_v1::typelessGetObjectCollectionLinks
bool typelessGetObjectCollectionLinks(const std::string &name, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< index_type > &indexVec) const
Fetches a collection of links without type.
Definition: TrigComposite_v1.cxx:428
TrigCompositeUtils::decisionToElementLink
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
Definition: TrigCompositeUtilsRoot.cxx:123