5#ifndef TRIGNAVSLIMMINGMT_TRIGNAVSLIMMINGMTALG_H
6#define TRIGNAVSLIMMINGMT_TRIGNAVSLIMMINGMTALG_H
41 virtual StatusCode
execute (
const EventContext& ctx)
const override;
45 typedef std::map<const TrigCompositeUtils::Decision*, TrigCompositeUtils::Decision*>
IOCacheMap;
55 this,
"PrimaryInputCollection",
"HLTNav_Summary",
56 "Input collection containing the HLTPassRaw terminus node of the navigation."};
59 this,
"OutputCollection",
"HLTNav_Summary_ESDSlimmed",
60 "Single output collection containing the slimmed navigation nodes."};
63 this,
"RepackROIsOutputCollection",
"HLTNav_RepackedROIs",
64 "Single output collection containing any repacked ROIs (use with RepackROIs)."};
67 this,
"RepackFeaturesOutputCollection_Particle",
"HLTNav_RepackedFeatures_Particle",
68 "Single output collection containing any repacked Particle features (use with RepackFeatures)."};
71 this,
"RepackFeaturesOutputCollection_MET",
"HLTNav_RepackedFeatures_MET",
72 "Single output collection containing any repacked IParticle features (use with RepackFeatures)."};
75 this,
"KeepFailedBranched",
true,
76 "Keep nodes which are in branches of the graph which fail selection for all triggers, these are used by T0 monitoring."};
79 this,
"KeepOnlyFinalFeatures",
false,
80 "Keeps only the final features which accepted a chain. Fine for analysis-use."};
83 this,
"RemoveEmptySteps",
false,
84 "Slim away ComboHypo->InputMaker empty step pairs which come from parallel chain alignment (special case: keep if C.H. adds a feature, e.g. BLS). Fine for analysis-use."};
87 this,
"PropagatePrescaledNode",
false,
88 "Copies the 'HLTPrescaled' node (if it exists) from the input to output navigation collection. If it does not exist, it can be re-created from the xAOD::TriggerDecision"};
91 this,
"PropagateL1Nodes",
false,
92 "Copies the 'L1TAP' and 'L1TAV' nodes (if they exists) from the input to output navigation collection. If they do not exist, they can be re-created from the xAOD::TriggerDecision"};
95 this,
"RepackROIs",
false,
96 "Re-pack the target of all 'roi' and 'initialRoI' edges into a single container (WriteHandle defined above)"};
99 this,
"RepackMET",
false,
100 "Re-pack the target of all 'feature' edges to xAOD::TrigMissingET objects into a single container (WriteHandle defined above)"};
103 this,
"RepackFeatures",
false,
104 "Re-pack the target of all 'feature' edges into a small number of containers (WriteHandle defined above)"};
107 this,
"RepackFeaturesExclusionList", {},
108 "Optional list of StoreGate key strings. If strings are provided and RepackFeatures is true, then 'feature' edges "
109 "whose StoreGate key is an exact match to an entry on the supplied list will not be re-packed and will be left unchanged"};
112 this,
"EdgesToDrop", {
"view"},
113 "Any edges within the set of names will be dropped as part of the thinning"};
116 this,
"NodesToDrop", {
"F"},
117 "Any nodes within the set of names will be dropped as part of the thinning and the navigation re-wired around them"};
120 this,
"AllOutputContainers", {},
121 "List of SG keys of all possible output containers at differing verbosity. Used to stop different instances of the alg interfering with each other."};
124 this,
"ApplyChainsFilterToSummaryNodes",
true,
125 "If the ChainsFilter (if supplied) should be applied to the terminus, express terminus and prescaled nodes. "
126 "If set to false, the trigger decision for any chain may be obtained from the navigation at the expense of additional file size."};
129 this,
"ChainsFilter", {},
130 "Optional list of HLT chains. If provided, only navigation data corresponding to these chains will be kept. "
131 "Matching multiple chains via regular expressions is supported."};
134 this,
"TrigDecisionTool",
"Trig::TrigDecisionTool/TrigDecisionTool",
135 "Trigger Decision Tool, used to apply the ChainsFilter"};
138 this,
"RuntimeValidation",
false,
139 "Perform additional validation checks on the navigation, and print WARNINGs if anything out of the ordinary is found."};
148 std::vector<TrigCompositeUtils::DecisionID>
legIDs;
192 Outputs& outputContainers,
194 const EventContext& ctx)
const;
231 const EventContext& ctx)
const;
241 Outputs& outputContainers)
const;
248 const std::string& when)
const;
262 template<
typename COLLECTION >
265 const std::string& edgeName)
const;
271 template<
typename COLLECTION >
272 StatusCode
doRepackCopy(
const typename COLLECTION::base_value_type*
object,
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
std::vector< size_t > lookupHardCodedLegMultiplicities(const std::string &chain) const
Supplemental leg multiplicity information to support MC20.
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRepackedROICollectionKey
Gaudi::Property< std::vector< std::string > > m_edgesToDrop
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...
StatusCode cacheChainInfo() const
One-time cache of chain+leg IDs from TrigDecisionTool configuration.
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...
Gaudi::Property< bool > m_keepFailedBranches
Gaudi::Property< std::vector< std::string > > m_allOutputContainers
Gaudi::Property< bool > m_repackFeatures
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCollection
Gaudi::Property< bool > m_applyChainsFilterToSummaryNodes
Gaudi::Property< bool > m_runtimeValidation
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...
SG::WriteHandleKey< xAOD::ParticleContainer > m_outputRepackedFeaturesCollectionKey_Particle
SG::WriteHandleKey< xAOD::TrigMissingETContainer > m_outputRepackedFeaturesCollectionKey_MET
StatusCode propagateSeedingRelation(const TrigCompositeUtils::NavGraphNode *inputNode, IOCacheMap &cache, const EventContext &ctx) const
Copy the subset of "seed" links which are present in the inputNode.
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.
StatusCode createL1GraphNodes(Outputs &outputContainers) const
Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of ...
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.
Gaudi::Property< bool > m_repackMET
Gaudi::Property< bool > m_repackROIs
std::set< std::string > m_allOutputContainersSet
Processed form of m_allOutputContainers.
Gaudi::Property< std::vector< std::string > > m_repackFeaturesExclusionList
Gaudi::Property< bool > m_keepOnlyFinalFeatures
StatusCode doRepackCopy(const typename COLLECTION::base_value_type *object, SG::WriteHandle< COLLECTION > *writeHandle) const
Performs the xAOD Copy.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_primaryInputCollection
TrigNavSlimmingMTAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode repackLinks(TrigCompositeUtils::Decision *output, Outputs &outputContainers) const
Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg.
std::map< const TrigCompositeUtils::Decision *, TrigCompositeUtils::Decision * > IOCacheMap
Gaudi::Property< std::vector< std::string > > m_nodesToDrop
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< bool > m_removeEmptySteps
virtual StatusCode initialize() override
Gaudi::Property< bool > m_propagatePrescaledNode
Gaudi::Property< bool > m_propagateL1Nodes
std::once_flag m_chainIDsCacheFlag ATLAS_THREAD_SAFE
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
StatusCode propagateLinks(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output) const
Copy links (graph edges) from input to output.
Gaudi::Property< std::vector< std::string > > m_chainsFilter
xAOD::TrigComposite Decision
std::set< DecisionID > DecisionIDContainer
Cached chain configuration from TrigDecisionTool (populated once on first event).
std::vector< TrigCompositeUtils::DecisionID > legIDs
TrigCompositeUtils::DecisionID chainID
SG::WriteHandle< TrigRoiDescriptorCollection > * rois
SG::WriteHandle< xAOD::ParticleContainer > * particles
SG::WriteHandle< xAOD::TrigMissingETContainer > * mets
SG::WriteHandle< xAOD::TrigCompositeContainer > * nav