 |
ATLAS Offline Software
|
Consumes a set of Run 3 trigger navigation collection(s), applies slimming/thinning, writes out a single output collection.
More...
#include <TrigNavSlimmingMTAlg.h>
|
| | TrigNavSlimmingMTAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| |
| virtual StatusCode | initialize () override |
| |
| virtual StatusCode | execute (const EventContext &ctx) const override |
| |
| template<> |
| StatusCode | doRepack (TrigCompositeUtils::Decision *decision, SG::WriteHandle< xAOD::ParticleContainer > *writeHandle, const std::string &edgeName) const |
| |
| template<> |
| StatusCode | doRepackCopy (const TrigRoiDescriptor *object, SG::WriteHandle< TrigRoiDescriptorCollection > *writeHandle) const |
| |
| virtual StatusCode | sysInitialize () override |
| | Override sysInitialize. More...
|
| |
| virtual bool | isClonable () const override |
| | Specify if the algorithm is clonable. More...
|
| |
| virtual unsigned int | cardinality () const override |
| | Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
| |
| virtual StatusCode | sysExecute (const EventContext &ctx) override |
| | Execute an algorithm. More...
|
| |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| | Return the list of extra output dependencies. More...
|
| |
| virtual bool | filterPassed (const EventContext &ctx) const |
| |
| virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
| |
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | evtStore () const |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| virtual StatusCode | sysStart () override |
| | Handle START transition. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles. More...
|
| |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| | Declare a new Gaudi property. More...
|
| |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| |
| MsgStream & | msg () const |
| |
| MsgStream & | msg (const MSG::Level lvl) const |
| |
| bool | msgLvl (const MSG::Level lvl) const |
| |
|
| 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 DecisionIDs used by the members of the ChainsFilter. More...
|
| |
| 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 not run in this event due to application of HLT prescales. More...
|
| |
| StatusCode | createL1GraphNodes (Outputs &outputContainers) const |
| | Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of the item names L1 items which passed before prescale and after veto. More...
|
| |
| 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 a new Decision object is required in the output collection, the propagateLinks function is applied. More...
|
| |
| StatusCode | propagateLinks (const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output) const |
| | Copy links (graph edges) from input to output. More...
|
| |
| 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. More...
|
| |
| StatusCode | propagateSeedingRelation (const TrigCompositeUtils::NavGraphNode *inputNode, IOCacheMap &cache, const EventContext &ctx) const |
| | Copy the subset of "seed" links which are present in the inputNode. More...
|
| |
| StatusCode | repackLinks (TrigCompositeUtils::Decision *output, Outputs &outputContainers) const |
| | Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg. More...
|
| |
| 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. More...
|
| |
| std::vector< size_t > | lookupHardCodedLegMultiplicities (const std::string &chain) const |
| | Supplemental leg multiplicity information to support MC20. More...
|
| |
| template<typename COLLECTION > |
| 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 of the linked object to the supplied writeHandle and update the link in 'decision' to point to this rewritten object. More...
|
| |
| template<typename COLLECTION > |
| StatusCode | doRepackCopy (const typename COLLECTION::base_value_type *object, SG::WriteHandle< COLLECTION > *writeHandle) const |
| | Performs the xAOD Copy. More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
Consumes a set of Run 3 trigger navigation collection(s), applies slimming/thinning, writes out a single output collection.
Operations include:
- Keeping graph nodes which correspond to a particular set of chains. Good for small dAOD sizes.
- Keeping only the bottom of the graph, from the final "feature" onward. Good for physics analysis / trigger matching.
- Keeping failed branches. Used for trigger performance studies / T0 monitoring.
- Removing named nodes from the graph, ("F"ilter nodes are only used online).
- Removing named edges from the graph, ("view" edges are only used online).
Definition at line 34 of file TrigNavSlimmingMTAlg.h.
◆ IOCacheMap
◆ StoreGateSvc_t
◆ TrigNavSlimmingMTAlg()
| TrigNavSlimmingMTAlg::TrigNavSlimmingMTAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ createL1GraphNodes()
| StatusCode TrigNavSlimmingMTAlg::createL1GraphNodes |
( |
Outputs & |
outputContainers | ) |
const |
|
private |
Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of the item names L1 items which passed before prescale and after veto.
This makes available L1 trigger is-passed data in the same format as used for HLT navigation. This creates two nodes which were never made at P1 during Run 3.
- Parameters
-
| [out] | output | Pointer to the Decision object ptr in the output collection. |
Definition at line 393 of file TrigNavSlimmingMTAlg.cxx.
401 if (
chains.size() != bits.size()) {
402 ATH_MSG_ERROR(
"Unexpected different sized chains and bits vectors");
403 return StatusCode::FAILURE;
407 for (
size_t i = 0;
i < bits.size(); ++
i) {
414 ATH_MSG_INFO(
"Created new TAV node at index " << L1TAVNode->
index() <<
" with " << TBPIDs.size() <<
" = " << TAVIDs.size() <<
" decisions\n" << *L1TAVNode );
415 return StatusCode::SUCCESS;
◆ createPresaledGraphNode()
Creates a new graph node from scratch, populates it with the Chain IDs of all HLT chains which were not run in this event due to application of HLT prescales.
The data are read from the trigger bits using the TrigDecisionTool. This re-creates a node which is available at P1 in Run 3, but which was never persisted into the online slimmed navigation.
- Parameters
-
| [out] | output | Pointer to the Decision object ptr in the output collection. |
| [in] | chainIDs | DecisionIDs are used to filter the output DecisionObjects. |
Definition at line 367 of file TrigNavSlimmingMTAlg.cxx.
373 if (
chains.size() != bits.size()) {
374 ATH_MSG_ERROR(
"Unexpected different sized chains and bits vectors");
375 return StatusCode::FAILURE;
379 for (
size_t i = 0;
i < bits.size(); ++
i) {
385 return !chainIDs.contains(
id);
390 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ doRepack() [1/2]
template<typename COLLECTION >
Look for an ElementLink<COLLECTION> with the given edge-name in 'decision', if found then make a copy of the linked object to the supplied writeHandle and update the link in 'decision' to point to this rewritten object.
- Parameters
-
| [in] | decision | A mutable decision object we're outputting from the nav slimming |
| [in] | writeHandle | Mutable write handle where we can make a copy of the roi or feature. |
◆ doRepack() [2/2]
Definition at line 22 of file TrigNavSlimmingMTAlg.cxx.
29 return StatusCode::SUCCESS;
36 ATH_MSG_DEBUG(
"Unable to repack '" << edgeName <<
"' of container type xAOD::IParticleContainer for '"
37 << decision->
name() <<
"' node, the link is invalid.");
39 return StatusCode::SUCCESS;
46 const std::string featureStoreGateKey = currentEL.
dataID();
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;
66 <<
", to index:" << remappedEL.index() <<
" to key:" << remappedEL.dataID());
68 return StatusCode::SUCCESS;
◆ doRepackCopy() [1/2]
◆ doRepackCopy() [2/2]
template<typename COLLECTION >
| StatusCode TrigNavSlimmingMTAlg::doRepackCopy |
( |
const typename COLLECTION::base_value_type * |
object, |
|
|
SG::WriteHandle< COLLECTION > * |
writeHandle |
|
) |
| const |
|
private |
Performs the xAOD Copy.
Any non-xAOD collections will need to provide an explicit implementation of this function. For example, TrigRoiDescriptorCollection for example.
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
| StatusCode TrigNavSlimmingMTAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 126 of file TrigNavSlimmingMTAlg.cxx.
155 ATH_MSG_ERROR(
"Unable to locate the HLTPassRaw from the primary input navigation collection, size:" << primaryInputHandle->
size());
156 return StatusCode::FAILURE;
166 const Decision* applyPassingChainsFilter =
nullptr;
168 applyPassingChainsFilter = terminusNode;
171 ATH_MSG_DEBUG(
"Supplied " <<
m_chainsFilter.size() <<
" chain patterns. This converts to " << chainIDs.size() <<
" DecisionIDs to be preserved.");
172 if (chainIDs.empty()) {
177 ATH_MSG_DEBUG(
"No HLT-chain based filtering of the navigation graph will be performed.");
180 std::set<const Decision*> fullyExploredFrom;
190 ATH_MSG_DEBUG(
"Collated nodes from passing paths, now have " << transientNavGraph.
nodes() <<
" nodes with " << transientNavGraph.
edges() <<
" edges");
201 for (
const Decision* rejectedNode : rejectedNodes) {
212 ATH_MSG_DEBUG(
"Collated nodes from failing paths, now have " << transientNavGraph.
nodes() <<
" nodes with " << transientNavGraph.
edges() <<
" edges");
227 const size_t nodesBefore = transientNavGraph.
nodes();
228 const size_t edgesBefore = transientNavGraph.
edges();
229 std::vector<const Decision*> thinnedInputNodes = transientNavGraph.
thin();
234 ATH_MSG_DEBUG(
"Trigger navigation graph thinning going from " << nodesBefore <<
" nodes with " << edgesBefore <<
" edges, to "
235 << transientNavGraph.
nodes() <<
" nodes with " << transientNavGraph.
edges() <<
" edges");
238 ATH_MSG_VERBOSE(
"The navigation graph has been slimmed to the following paths:");
247 Decision* terminusNodeOut =
nullptr;
252 if (expressTerminusNode) {
254 Decision* expressTerminusNodeOut =
nullptr;
262 Decision* prescaleNodeOut =
nullptr;
273 if (L1TBPNode && L1TAVNode) {
285 const std::vector<NavGraphNode*> allNodes = transientNavGraph.
allNodes();
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;
303 transientNavGraphOut,
304 fullyExploredFromOut,
319 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ fillChainIDs()
Convert the ChainsFilter into the set of chain-IDd and chain-leg-IDs which comprises all of the DecisionIDs used by the members of the ChainsFilter.
- Parameters
-
| [out] | chainIDs | The set to be populated from m_chainsFilter and, optionally, the navigation terminus node |
| [in] | applyPassingChainsFilter | Set to the terminus node to additionally filter on per-event passing chains. Or set to nullptr to skip this filter. |
Definition at line 327 of file TrigNavSlimmingMTAlg.cxx.
329 if (applyPassingChainsFilter) {
340 if (passingChains.size() && passingChains.count( chainID.numeric() ) == 0) {
344 chainIDs.insert( chainID.numeric() );
346 ATH_MSG_VERBOSE(
"Including " <<
chain <<
" and its " << legMultiplicites.size() <<
" legs in the trigger slimming output");
347 if (legMultiplicites.size() == 0) {
349 if (legMultiplicites.size() == 0) {
350 ATH_MSG_ERROR(
"chain " << chainID <<
" has invalid configuration, no multiplicity data.");
351 return StatusCode::FAILURE;
354 if (legMultiplicites.size() > 1) {
357 for (
size_t legNumeral = 0; legNumeral < legMultiplicites.size(); ++legNumeral) {
359 chainIDs.insert( legID.
numeric() );
364 return StatusCode::SUCCESS;
◆ filterPassed()
◆ initialize()
| StatusCode TrigNavSlimmingMTAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 90 of file TrigNavSlimmingMTAlg.cxx.
101 ATH_MSG_WARNING(
"Possible miss-configuration. Cannot repack ROIs in the navigation slimming if they are being dropped");
117 msg() <<
MSG::INFO <<
"Initialized. Will *not* inspect the following SG Keys: ";
122 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ inputToOutput()
Map a const Decision object from an input collection to its equivalent in the output collection Where a new Decision object is required in the output collection, the propagateLinks function is applied.
- Parameters
-
| [in] | input | The const Decision object from a input collection. |
| [out] | output | Pointer to the Decision object ptr in the output collection. |
| [in,out] | cache | Cached mapping of input->output objects. Cached output is returned if present. |
| [in,out] | outputContainers | The write handles, contains the nav write handle which should own any new Decision objects which need to be created. |
| [in] | chainIDs | DecisionIDs which should propagate from input to output DecisionObjects. |
| [in] | ctx | Event context. |
Definition at line 419 of file TrigNavSlimmingMTAlg.cxx.
427 IOCacheMap::const_iterator
it = cache.find(
input);
428 if (
it != cache.end()) {
437 return StatusCode::SUCCESS;
◆ isClonable()
◆ lookupHardCodedLegMultiplicities()
| std::vector< size_t > TrigNavSlimmingMTAlg::lookupHardCodedLegMultiplicities |
( |
const std::string & |
chain | ) |
const |
|
private |
Supplemental leg multiplicity information to support MC20.
Definition at line 322 of file TrigNavSlimmingMTAlg.cxx.
323 if (
chain ==
"HLT_id_cosmicid_L1MU11_EMPTY")
return std::vector<size_t>(1,1);
324 return std::vector<size_t>();
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ printIParticleRepackingDebug()
Print debug information relating to the re-packing of feature links as Particle objects.
Definition at line 557 of file TrigNavSlimmingMTAlg.cxx.
564 <<
"(pt:" <<
l.pt() <<
",eta:" <<
l.eta() <<
",phi:" <<
l.phi() <<
",m:" <<
l.m() <<
",e:" <<
l.e() <<
")"
565 <<
" from:" << link.
dataID());
◆ propagateDecisionIDs()
Copy DecisionIDs (passing chains and passing chain-legs) from input to output.
Applies the ChainsFilter.
- Parameters
-
| [in] | input | The Decision object to copy from. |
| [out] | output | The Decision object to copy to. |
| [in] | chainIDs | DecisionIDs which should propagate from input to output DecisionObjects. |
Definition at line 531 of file TrigNavSlimmingMTAlg.cxx.
542 if ( chainIDs.size() ) {
545 std::inserter(toOutput, toOutput.begin()));
548 toOutput.insert(fromInput.begin(), fromInput.end());
554 return StatusCode::SUCCESS;
◆ propagateLinks()
Copy links (graph edges) from input to output.
Applies the EdgesToDrop thinning. Note: Does not copy "seed" links which form the underlying graph structure.
- Parameters
-
| [in] | input | The Decision object to copy from. |
| [out] | output | The Decision object to copy to. |
Definition at line 493 of file TrigNavSlimmingMTAlg.cxx.
507 const Decision*
const firstParent = (seeds.size() ? *seeds.at(0) :
nullptr);
527 return StatusCode::SUCCESS;
◆ propagateSeedingRelation()
Copy the subset of "seed" links which are present in the inputNode.
This function uses the IOCacheMap to perform all linking only against the mutable Decision objects which form the slimmed and thinned navigation. It must only be called after inputToOutput has been used to create all of the output Decision objects.
- Parameters
-
| [in] | inputNode | The thinned transient NavGraphNode which only now has seed links which we want to keep |
| [in,out] | cache | Cached mapping of input->output objects. |
| [in] | ctx | Event context. |
Definition at line 441 of file TrigNavSlimmingMTAlg.cxx.
449 IOCacheMap::const_iterator
it = cache.find(inputDecision);
451 outputDecision =
it->second;
455 const Decision* outputSeedDecision =
nullptr;
457 IOCacheMap::const_iterator
it = cache.find(inputSeedDecision);
459 outputSeedDecision =
it->second;
468 const size_t sensibleUpperBoundOnNLinks = 100;
469 const size_t maxUpperBoundOnNLinks = 500;
471 const bool bad_in = inputNode->
children().size() > sensibleUpperBoundOnNLinks;
473 const bool bad_out = outputDecision->
linkColNames().size() > sensibleUpperBoundOnNLinks;
474 const bool vbad = inputNode->
children().size() > maxUpperBoundOnNLinks or outputDecision->
linkColNames().size() > maxUpperBoundOnNLinks;
476 ATH_MSG_WARNING(
"Saving a Decision object with a very large number of INCOMING graph edges. Number of in-edges: " << inputNode->
children().size());
479 ATH_MSG_WARNING(
"Saving a Decision object with a very large number of OUTGOING graph edges. Number of out-edges: " << outputDecision->
linkColNames().size());
481 if (bad_in or bad_out) {
486 ATH_MSG_ERROR(
"More than " << maxUpperBoundOnNLinks <<
" links, printing an ERROR such that this gets promptly investigated and reduced.");
489 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ repackLinks()
Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg.
- Parameters
-
| [in] | decision | A mutable decision object we're outputting from the nav slimming |
| [in] | outputContainers | The mutable write handles, in these we will make a copy of the rois or features we repack. |
Definition at line 572 of file TrigNavSlimmingMTAlg.cxx.
601 return StatusCode::SUCCESS;
◆ setFilterPassed()
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_allOutputContainers
| Gaudi::Property<std::vector<std::string> > TrigNavSlimmingMTAlg::m_allOutputContainers |
|
private |
Initial value:{
this, "AllOutputContainers", {},
"List of SG keys of all possible output containers at differing verbosity. Used to stop different instances of the alg interfering with each other."}
Definition at line 116 of file TrigNavSlimmingMTAlg.h.
◆ m_allOutputContainersSet
| std::set<std::string> TrigNavSlimmingMTAlg::m_allOutputContainersSet |
|
private |
◆ m_applyChainsFilterToSummaryNodes
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_applyChainsFilterToSummaryNodes |
|
private |
Initial value:{
this, "ApplyChainsFilterToSummaryNodes", true,
"If the ChainsFilter (if supplied) should be applied to the terminus, express terminus and prescaled nodes. "
"If set to false, the trigger decision for any chain may be obtained from the navigation at the expense of additional file size."}
Definition at line 120 of file TrigNavSlimmingMTAlg.h.
◆ m_chainsFilter
| Gaudi::Property<std::vector<std::string> > TrigNavSlimmingMTAlg::m_chainsFilter |
|
private |
Initial value:{
this, "ChainsFilter", {},
"Optional list of HLT chains. If provided, only navigation data corresponding to these chains will be kept. "
"Matching multiple chains via regular expressions is supported."}
Definition at line 125 of file TrigNavSlimmingMTAlg.h.
◆ m_detStore
◆ m_edgesToDrop
| Gaudi::Property<std::vector<std::string> > TrigNavSlimmingMTAlg::m_edgesToDrop |
|
private |
Initial value:{
this, "EdgesToDrop", {"view"},
"Any edges within the set of names will be dropped as part of the thinning"}
Definition at line 108 of file TrigNavSlimmingMTAlg.h.
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_keepFailedBranches
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_keepFailedBranches |
|
private |
Initial value:{
this, "KeepFailedBranched", true,
"Keep nodes which are in branches of the graph which fail selection for all triggers, these are used by T0 monitoring."}
Definition at line 71 of file TrigNavSlimmingMTAlg.h.
◆ m_keepOnlyFinalFeatures
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_keepOnlyFinalFeatures |
|
private |
Initial value:{
this, "KeepOnlyFinalFeatures", false,
"Keeps only the final features which accepted a chain. Fine for analysis-use."}
Definition at line 75 of file TrigNavSlimmingMTAlg.h.
◆ m_nodesToDrop
| Gaudi::Property<std::vector<std::string> > TrigNavSlimmingMTAlg::m_nodesToDrop |
|
private |
Initial value:{
this, "NodesToDrop", {"F"},
"Any nodes within the set of names will be dropped as part of the thinning and the navigation re-wired around them"}
Definition at line 112 of file TrigNavSlimmingMTAlg.h.
◆ m_outputCollection
Initial value:{
this, "OutputCollection", "HLTNav_Summary_ESDSlimmed",
"Single output collection containing the slimmed navigation nodes."}
Definition at line 55 of file TrigNavSlimmingMTAlg.h.
◆ m_outputRepackedFeaturesCollectionKey_MET
Initial value:{
this, "RepackFeaturesOutputCollection_MET", "HLTNav_RepackedFeatures_MET",
"Single output collection containing any repacked IParticle features (use with RepackFeatures)."}
Definition at line 67 of file TrigNavSlimmingMTAlg.h.
◆ m_outputRepackedFeaturesCollectionKey_Particle
Initial value:{
this, "RepackFeaturesOutputCollection_Particle", "HLTNav_RepackedFeatures_Particle",
"Single output collection containing any repacked Particle features (use with RepackFeatures)."}
Definition at line 63 of file TrigNavSlimmingMTAlg.h.
◆ m_outputRepackedROICollectionKey
Initial value:{
this, "RepackROIsOutputCollection", "HLTNav_RepackedROIs",
"Single output collection containing any repacked ROIs (use with RepackROIs)."}
Definition at line 59 of file TrigNavSlimmingMTAlg.h.
◆ m_primaryInputCollection
Initial value:{
this, "PrimaryInputCollection", "HLTNav_Summary",
"Input collection containing the HLTPassRaw terminus node of the navigation."}
Definition at line 51 of file TrigNavSlimmingMTAlg.h.
◆ m_propagateL1Nodes
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_propagateL1Nodes |
|
private |
Initial value:{
this, "PropagateL1Nodes", false,
"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"}
Definition at line 87 of file TrigNavSlimmingMTAlg.h.
◆ m_propagatePrescaledNode
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_propagatePrescaledNode |
|
private |
Initial value:{
this, "PropagatePrescaledNode", false,
"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"}
Definition at line 83 of file TrigNavSlimmingMTAlg.h.
◆ m_removeEmptySteps
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_removeEmptySteps |
|
private |
Initial value:{
this, "RemoveEmptySteps", false,
"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."}
Definition at line 79 of file TrigNavSlimmingMTAlg.h.
◆ m_repackFeatures
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_repackFeatures |
|
private |
Initial value:{
this, "RepackFeatures", false,
"Re-pack the target of all 'feature' edges into a small number of containers (WriteHandle defined above)"}
Definition at line 99 of file TrigNavSlimmingMTAlg.h.
◆ m_repackFeaturesExclusionList
| Gaudi::Property<std::vector<std::string> > TrigNavSlimmingMTAlg::m_repackFeaturesExclusionList |
|
private |
Initial value:{
this, "RepackFeaturesExclusionList", {},
"Optional list of StoreGate key strings. If strings are provided and RepackFeatures is true, then 'feature' edges "
"whose StoreGate key is an exact match to an entry on the supplied list will not be re-packed and will be left unchanged"}
Definition at line 103 of file TrigNavSlimmingMTAlg.h.
◆ m_repackMET
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_repackMET |
|
private |
Initial value:{
this, "RepackMET", false,
"Re-pack the target of all 'feature' edges to xAOD::TrigMissingET objects into a single container (WriteHandle defined above)"}
Definition at line 95 of file TrigNavSlimmingMTAlg.h.
◆ m_repackROIs
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_repackROIs |
|
private |
Initial value:{
this, "RepackROIs", false,
"Re-pack the target of all 'roi' and 'initialRoI' edges into a single container (WriteHandle defined above)"}
Definition at line 91 of file TrigNavSlimmingMTAlg.h.
◆ m_runtimeValidation
| Gaudi::Property<bool> TrigNavSlimmingMTAlg::m_runtimeValidation |
|
private |
Initial value:{
this, "RuntimeValidation", false,
"Perform additional validation checks on the navigation, and print WARNINGs if anything out of the ordinary is found."}
Definition at line 134 of file TrigNavSlimmingMTAlg.h.
◆ m_trigDec
Initial value:{
this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool",
"Trigger Decision Tool, used to apply the ChainsFilter"}
Definition at line 130 of file TrigNavSlimmingMTAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const std::string & featureString()
std::vector< unsigned int > isPassedBitsForEach() const
return result of isPassedBits for each chain in the group
SG::WriteHandleKey< xAOD::TrigMissingETContainer > m_outputRepackedFeaturesCollectionKey_MET
Gaudi::Property< bool > m_runtimeValidation
std::map< const TrigCompositeUtils::Decision *, TrigCompositeUtils::Decision * > IOCacheMap
double millisecondsDifference(const TrigTimeStamp &other) const
StatusCode createL1GraphNodes(Outputs &outputContainers) const
Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of ...
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_primaryInputCollection
Gaudi::Property< bool > m_repackROIs
std::string find(const std::string &s)
return a remapped string
Gaudi::Property< bool > m_keepFailedBranches
const std::string & chain_name() const
TrigCompositeUtils::DecisionID numeric() const
numeric ID
ElementLink< CONTAINER > objectLink(const std::string &name) const
Get the link with the requested name.
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.
std::set< std::string > m_allOutputContainersSet
Processed form of m_allOutputContainers.
const std::vector< NavGraphNode * > & seeds() const
Return a vector of const pointers to the Decision object nodes which this NavGraphNode seeds from.
const std::string & summaryPassNodeName()
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
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.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
bool msgLvl(const MSG::Level lvl) const
std::vector< NavGraphNode * > allNodes()
Get all nodes.
Gaudi::Property< bool > m_repackFeatures
Gaudi::Property< std::vector< std::string > > m_edgesToDrop
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
std::vector< size_t > lookupHardCodedLegMultiplicities(const std::string &chain) const
Supplemental leg multiplicity information to support MC20.
#define ATH_MSG_VERBOSE(x)
HLT chain configuration information.
double millisecondsSince() const
Class providing the definition of the 4-vector interface.
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
const std::string & roiString()
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCollection
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
const std::vector< NavGraphNode * > & children() const
Return a vector of const pointers to the Decision object nodes which are the children of this NavGrap...
const std::vector< size_t > & leg_multiplicities() const
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
const Decision * getTerminusNode(SG::ReadHandle< DecisionContainer > &container)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::WriteHandleKey< xAOD::ParticleContainer > m_outputRepackedFeaturesCollectionKey_Particle
void setP4(const FourMom_t &vec)
Set the 4-vec.
Gaudi::Property< bool > m_propagateL1Nodes
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
utility class to measure time duration in AthenaMT The pattern when it is useful: AlgA tags the begin...
const Decision * getExpressTerminusNode(const DecisionContainer &container)
Returns the express-accept navigation node from a collection or nullptr if missing.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StatusCode propagateSeedingRelation(const TrigCompositeUtils::NavGraphNode *inputNode, IOCacheMap &cache, const EventContext &ctx) const
Copy the subset of "seed" links which are present in the inputNode.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Default, invalid implementation of ClassID_traits.
Gaudi::Property< bool > m_repackMET
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
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...
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
Gaudi::Property< std::vector< std::string > > m_chainsFilter
Gaudi::Property< std::vector< std::string > > m_allOutputContainers
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class used to describe composite objects in the HLT.
Gaudi::Property< bool > m_propagatePrescaledNode
size_t index() const
Return the index of this element within its container.
const std::string & initialRoIString()
const std::string & summaryPrescaledNodeName()
Description of a generic particle.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::size_t erase_if(T_container &container, T_Func pred)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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.
const Decision * node() const
Return a const pointer to the Decision object node which this NavGraphNode is shadowing.
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...
Gaudi::Property< std::vector< std::string > > m_repackFeaturesExclusionList
const std::vector< std::string > & linkColNames() const
Raw access to the persistent link names.
const std::string & seedString()
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRepackedROICollectionKey
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)
const std::string & name() const
Get a human-readable name for the object.
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
std::set< DecisionID > DecisionIDContainer
Gaudi::Property< bool > m_removeEmptySteps
Gaudi::Property< bool > m_applyChainsFilterToSummaryNodes
#define ATH_MSG_WARNING(x)
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
const std::string & hypoAlgNodeName()
Gaudi::Property< bool > m_keepOnlyFinalFeatures
index_type index() const
Get the index of the element inside of its container.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void recursiveFlagForThinning(NavGraph &graph, const bool keepOnlyFinalFeatures, const bool removeEmptySteps, const std::vector< std::string > &nodesToDrop)
Used by trigger navigation thinning.
virtual StatusCode sysInitialize() override
Override sysInitialize.
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.
Athena::TPCnvVers::Current TrigRoiDescriptor
StatusCode propagateLinks(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output) const
Copy links (graph edges) from input to output.
std::vector< std::string > getListOfTriggers() const
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...
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StatusCode repackLinks(TrigCompositeUtils::Decision *output, Outputs &outputContainers) const
Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg.
const std::string & inputMakerNodeName()
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< const Decision * > thin()
Perform thinning.
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.
void recursiveGetDecisionsInternal(const Decision *node, const Decision *comingFrom, NavGraph &navGraph, std::set< const Decision * > &fullyExploredFrom, const DecisionIDContainer &ids, const bool enforceDecisionOnNode)
Used by recursiveGetDecisions.
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
Gaudi::Property< std::vector< std::string > > m_nodesToDrop