ATLAS Offline Software
TrigNavSlimmingMTAlg.cxx
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #include "TrigNavSlimmingMTAlg.h"
7 
9 
12 
13 using namespace TrigCompositeUtils;
14 
15 
16 // Particle Specialization
17 // We transiently interact via the xAOD::IParticle interface.
18 // There is code inside the TrigCompositeUtils::Decision to check
19 // at runtime if this inheritance is possible.
20 // But we copy into a xAOD::Particle object.
21 template<>
24  const std::string& edgeName) const
25 {
26 
27  if (not decision->hasObjectLink(edgeName, ClassID_traits<xAOD::IParticleContainer>::ID())) { // Note: IParticle
28  // Nothing to do
29  return StatusCode::SUCCESS;
30  }
31 
32  ElementLink<xAOD::IParticleContainer> currentEL = decision->objectLink<xAOD::IParticleContainer>(edgeName); // Note: IParticle
33 
34  if (!currentEL.isValid()) {
35  // TODO: Upgrade this first message to a WARNING once the TriggerAPI for Run3 is filtering on the chains whose final-features get saved into the DAOD_PHYS
36  ATH_MSG_DEBUG("Unable to repack '" << edgeName << "' of container type xAOD::IParticleContainer for '"
37  << decision->name() << "' node, the link is invalid.");
38  ATH_MSG_DEBUG("Dump of DecisionObject: " << *decision);
39  return StatusCode::SUCCESS;
40  }
41 
42  if (not m_repackFeaturesExclusionList.empty()) {
43  // Check the feature's StoreGate key against the exclusion list. If it is on the list, then we don't repack the feature.
44  // We instead leave it pointing to its current online physics object. It is assumed that this online physics object will
45  // be kept in the DAOD via signature specific logic.
46  const std::string featureStoreGateKey = currentEL.dataID();
47  for (const std::string& exclusionEntry : m_repackFeaturesExclusionList) {
48  if (featureStoreGateKey == exclusionEntry) {
49  ATH_MSG_VERBOSE("Will not repack this feature " << currentEL.index() << " from " << currentEL.dataID() << ", as this container is on the exclusion list");
50  return StatusCode::SUCCESS;
51  }
52  }
53  }
54 
55  (**writeHandle).push_back( new xAOD::Particle() ); // Need to do this before performing the copy to assign with the Aux store
56 
57  const xAOD::IParticle* current = *currentEL;
58  xAOD::Particle* remapped = (**writeHandle).back();
59 
60  remapped->setP4( current->p4() );
61 
62  ElementLink<xAOD::ParticleContainer> remappedEL(**writeHandle, (**writeHandle).size()-1);
63  decision->setObjectLink<xAOD::ParticleContainer>(edgeName, remappedEL); // Overwrite the existing link
64 
65  ATH_MSG_VERBOSE("Repacked from index:" << currentEL.index() << " from key:" << currentEL.dataID()
66  << ", to index:" << remappedEL.index() << " to key:" << remappedEL.dataID());
67 
68  return StatusCode::SUCCESS;
69 }
70 
71 
72 // ROI Specialization.
73 // Not an xAOD object, can use a direct copy constructor.
74 template<>
77 {
78  // Specialization for ROIs, utilize copy constructor (no Aux store here)
79  (**writeHandle).push_back( new TrigRoiDescriptor(*object) );
80  return StatusCode::SUCCESS;
81 }
82 
83 
84 TrigNavSlimmingMTAlg::TrigNavSlimmingMTAlg(const std::string& name, ISvcLocator* pSvcLocator)
85  : AthReentrantAlgorithm(name, pSvcLocator)
86 {
87 }
88 
89 
91  ATH_CHECK( m_primaryInputCollection.initialize() );
92  ATH_CHECK( m_outputCollection.initialize() );
96 
97  const bool removeRoI = (std::find(m_edgesToDrop.begin(), m_edgesToDrop.end(), roiString()) != m_edgesToDrop.end());
98  const bool removeInitialRoI = (std::find(m_edgesToDrop.begin(), m_edgesToDrop.end(), initialRoIString()) != m_edgesToDrop.end());
99 
100  if (m_repackROIs and (removeRoI or removeInitialRoI)) {
101  ATH_MSG_WARNING("Possible miss-configuration. Cannot repack ROIs in the navigation slimming if they are being dropped");
102  }
103 
104  if (not m_trigDec.empty()) {
105  ATH_CHECK( m_trigDec.retrieve() );
106  }
107  for (const std::string& output : m_allOutputContainers) {
108  if (output == m_primaryInputCollection.key()) {
109  continue; // We do want to search for failed nodes in the primary input (it may already be merged)
110  }
111  // We don't want to search for failed nodes in other possible summary keys, we might read in the
112  // summary collection from another running instance (e.g. an AODSlim alg reading in the output of
113  // ESDSlim in a RAWtoALL job).
115  }
117  msg() << MSG::INFO << "Initialized. Will *not* inspect the following SG Keys: ";
118  for (const std::string& key : m_allOutputContainersSet) {
119  msg() << key << " ";
120  }
121  msg() << endmsg;
122  return StatusCode::SUCCESS;
123 }
124 
125 
126 StatusCode TrigNavSlimmingMTAlg::execute(const EventContext& ctx) const {
127 
128  // Prepare IO
130 
134  if (m_repackROIs) {
136  outputContainers.rois = &outputROIs;
137  }
138  if (m_repackFeatures) {
139  outputParticles = createAndStoreWithAux<xAOD::ParticleContainer, xAOD::ParticleAuxContainer>(m_outputRepackedFeaturesCollectionKey_Particle, ctx);
140  outputContainers.particles = &outputParticles;
141  }
142  if (m_repackMET) {
143  outputMETs = createAndStoreWithAux<xAOD::TrigMissingETContainer, xAOD::TrigMissingETAuxContainer>(m_outputRepackedFeaturesCollectionKey_MET, ctx);
144  outputContainers.mets = &outputMETs;
145  }
146 
148  outputContainers.nav = &outputNavigation;
149 
151  ATH_CHECK(primaryInputHandle.isValid());
152 
153  const Decision* terminusNode = TrigCompositeUtils::getTerminusNode(*primaryInputHandle);
154  if (!terminusNode) {
155  ATH_MSG_ERROR("Unable to locate the HLTPassRaw from the primary input navigation collection, size:" << primaryInputHandle->size());
156  return StatusCode::FAILURE;
157  }
158 
159  // Stage 1. Build a transient representation of the navigation graph.
160  TrigTimeStamp stage1;
161  NavGraph transientNavGraph;
162 
163  // We can optionally only keep data for a given set of chains. An empty set means to keep for all chains.
164  DecisionIDContainer chainIDs = {};
165  if (not m_chainsFilter.empty()) {
166  const Decision* applyPassingChainsFilter = nullptr;
167  if (not m_keepFailedBranches) { // In this case, we should further restrict the chainIDs to only chains which pass the event
168  applyPassingChainsFilter = terminusNode;
169  }
170  ATH_CHECK(fillChainIDs(chainIDs, applyPassingChainsFilter));
171  ATH_MSG_DEBUG("Supplied " << m_chainsFilter.size() << " chain patterns. This converts to " << chainIDs.size() << " DecisionIDs to be preserved.");
172  if (chainIDs.empty()) {
173  // No chains are in the filter. We should reject everything. But an empty set is interpreted as keep-all. So we need to add a dummy entry.
174  chainIDs.insert( HLT::Identifier("HLT_dummy").numeric() );
175  }
176  } else {
177  ATH_MSG_DEBUG("No HLT-chain based filtering of the navigation graph will be performed.");
178  }
179 
180  std::set<const Decision*> fullyExploredFrom;
181  // Note: We use the "internal" version of this call such that we maintain our own cache,
182  // as we may need to call this more than once if keepFailedBranches is true
184  nullptr, // 'Coming from' is nullptr for the first call of the recursive function
185  transientNavGraph,
186  fullyExploredFrom,
187  chainIDs,
188  /*enforce chainIDs on terminus node*/ true);
189 
190  ATH_MSG_DEBUG("Collated nodes from passing paths, now have " << transientNavGraph.nodes() << " nodes with " << transientNavGraph.edges() << " edges");
191 
192  // Stage 2. We can optionally include branches through the graph which were never accepted by any chain.
193  TrigTimeStamp stage2;
194  // These branches do not connect to the terminusNode, so we have to go hunting them explicitly.
195  // We need to pass in the evtStore as these nodes can be spread out over numerous collections.
196  // Like with the terminus node, we can restrict this search to only nodes which were rejected by certain chains.
197  // We also want to restrict the search to exclude the output collections of any other TrigNavSlimminMTAlg instances
198  // and let the function know what the primary input collection is - from the name of this we can tell if we need to search one or many containers.
199  if (m_keepFailedBranches) {
200  std::vector<const Decision*> rejectedNodes = TrigCompositeUtils::getRejectedDecisionNodes(&*evtStore(), ctx, m_primaryInputCollection.key(), chainIDs, m_allOutputContainersSet);
201  for (const Decision* rejectedNode : rejectedNodes) {
202  // We do *not* enforce that a member of chainIDs must be present in the starting node (rejectedNode)
203  // specifically because we know that at least one of chainIDs was _rejected_ here, but is active in the rejected
204  // node's seeds.
206  nullptr, // 'Coming from' is nullptr for the first call of the recursive function
207  transientNavGraph,
208  fullyExploredFrom,
209  chainIDs,
210  /*enforce chainIDs on terminus node*/ false);
211  }
212  ATH_MSG_DEBUG("Collated nodes from failing paths, now have " << transientNavGraph.nodes() << " nodes with " << transientNavGraph.edges() << " edges");
213  }
214 
215  // Stage 3. Walk all paths through the graph. Flag for thinning.
216  TrigTimeStamp stage3;
217  // Final nodes includes the terminus node, plus any rejected nodes (if these were collated).
219 
220  if (msg().level() <= MSG::VERBOSE) {
221  ATH_MSG_VERBOSE("The navigation graph entering the slimming is:");
222  transientNavGraph.printAllPaths(msg(), MSG::VERBOSE);
223  }
224 
225  // Stage 4. Do the thinning. Re-wire removed nodes as we go.
226  TrigTimeStamp stage4;
227  const size_t nodesBefore = transientNavGraph.nodes();
228  const size_t edgesBefore = transientNavGraph.edges();
229  std::vector<const Decision*> thinnedInputNodes = transientNavGraph.thin();
230 
231  // TODO - thinnedInputNodes will be dropped, these may link to "features", "roi", or other objects in other containers.
232  // Need to let the slimming svc know that we no longer need the objects pointed to here, and hence they can be thinned.
233 
234  ATH_MSG_DEBUG("Trigger navigation graph thinning going from " << nodesBefore << " nodes with " << edgesBefore << " edges, to "
235  << transientNavGraph.nodes() << " nodes with " << transientNavGraph.edges() << " edges");
236 
237  if (msg().level() <= MSG::VERBOSE) {
238  ATH_MSG_VERBOSE("The navigation graph has been slimmed to the following paths:");
239  transientNavGraph.printAllPaths(msg(), MSG::VERBOSE);
240  }
241 
242  // Stage 5. Fill the transientNavGraph structure (with NavGraphNode* nodes) back into an xAOD::DecisionContainer (with xAOD::Decision* nodes).
243  TrigTimeStamp stage5;
244  IOCacheMap cache; // Used to keep a one-to-one relationship between the const input Decision* and the mutable output Decision*
245 
246  // Do the terminus node first - such that it ends up at index 0 of the outputNavigation (fast to locate in the future)
247  Decision* terminusNodeOut = nullptr;
248  const DecisionIDContainer emptySet = {};
249  ATH_CHECK(inputToOutput(terminusNode, &terminusNodeOut, cache, outputContainers, (m_applyChainsFilterToSummaryNodes ? chainIDs : emptySet), ctx));
250 
251  const Decision* expressTerminusNode = TrigCompositeUtils::getExpressTerminusNode(*primaryInputHandle);
252  if (expressTerminusNode) {
253  // Do the express terminus node second - such that it ends up at index 1 of the outputNavigation (fast to locate in the future)
254  Decision* expressTerminusNodeOut = nullptr;
255  ATH_CHECK(inputToOutput(expressTerminusNode, &expressTerminusNodeOut, cache, outputContainers, (m_applyChainsFilterToSummaryNodes ? chainIDs : emptySet), ctx));
256  }
257 
259  // Prescaled summary node might come third, it is optional.
260  const Decision* prescaledNode = TrigCompositeUtils::getNodeByName(*primaryInputHandle, TrigCompositeUtils::summaryPrescaledNodeName());
261  if (prescaledNode) { // We can propagate it directly (potential for Run 4)
262  Decision* prescaleNodeOut = nullptr;
263  ATH_CHECK(inputToOutput(prescaledNode, &prescaleNodeOut, cache, outputContainers, (m_applyChainsFilterToSummaryNodes ? chainIDs : emptySet), ctx));
264  } else { // We can re-create this from the trigger bits
266  }
267  }
268 
269  if (m_propagateL1Nodes) {
270  // L1 summary nodes are also optional.
271  const Decision* L1TBPNode = TrigCompositeUtils::getNodeByName(*primaryInputHandle, "L1TBP"); // TODO - upgrade to static string constants if we use this in production.
272  const Decision* L1TAVNode = TrigCompositeUtils::getNodeByName(*primaryInputHandle, "L1TAV");
273  if (L1TBPNode && L1TAVNode) {
274  Decision* L1TBPNodeOut = nullptr;
275  Decision* L1TAVNodeOut = nullptr;
276  ATH_CHECK(inputToOutput(L1TBPNode, &L1TBPNodeOut, cache, outputContainers, {}, ctx)); // No chain filtering, these are L1 items
277  ATH_CHECK(inputToOutput(L1TAVNode, &L1TAVNodeOut, cache, outputContainers, {}, ctx));
278  } else {
280  }
281  }
282 
283  // Don't have to walk the graph here, just iterate through the set of (thinned) nodes.
284  // We won't end up with two terminus nodes because of this (it checks that the node hasn't already been processed)
285  const std::vector<NavGraphNode*> allNodes = transientNavGraph.allNodes();
286  for (const NavGraphNode* inputNode : allNodes) {
287  Decision* outputNode = nullptr;
288  ATH_CHECK(inputToOutput(inputNode->node(), &outputNode, cache, outputContainers, chainIDs, ctx));
289  }
290  // Now we have all of the new nodes in the output collection, can link them all up with their slimmed seeding relationships.
291  for (const NavGraphNode* inputNode : allNodes) {
292  ATH_CHECK(propagateSeedingRelation(inputNode, cache, ctx));
293  }
294 
295  // We can perform an additional check on the output graph, we put a veto on the m_keepFailedBranches option as we are currently just exploring
296  // from the 'terminusNodeOut', more code would be needed to locate failing branches also in the output graph structure.
297  if (msg().level() <= MSG::VERBOSE && !m_keepFailedBranches) {
298  ATH_MSG_VERBOSE("The output navigation graph looks like this (output terminus node search only, converted back into a NavGraph one final time for printing)");
299  std::set<const Decision*> fullyExploredFromOut;
300  NavGraph transientNavGraphOut;
302  nullptr, // 'Coming from' is nullptr for the first call of the recursive function
303  transientNavGraphOut,
304  fullyExploredFromOut,
305  chainIDs,
306  /*enforce chainIDs on terminus node*/ true);
307  transientNavGraphOut.printAllPaths(msg(), MSG::VERBOSE);
308  }
309 
310  if (msg().level() <= MSG::DEBUG) {
311  ATH_MSG_DEBUG("Navigation slimming and thinning timings:");
312  ATH_MSG_DEBUG(" 1. Transient Graph of Passed Nodes = " << stage1.millisecondsDifference(stage2) << " ms");
313  ATH_MSG_DEBUG(" 2. Transient Graph of Failed Nodes = " << stage2.millisecondsDifference(stage3) << " ms");
314  ATH_MSG_DEBUG(" 3. Flag Transient Graph For Thinning = " << stage3.millisecondsDifference(stage4) << " ms");
315  ATH_MSG_DEBUG(" 4. Perform Transient Graph Thinning = " << stage4.millisecondsDifference(stage5) << " ms");
316  ATH_MSG_DEBUG(" 5. Write xAOD Graph = " << stage5.millisecondsSince() << " ms");
317  }
318 
319  return StatusCode::SUCCESS;
320 }
321 
322 std::vector<size_t> TrigNavSlimmingMTAlg::lookupHardCodedLegMultiplicities(const std::string& chain) const {
323  if (chain == "HLT_id_cosmicid_L1MU11_EMPTY") return std::vector<size_t>(1,1); // size = 1, value at index 0 = 1
324  return std::vector<size_t>();
325 }
326 
327 StatusCode TrigNavSlimmingMTAlg::fillChainIDs(DecisionIDContainer& chainIDs, const Decision* applyPassingChainsFilter) const {
328  DecisionIDContainer passingChains;
329  if (applyPassingChainsFilter) { // Expect either nullptr or a pointer to the terminus node here.
330  TrigCompositeUtils::decisionIDs(applyPassingChainsFilter, passingChains); // Extract all passing chains into the passingChains set
331  }
332 
333  for (const std::string& filter : m_chainsFilter) {
334  // We do this as filter->chains stage as filter could be a regexp matching a large number of chains
335  const Trig::ChainGroup* cg = m_trigDec->getChainGroup(filter);
336  std::vector<std::string> chains = cg->getListOfTriggers();
337  for (const std::string& chain : chains) {
338  const TrigConf::HLTChain* hltChain = m_trigDec->ExperimentalAndExpertMethods().getChainConfigurationDetails(chain);
339  const HLT::Identifier chainID( hltChain->chain_name() );
340  if (passingChains.size() && passingChains.count( chainID.numeric() ) == 0) { // Optional additional filter on passing chains in this specific event
341  ATH_MSG_VERBOSE("Skipping " << chain << " as it didn't pass this event");
342  continue;
343  }
344  chainIDs.insert( chainID.numeric() );
345  std::vector<size_t> legMultiplicites = hltChain->leg_multiplicities();
346  ATH_MSG_VERBOSE("Including " << chain << " and its " << legMultiplicites.size() << " legs in the trigger slimming output");
347  if (legMultiplicites.size() == 0) {
348  legMultiplicites = lookupHardCodedLegMultiplicities(chain);
349  if (legMultiplicites.size() == 0) {
350  ATH_MSG_ERROR("chain " << chainID << " has invalid configuration, no multiplicity data.");
351  return StatusCode::FAILURE;
352  }
353  }
354  if (legMultiplicites.size() > 1) {
355  // For multi-leg chains, the DecisionIDs are handled per leg.
356  // We don't care here exactly how many objects are required per leg, just that there are two-or-more legs
357  for (size_t legNumeral = 0; legNumeral < legMultiplicites.size(); ++legNumeral) {
358  const HLT::Identifier legID = TrigCompositeUtils::createLegName(chainID, legNumeral);
359  chainIDs.insert( legID.numeric() );
360  }
361  }
362  }
363  }
364  return StatusCode::SUCCESS;
365 }
366 
369 
370  const Trig::ChainGroup* cg = m_trigDec->getChainGroup("HLT_.*|EF_.*");
371  const std::vector<std::string> chains = cg->getListOfTriggers();
372  const std::vector<unsigned int> bits = cg->isPassedBitsForEach();
373  if (chains.size() != bits.size()) {
374  ATH_MSG_ERROR("Unexpected different sized chains and bits vectors");
375  return StatusCode::FAILURE;
376  }
377 
378  DecisionIDContainer prescaledIDs;
379  for (size_t i = 0; i < bits.size(); ++i) {
380  if (bits[i] & TrigDefs::EF_prescaled) { prescaledIDs.insert( HLT::Identifier(chains[i]).numeric() ); }
381  }
382 
383  if (m_applyChainsFilterToSummaryNodes && chainIDs.size()) { // Then apply the filter
384  std::erase_if(prescaledIDs, [&](int id) {
385  return !chainIDs.contains(id); // Keep only elements in chainIDs
386  });
387  }
388 
389  TrigCompositeUtils::insertDecisionIDs(prescaledIDs, prescaledNode); // Copy the set of chains into the xAOD object
390  return StatusCode::SUCCESS;
391 }
392 
394  Decision* L1TBPNode = newDecisionIn(outputContainers.nav->ptr(), "L1TBP");
395  Decision* L1TAVNode = newDecisionIn(outputContainers.nav->ptr(), "L1TAV");
396  // Note - this is for offline use, there's no point in keeping TAP (trigger after prescale) as well as TAV
397 
398  const Trig::ChainGroup* cg = m_trigDec->getChainGroup("L1_.*|L0_.*"); // Note: Future proofing for Run 4
399  std::vector<std::string> chains = cg->getListOfTriggers();
400  const std::vector<unsigned int> bits = cg->isPassedBitsForEach();
401  if (chains.size() != bits.size()) {
402  ATH_MSG_ERROR("Unexpected different sized chains and bits vectors");
403  return StatusCode::FAILURE;
404  }
405 
406  DecisionIDContainer TBPIDs, TAVIDs;
407  for (size_t i = 0; i < bits.size(); ++i) {
408  if (bits[i] & TrigDefs::L1_isPassedBeforePrescale) { TBPIDs.insert( HLT::Identifier(chains[i]).numeric() ); }
409  if (bits[i] & TrigDefs::L1_isPassedAfterVeto) { TAVIDs.insert( HLT::Identifier(chains[i]).numeric() ); }
410  }
411 
412  TrigCompositeUtils::insertDecisionIDs(TBPIDs, L1TBPNode);
413  TrigCompositeUtils::insertDecisionIDs(TAVIDs, L1TAVNode);
414  ATH_MSG_INFO("Created new TAV node at index " << L1TAVNode->index() << " with " << TBPIDs.size() << " = " << TAVIDs.size() << " decisions\n" << *L1TAVNode );
415  return StatusCode::SUCCESS;
416 }
417 
418 
422  IOCacheMap& cache,
424  const DecisionIDContainer& chainIDs,
425  const EventContext& ctx) const
426 {
427  IOCacheMap::const_iterator it = cache.find(input);
428  if (it != cache.end()) {
429  *output = it->second;
430  } else {
431  *output = newDecisionIn(outputContainers.nav->ptr(), input, input->name(), ctx);
435  cache[input] = *output;
436  }
437  return StatusCode::SUCCESS;
438 }
439 
440 
442  const TrigCompositeUtils::NavGraphNode* inputNode,
443  IOCacheMap& cache,
444  const EventContext& ctx) const
445 {
446  const Decision* inputDecision = inputNode->node(); // The incoming Decision objects, with links into the old graph
447  Decision* outputDecision = nullptr; // The outgoing Decision object, without graph links so far
448  {
449  IOCacheMap::const_iterator it = cache.find(inputDecision);
450  ATH_CHECK( it != cache.end() );
451  outputDecision = it->second;
452  }
453  for (const NavGraphNode* seed : inputNode->seeds()) {
454  const Decision* inputSeedDecision = seed->node(); // A Decision object the incoming Decision object links to (old graph)
455  const Decision* outputSeedDecision = nullptr; // The equivalent Decision Object in the slimmed outgoing graph
456  {
457  IOCacheMap::const_iterator it = cache.find(inputSeedDecision);
458  ATH_CHECK( it != cache.end() );
459  outputSeedDecision = it->second;
460  }
461  // Perform the linking only using nodes from the slimmed output graph
462  TrigCompositeUtils::linkToPrevious(outputDecision, outputSeedDecision, ctx);
463  }
464 
465  // Don't run this check for "HLTPassRaw", this node is expected to link back to every passing physics object.
466  // Hence there may be more than 'sensibleUpperBoundOnNLinks' in aggregate here.
467  if (m_runtimeValidation and outputDecision->name() != TrigCompositeUtils::summaryPassNodeName()) {
468  const size_t sensibleUpperBoundOnNLinks = 100;
469  const size_t maxUpperBoundOnNLinks = 500;
470  // Note: Only in the NavGraphNode do we have the two-way links to check how many children link back to this node
471  const bool bad_in = inputNode->children().size() > sensibleUpperBoundOnNLinks;
472  //Note: Here we check more than "seed" links. We pick up external links too like "feature"
473  const bool bad_out = outputDecision->linkColNames().size() > sensibleUpperBoundOnNLinks;
474  const bool vbad = inputNode->children().size() > maxUpperBoundOnNLinks or outputDecision->linkColNames().size() > maxUpperBoundOnNLinks;
475  if (bad_in) {
476  ATH_MSG_WARNING("Saving a Decision object with a very large number of INCOMING graph edges. Number of in-edges: " << inputNode->children().size());
477  }
478  if (bad_out) {
479  ATH_MSG_WARNING("Saving a Decision object with a very large number of OUTGOING graph edges. Number of out-edges: " << outputDecision->linkColNames().size());
480  }
481  if (bad_in or bad_out) {
482  ATH_MSG_WARNING("Comes from: " << TrigCompositeUtils::decisionToElementLink(inputDecision, ctx).dataID());
483  ATH_MSG_DEBUG("Output Decision: " << *outputDecision);
484  }
485  if (vbad) {
486  ATH_MSG_ERROR("More than " << maxUpperBoundOnNLinks << " links, printing an ERROR such that this gets promptly investigated and reduced.");
487  }
488  }
489  return StatusCode::SUCCESS;
490 }
491 
492 
496 {
497  // ElementLinks form the edges in the graph. Start by copying all of them over.
498 
499  output->copyAllLinksFrom( input );
500 
501  // Special behavior to save additional disk space for keepOnlyFinalFeatures mode.
502  // In keepOnlyFinalFeatures we stop at the first hypoAlgNode, hence we will drop the preceding inputMakerNode, and all prior Steps in their entirety.
503  // This means we will also drop all "roi" edges, including the final ROI.
504  // We may want to keep this final "roi", and so to do this we can copy it down one level (away from L1) to live in the hypoAlgNode along side the "feature" link.
505  // Note: If "roi" is listed in m_edgesToDrop then we will still immediately drop this new element link in the m_edgesToDrop loop below.
506  const std::vector<ElementLink<DecisionContainer>> seeds = input->objectCollectionLinks<DecisionContainer>(seedString());
507  const Decision* const firstParent = (seeds.size() ? *seeds.at(0) : nullptr);
509  input->name() == hypoAlgNodeName() &&
510  firstParent &&
511  firstParent->name() == inputMakerNodeName() &&
512  firstParent->hasObjectLink(roiString()))
513  {
514  output->copyLinkFrom( firstParent, roiString() );
515  }
516 
517  for (const std::string& toRemove : m_edgesToDrop) {
518  output->removeObjectLink(toRemove);
519  output->removeObjectCollectionLinks(toRemove);
520  // TODO - let the slimming svc know that we no longer need these objects
521  }
522 
523  // Do not propagate "seed" links - TrigNavSlimmingMTAlg will
524  // propagate these following additional logic
525  output->removeObjectCollectionLinks( seedString() );
526 
527  return StatusCode::SUCCESS;
528 }
529 
530 
534  const DecisionIDContainer& chainIDs) const
535 {
536 
537  // Get all DecisionIDs from the const input Decision*
538  DecisionIDContainer fromInput;
539  decisionIDs(input, fromInput);
540 
541  DecisionIDContainer toOutput;
542  if ( chainIDs.size() ) {
543  // Applying ChainsFilter to the set of DecisionIDs
544  std::set_intersection(fromInput.begin(), fromInput.end(), chainIDs.begin(), chainIDs.end(),
545  std::inserter(toOutput, toOutput.begin()));
546  } else {
547  // Copying all DecisionIDs from input to output
548  toOutput.insert(fromInput.begin(), fromInput.end());
549  }
550 
551  // Set the DecisionIDs into the mutable output Decision*
552  insertDecisionIDs(toOutput, output);
553 
554  return StatusCode::SUCCESS;
555 }
556 
558  if (not msgLvl(MSG::DEBUG)) return;
561  if (link.isValid()) {
562  const xAOD::IParticle& l = **link;
563  ATH_MSG_DEBUG("IParticle repacking debug. " << when << " : "
564  << "(pt:" << l.pt() << ",eta:" << l.eta() << ",phi:" << l.phi() << ",m:" << l.m() << ",e:" << l.e() << ")"
565  << " from:" << link.dataID());
566  if (when == " After") ATH_MSG_DEBUG("--");
567  }
568  }
569 }
570 
571 
574  Outputs& outputContainers) const
575 {
576 
577  if (m_repackROIs) {
578  ATH_CHECK( doRepack<TrigRoiDescriptorCollection>(output, outputContainers.rois, roiString()) );
579  ATH_CHECK( doRepack<TrigRoiDescriptorCollection>(output, outputContainers.rois, initialRoIString()) );
580  }
581 
582  if (m_repackFeatures) {
583  // Debug printing. Look at the four-momentum of any feature before the repacking.
584  // Note: Transiently we interact with the IParticle interface.
586 
587  // Do any IParticle repacking
588  ATH_CHECK( doRepack<xAOD::ParticleContainer>(output, outputContainers.particles, featureString()) );
589  ATH_CHECK( doRepack<xAOD::ParticleContainer>(output, outputContainers.particles, "subfeature") );
590 
591  // Debug printing. Look at the four-momentum of any feature after the repacking (the stored link is re-written)
593  }
594 
595  // Some features do not support an IParticle interface. These need their own containers.
596  // TODO. Apply some thinning?
597  if (m_repackMET) {
598  ATH_CHECK( doRepack<xAOD::TrigMissingETContainer>(output, outputContainers.mets, featureString()) );
599  }
600 
601  return StatusCode::SUCCESS;
602 }
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtils.h:420
Trig::ChainGroup::isPassedBitsForEach
std::vector< unsigned int > isPassedBitsForEach() const
return result of isPassedBits for each chain in the group
Definition: ChainGroup.cxx:261
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
TrigNavSlimmingMTAlg::m_outputRepackedFeaturesCollectionKey_MET
SG::WriteHandleKey< xAOD::TrigMissingETContainer > m_outputRepackedFeaturesCollectionKey_MET
Definition: TrigNavSlimmingMTAlg.h:67
TrigNavSlimmingMTAlg::m_runtimeValidation
Gaudi::Property< bool > m_runtimeValidation
Definition: TrigNavSlimmingMTAlg.h:134
TrigNavSlimmingMTAlg::IOCacheMap
std::map< const TrigCompositeUtils::Decision *, TrigCompositeUtils::Decision * > IOCacheMap
Definition: TrigNavSlimmingMTAlg.h:42
TrigTimeStamp::millisecondsDifference
double millisecondsDifference(const TrigTimeStamp &other) const
Definition: TrigTimeStamp.cxx:11
TrigNavSlimmingMTAlg::createL1GraphNodes
StatusCode createL1GraphNodes(Outputs &outputContainers) const
Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of ...
Definition: TrigNavSlimmingMTAlg.cxx:393
TrigNavSlimmingMTAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: TrigNavSlimmingMTAlg.cxx:126
TrigNavSlimmingMTAlg::m_primaryInputCollection
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_primaryInputCollection
Definition: TrigNavSlimmingMTAlg.h:51
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TrigNavSlimmingMTAlg::m_repackROIs
Gaudi::Property< bool > m_repackROIs
Definition: TrigNavSlimmingMTAlg.h:91
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TrigNavSlimmingMTAlg::m_keepFailedBranches
Gaudi::Property< bool > m_keepFailedBranches
Definition: TrigNavSlimmingMTAlg.h:71
TrigConf::HLTChain::chain_name
const std::string & chain_name() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:73
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:41
xAOD::TrigComposite_v1::objectLink
ElementLink< CONTAINER > objectLink(const std::string &name) const
Get the link with the requested name.
TrigCompositeUtils::newDecisionIn
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
Definition: TrigCompositeUtilsRoot.cxx:44
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
TrigNavSlimmingMTAlg::m_allOutputContainersSet
std::set< std::string > m_allOutputContainersSet
Processed form of m_allOutputContainers.
Definition: TrigNavSlimmingMTAlg.h:138
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
TrigCompositeUtils::summaryPassNodeName
const std::string & summaryPassNodeName()
Definition: TrigCompositeUtils.h:429
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
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TrigCompositeUtils::insertDecisionIDs
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
Definition: TrigCompositeUtilsRoot.cxx:78
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
TrigCompositeUtils::NavGraph::allNodes
std::vector< NavGraphNode * > allNodes()
Get all nodes.
Definition: NavGraph.cxx:103
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
TrigNavSlimmingMTAlg::m_repackFeatures
Gaudi::Property< bool > m_repackFeatures
Definition: TrigNavSlimmingMTAlg.h:99
TrigNavSlimmingMTAlg::m_edgesToDrop
Gaudi::Property< std::vector< std::string > > m_edgesToDrop
Definition: TrigNavSlimmingMTAlg.h:108
TrigCompositeUtils::NavGraph::printAllPaths
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
Definition: NavGraph.cxx:165
TrigNavSlimmingMTAlg::lookupHardCodedLegMultiplicities
std::vector< size_t > lookupHardCodedLegMultiplicities(const std::string &chain) const
Supplemental leg multiplicity information to support MC20.
Definition: TrigNavSlimmingMTAlg.cxx:322
TrigNavSlimmingMTAlg.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TrigConf::HLTChain
HLT chain configuration information.
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:35
TrigNavSlimmingMTAlg::doRepack
StatusCode doRepack(TrigCompositeUtils::Decision *decision, SG::WriteHandle< COLLECTION > *writeHandle, const std::string &edgeName) const
Look for an ElementLink<COLLECTION> with the given edge-name in 'decision', if found then make a copy...
TrigTimeStamp::millisecondsSince
double millisecondsSince() const
Definition: TrigTimeStamp.cxx:7
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
TrigCompositeUtils::NavGraph::edges
size_t edges() const
Definition: NavGraph.cxx:119
TrigCompositeUtils::createAndStore
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Definition: TrigCompositeUtilsRoot.cxx:28
TrigCompositeUtils::roiString
const std::string & roiString()
Definition: TrigCompositeUtils.h:418
TrigNavSlimmingMTAlg::m_outputCollection
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCollection
Definition: TrigNavSlimmingMTAlg.h:55
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
TrigConf::HLTChain::leg_multiplicities
const std::vector< size_t > & leg_multiplicities() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:83
ParticleAuxContainer.h
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
covarianceTool.filter
filter
Definition: covarianceTool.py:514
TrigNavSlimmingMTAlg::TrigNavSlimmingMTAlg
TrigNavSlimmingMTAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigNavSlimmingMTAlg.cxx:84
TrigCompositeUtils::getTerminusNode
const Decision * getTerminusNode(SG::ReadHandle< DecisionContainer > &container)
Definition: TrigCompositeUtilsRoot.cxx:258
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TrigNavSlimmingMTAlg::m_outputRepackedFeaturesCollectionKey_Particle
SG::WriteHandleKey< xAOD::ParticleContainer > m_outputRepackedFeaturesCollectionKey_Particle
Definition: TrigNavSlimmingMTAlg.h:63
TrigCompositeUtils::NavGraph::nodes
size_t nodes() const
Definition: NavGraph.cxx:114
xAOD::Particle_v1::setP4
void setP4(const FourMom_t &vec)
Set the 4-vec.
Definition: Particle_v1.cxx:71
python.UpdateManyBadChannelIOVs.toRemove
tuple toRemove
Definition: UpdateManyBadChannelIOVs.py:86
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigNavSlimmingMTAlg::m_propagateL1Nodes
Gaudi::Property< bool > m_propagateL1Nodes
Definition: TrigNavSlimmingMTAlg.h:87
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::TrigComposite_v1::setObjectLink
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
TrigTimeStamp
utility class to measure time duration in AthenaMT The pattern when it is useful: AlgA tags the begin...
Definition: TrigTimeStamp.h:23
TrigCompositeUtils::getExpressTerminusNode
const Decision * getExpressTerminusNode(const DecisionContainer &container)
Returns the express-accept navigation node from a collection or nullptr if missing.
Definition: TrigCompositeUtilsRoot.cxx:266
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigNavSlimmingMTAlg::propagateSeedingRelation
StatusCode propagateSeedingRelation(const TrigCompositeUtils::NavGraphNode *inputNode, IOCacheMap &cache, const EventContext &ctx) const
Copy the subset of "seed" links which are present in the inputNode.
Definition: TrigNavSlimmingMTAlg.cxx:441
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
TrigNavSlimmingMTAlg::m_repackMET
Gaudi::Property< bool > m_repackMET
Definition: TrigNavSlimmingMTAlg.h:95
TrigCompositeUtils::createAndStoreNoAux
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
TrigNavSlimmingMTAlg::fillChainIDs
StatusCode fillChainIDs(TrigCompositeUtils::DecisionIDContainer &chainIDs, const TrigCompositeUtils::Decision *applyPassingChainsFilter) const
Convert the ChainsFilter into the set of chain-IDd and chain-leg-IDs which comprises all of the Decis...
Definition: TrigNavSlimmingMTAlg.cxx:327
TrigCompositeUtils::NavGraph
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
Definition: NavGraph.h:111
TrigNavSlimmingMTAlg::m_chainsFilter
Gaudi::Property< std::vector< std::string > > m_chainsFilter
Definition: TrigNavSlimmingMTAlg.h:125
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigNavSlimmingMTAlg::m_allOutputContainers
Gaudi::Property< std::vector< std::string > > m_allOutputContainers
Definition: TrigNavSlimmingMTAlg.h:116
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:49
TrigNavSlimmingMTAlg::m_propagatePrescaledNode
Gaudi::Property< bool > m_propagatePrescaledNode
Definition: TrigNavSlimmingMTAlg.h:83
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition: TrigCompositeUtils.h:416
TrigCompositeUtils::summaryPrescaledNodeName
const std::string & summaryPrescaledNodeName()
Definition: TrigCompositeUtils.h:431
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
xAOD::Particle_v1
Description of a generic particle.
Definition: Particle_v1.h:31
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
merge.output
output
Definition: merge.py:16
Trig::ChainGroup
Definition: ChainGroup.h:51
TrigNavSlimmingMTAlg::printIParticleRepackingDebug
void printIParticleRepackingDebug(const TrigCompositeUtils::Decision *output, const std::string &when) const
Print debug information relating to the re-packing of feature links as Particle objects.
Definition: TrigNavSlimmingMTAlg.cxx:557
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
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
TrigNavSlimmingMTAlg::inputToOutput
StatusCode inputToOutput(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision **output, IOCacheMap &cache, Outputs &outputContainers, const TrigCompositeUtils::DecisionIDContainer &chainIDs, const EventContext &ctx) const
Map a const Decision object from an input collection to its equivalent in the output collection Where...
Definition: TrigNavSlimmingMTAlg.cxx:419
xAOD::TrigComposite_v1::linkColNames
const std::vector< std::string > & linkColNames() const
Raw access to the persistent link names.
TrigCompositeUtils::seedString
const std::string & seedString()
Definition: TrigCompositeUtils.h:421
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
TrigNavSlimmingMTAlg::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: TrigNavSlimmingMTAlg.h:130
TrigNavSlimmingMTAlg::m_outputRepackedROICollectionKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRepackedROICollectionKey
Definition: TrigNavSlimmingMTAlg.h:59
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
TrigCaloRecConfig.outputContainers
outputContainers
Definition: TrigCaloRecConfig.py:561
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:78
xAOD::TrigComposite_v1::name
const std::string & name() const
Get a human-readable name for the object.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
TrigCompositeUtils::linkToPrevious
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
Definition: TrigCompositeUtilsRoot.cxx:140
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
TrigNavSlimmingMTAlg::m_removeEmptySteps
Gaudi::Property< bool > m_removeEmptySteps
Definition: TrigNavSlimmingMTAlg.h:79
TrigNavSlimmingMTAlg::m_applyChainsFilterToSummaryNodes
Gaudi::Property< bool > m_applyChainsFilterToSummaryNodes
Definition: TrigNavSlimmingMTAlg.h:120
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
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
TrigCompositeUtils::hypoAlgNodeName
const std::string & hypoAlgNodeName()
Definition: TrigCompositeUtils.h:426
TrigNavSlimmingMTAlg::doRepackCopy
StatusCode doRepackCopy(const typename COLLECTION::base_value_type *object, SG::WriteHandle< COLLECTION > *writeHandle) const
Performs the xAOD Copy.
TrigNavSlimmingMTAlg::m_keepOnlyFinalFeatures
Gaudi::Property< bool > m_keepOnlyFinalFeatures
Definition: TrigNavSlimmingMTAlg.h:75
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:65
TrigMissingETAuxContainer.h
TrigCompositeUtils::recursiveFlagForThinning
void recursiveFlagForThinning(NavGraph &graph, const bool keepOnlyFinalFeatures, const bool removeEmptySteps, const std::vector< std::string > &nodesToDrop)
Used by trigger navigation thinning.
Definition: TrigCompositeUtilsRoot.cxx:459
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigNavSlimmingMTAlg::initialize
virtual StatusCode initialize() override
Definition: TrigNavSlimmingMTAlg.cxx:90
TrigCompositeUtils::getNodeByName
const Decision * getNodeByName(const DecisionContainer &container, const std::string &nodeName)
Returns the navigation node with a given name from a collection or nullptr if missing.
Definition: TrigCompositeUtilsRoot.cxx:270
TrigRoiDescriptor
Athena::TPCnvVers::Current TrigRoiDescriptor
Definition: TrigSteeringEventTPCnv.cxx:68
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
TrigNavSlimmingMTAlg::propagateLinks
StatusCode propagateLinks(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output) const
Copy links (graph edges) from input to output.
Definition: TrigNavSlimmingMTAlg.cxx:493
Trig::ChainGroup::getListOfTriggers
std::vector< std::string > getListOfTriggers() const
Definition: ChainGroup.cxx:467
TrigNavSlimmingMTAlg::createPresaledGraphNode
StatusCode createPresaledGraphNode(Outputs &outputContainers, const TrigCompositeUtils::DecisionIDContainer &chainIDs) const
Creates a new graph node from scratch, populates it with the Chain IDs of all HLT chains which were n...
Definition: TrigNavSlimmingMTAlg.cxx:367
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
TrigNavSlimmingMTAlg::repackLinks
StatusCode repackLinks(TrigCompositeUtils::Decision *output, Outputs &outputContainers) const
Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg.
Definition: TrigNavSlimmingMTAlg.cxx:572
TrigTimeStamp.h
TrigCompositeUtils::inputMakerNodeName
const std::string & inputMakerNodeName()
Definition: TrigCompositeUtils.h:425
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrigCompositeUtils::NavGraph::thin
std::vector< const Decision * > thin()
Perform thinning.
Definition: NavGraph.cxx:123
TrigNavSlimmingMTAlg::Outputs
Definition: TrigNavSlimmingMTAlg.h:44
TrigNavSlimmingMTAlg::propagateDecisionIDs
StatusCode propagateDecisionIDs(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output, const TrigCompositeUtils::DecisionIDContainer &chainIDs) const
Copy DecisionIDs (passing chains and passing chain-legs) from input to output.
Definition: TrigNavSlimmingMTAlg.cxx:531
TrigCompositeUtils::recursiveGetDecisionsInternal
void recursiveGetDecisionsInternal(const Decision *node, const Decision *comingFrom, NavGraph &navGraph, std::set< const Decision * > &fullyExploredFrom, const DecisionIDContainer &ids, const bool enforceDecisionOnNode)
Used by recursiveGetDecisions.
Definition: TrigCompositeUtilsRoot.cxx:407
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
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
TrigNavSlimmingMTAlg::m_nodesToDrop
Gaudi::Property< std::vector< std::string > > m_nodesToDrop
Definition: TrigNavSlimmingMTAlg.h:112