|
ATLAS Offline Software
|
#include <ComboHypo.h>
|
| ComboHypo (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~ComboHypo () override |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &context) const override |
|
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 > &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 | copyDecisions (const Combo::LegDecisionsMap &passingLegs, const EventContext &context) const |
| iterates over the inputs and for every object (no filtering) crates output object linked to input moving the decisions that are mentioned in the passing set More...
|
|
StatusCode | extractFeatureAndRoI (const HLT::Identifier &chainLegId, const ElementLink< TrigCompositeUtils::DecisionContainer > &EL, SG::sgkey_t &featureKey, TrigCompositeUtils::Decision::index_type &featureIndex, SG::sgkey_t &roiKey, TrigCompositeUtils::Decision::index_type &roiIndex, bool &roiFullscan, bool &objectRequestsNoMultiplicityCheck, SG::SGKeyMap< std::set< uint32_t >> &priorFeaturesMap) const |
| For a given Decision node from a HypoAlg, extracts type-less identification data on the node's Feature and seeding ROI. More...
|
|
StatusCode | fillDecisionsMap (Combo::LegDecisionsMap &dmap, const EventContext &context) const |
| iterates over all inputs, associating inputs to legs More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > | m_inputs { this, "HypoInputDecisions", {}, "Input Decisions" } |
|
SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > | m_outputs { this, "HypoOutputDecisions", {}, "Output Decisions" } |
|
Gaudi::Property< bool > | m_requireUniqueROI |
|
Gaudi::Property< Combo::MultiplicityReqMap > | m_multiplicitiesReqMap |
|
Gaudi::Property< Combo::LegMap > | m_legToInputCollectionMap |
|
Gaudi::Property< bool > | m_checkMultiplicityMap |
|
ToolHandleArray< ComboHypoToolBase > | m_hypoTools {this, "ComboHypoTools", {}, "Tools to perform selection"} |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
hypotheses required only counting (multiplicity requirements)
- Warning
- while configuring it the order of specified multiplicities has to match order of input decision containers i.e. if feed with: electronDecisions muonDecisions jetDecisions the multiplicity specification like this: "HLT_4e10_2mu7_j100" : [ 4, 2, 1 ] will apply respectively requirement of 4, 2, 1 positive decisions in electron, muon and jet inputs the leg specification like this: "HLT_4e10_2mu7_j100" : [ 0, 1, 2 ], where the names of legs are leg000, leg001, and leg002.
Definition at line 31 of file ComboHypo.h.
◆ StoreGateSvc_t
◆ ComboHypo()
ComboHypo::ComboHypo |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~ComboHypo()
ComboHypo::~ComboHypo |
( |
| ) |
|
|
overridevirtual |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
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 55 of file AthReentrantAlgorithm.cxx.
◆ copyDecisions()
iterates over the inputs and for every object (no filtering) crates output object linked to input moving the decisions that are mentioned in the passing set
Definition at line 86 of file ComboHypo.cxx.
88 for (
auto const& element : passingLegs) {
89 passing.insert(element.first);
92 ATH_MSG_DEBUG(
"Copying "<<passing.size()<<
" positive decision IDs to outputs");
94 for (
size_t input_counter = 0; input_counter <
m_inputs.size(); ++input_counter ) {
97 auto outDecisions = outputHandle.
ptr();
99 if ( inputHandle.isValid() ) {
101 for (
const Decision* inputDecision : *inputHandle) {
108 ATH_MSG_DEBUG(
"Searching this element in the map: ("<<thisEL.dataID() <<
" , " << thisEL.index()<<
")");
113 const std::vector<ElementLink<DecisionContainer>>&
Comb=passingLegs.at(
c);
117 ATH_MSG_DEBUG(
" Adding "<< cID <<
" because EL is found in the passingLegs map");
118 finalIds.insert( cID.
numeric() );
121 finalIds.insert( mainChain.
numeric() );
127 ATH_MSG_DEBUG(
"New decision (Container Index:" << input_counter <<
", Element Index:"<< newDec->
index() <<
") has "
136 ATH_MSG_DEBUG(
"Output Handle " <<
m_outputs.at(input_counter).key() <<
" with " << outputHandle->
size() <<
" Decision objects");
140 ATH_MSG_DEBUG(
" Decision object #" <<
d->index() <<
" with " << objDecisions.size()<<
" positive decision IDs");
148 return StatusCode::SUCCESS;
◆ decisionsInput()
◆ decisionsOutput()
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode ComboHypo::execute |
( |
const EventContext & |
context | ) |
const |
|
overridevirtual |
< Keeps track per leg of the hash of the objects passing the leg
< We allow Jets or a FullScan ROI to pass any multiplicity. So we may have to magic up some unique hashes. Counting integers work fine.
< If this grows greater than one then we have to start culling features from legs
< If the hash is used in multiple legs, which leg can least afford to lose it?
< How many features the leg at keepLegIndex can afford to lose before it starts to fail its multiplicity requirement.
Reimplemented in TrigMultiTrkComboHypo, TrigBmumuxComboHypo, and TrigBmuxComboHypo.
Definition at line 152 of file ComboHypo.cxx.
166 const std::vector<int>& multiplicityPerLeg =
m.second;
170 allDecisionIds.insert(requiredDecisionID);
172 bool overallDecision =
true;
174 std::vector< SG::SGKeySet > legFeatureHashes;
175 legFeatureHashes.resize( multiplicityPerLeg.size() );
191 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex ) {
192 const size_t requiredMultiplicity = multiplicityPerLeg.at( legIndex );
196 if (multiplicityPerLeg.size() > 1) {
197 ATH_MSG_DEBUG(chainId <<
" has multiplicityPerLeg.size() > 1, so we use legXXX_HLT_YYY, instead of HLT_YYY");
202 ATH_MSG_DEBUG(
"Container " << legIndex <<
", looking at leg : " << legId );
204 Combo::LegDecisionsMap::const_iterator
it = dmap.find(requiredDecisionIDLeg);
205 if (
it == dmap.end() ) {
210 const size_t nLegDecisionObjects =
it->second.size();
212 ATH_MSG_DEBUG(
"Will attempt to meet the required multiplicity of " << requiredMultiplicity <<
" for leg " << legId
213 <<
" with " << nLegDecisionObjects <<
" Decision Objects in leg " << legIndex <<
" of " << legId);
231 bool roiIsFullscan =
false;
232 bool objectRequestsNoMultiplicityCheck =
false;
233 ATH_CHECK(
extractFeatureAndRoI(
it->first, dEL, featureKey, featureIndex, roiKey, roiIndex, roiIsFullscan, objectRequestsNoMultiplicityCheck, priorFeaturesMap) );
234 const bool theFeatureIsTheROI = (
SG::sgkeyEqual (featureKey, roiKey) and featureIndex == roiIndex);
235 const bool thereIsNoFeatureYet = (featureKey == 0 and roiKey != 0);
236 if (objectRequestsNoMultiplicityCheck or (roiIsFullscan and (theFeatureIsTheROI or thereIsNoFeatureYet))) {
238 for (
size_t i = 0;
i < requiredMultiplicity; ++
i) {
239 legFeatureHashes.at( legIndex ).insert( ++passthroughCounter );
240 ATH_MSG_DEBUG(
" -- Add feature hash '" << passthroughCounter <<
"' to leg " << legIndex
241 <<
". (Note: unique passing hash generated from " << (objectRequestsNoMultiplicityCheck ?
"an object requesting NO multiplicity checks" :
"an FullScan ROI") <<
")");
244 const SG::sgkey_t uniquenessHash = (featureKey != 0 ? (featureKey + featureIndex) : (roiKey + roiIndex));
245 legFeatureHashes.at( legIndex ).insert( uniquenessHash );
246 ATH_MSG_DEBUG(
" -- Add feature hash '" << uniquenessHash <<
"' to leg " << legIndex <<
".");
251 thisChainCombMap.insert (*
it);
252 allDecisionIds.insert(requiredDecisionIDLeg);
260 size_t emergencyBreak = 0;
262 bool somethingChanged =
false;
264 for (
auto const& [
key, payloadSet] : priorFeaturesMap) {
265 if (payloadSet.count(legHash) == 1) {
266 ATH_MSG_DEBUG(
"Feature hash=" << legHash <<
" identified as a prior feature of hash=" <<
key
267 <<
", we will up-cast this hash to the later version for ComboHypo uniqueness comparison purposes.");
268 legHashes.erase(legHash);
269 legHashes.insert(
key);
272 somethingChanged =
true;
276 if (somethingChanged) {
280 if (!somethingChanged or ++emergencyBreak == 500) {
281 if (emergencyBreak == 500) {
295 std::set<SG::sgkey_t> allFeatureHashes;
296 for (
const SG::SGKeySet& legHashes : legFeatureHashes) {
297 allFeatureHashes.insert(legHashes.begin(), legHashes.end());
299 for (
const SG::sgkey_t featureHash : allFeatureHashes) {
300 size_t legsWithHash = 0;
301 size_t keepLegIndex = 0;
303 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
304 if (legFeatureHashes.at(legIndex).count(featureHash) == 0) {
308 const int32_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
309 const int32_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
310 const int32_t safetyMargin = currentMultiplicity - requiredMultiplicity;
311 if (safetyMargin < keepLegMargin) {
312 keepLegMargin = safetyMargin;
313 keepLegIndex = legIndex;
316 if (legsWithHash == 1) {
320 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
321 if (legIndex == keepLegIndex) {
322 ATH_MSG_DEBUG(
"Keeping feature hash '" << featureHash <<
"', on leg " << legIndex <<
". This leg can least afford to lose it. "
323 <<
"Leg has " << legFeatureHashes.at(legIndex).size()
324 <<
" features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
327 if (legFeatureHashes.at(legIndex).erase(featureHash)) {
328 ATH_MSG_DEBUG(
"Removed duplicate feature hash '" << featureHash <<
"', from leg " << legIndex <<
". Leg now has " << legFeatureHashes.at(legIndex).size()
329 <<
" remaining features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
335 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
336 const size_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
337 const size_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
338 if (currentMultiplicity < requiredMultiplicity) {
339 ATH_MSG_DEBUG(
"Leg " << legIndex <<
" fails multiplicity check. Required unique features:" << requiredMultiplicity <<
", found unique features: " << currentMultiplicity);
340 overallDecision =
false;
346 ATH_MSG_DEBUG(
"Chain " << chainId << ( overallDecision ?
" is accepted" :
" is rejected") <<
" after multiplicity requirements" );
347 if ( overallDecision ==
true ) {
348 for (
auto decID: allDecisionIds) {
350 passingLegs.insert (thisChainCombMap.begin(), thisChainCombMap.end());
356 if (passingLegs.size()!=0){
367 for (
auto const& [
id,
decisions] : passingLegs) {
375 return StatusCode::SUCCESS;
◆ extractFeatureAndRoI()
For a given Decision node from a HypoAlg, extracts type-less identification data on the node's Feature and seeding ROI.
- Parameters
-
[in] | chainLegId | The HLT::Identifer of the chain (leg) we're extracting features for. |
[in] | EL | The Decision node from the HypoAlg, expected to have a "feature" link attached to it. Expected to be able to locate a "initialRoI" in its history if RequireUniqueROI=True. |
[out] | featureKey | Type-less SG Key hash of the collection hosting the Decision node's feature . |
[out] | featureIndex | Index inside the featureKey collection. |
[out] | roiKey | Type-less SG Key hash of the collection hosting the Decision node's initial ROI collection. |
[out] | roiIndex | Index inside the roiKey collection. |
[out] | roiIsFullscan | Flag indicating if the located initial ROI has the FullScan flag enabled. Triggers special behaviour allowing the ROI to satisfy arbitrary multiplicities in an arbitrary number of legs. |
[out] | objectRequestsNoMultiplicityCheck | Flag indicating of the DecisionObject requested not be included in the multiplicity computation. Triggers special behaviour allowing the DecisionObject to satisfy arbitrary multiplicities in an arbitrary number of legs. |
[in,out] | priorFeaturesMap | Data structure collating for a given feature (key) what the prior features were integrated over all previous steps (value set). |
Definition at line 379 of file ComboHypo.cxx.
398 ATH_MSG_ERROR(
"We are only expecting to search from a single navigation node in extractFeatureAndRoI");
399 return StatusCode::FAILURE;
403 std::vector<SG::sgkey_t>
keys;
404 std::vector<uint32_t> clids;
405 std::vector<Decision::index_type> indicies;
406 std::vector<const Decision*> sources;
408 std::set<const Decision*> fullyExploredFrom;
413 const Decision* featureSource =
nullptr;
416 featureKey =
keys.at(0);
417 featureIndex = indicies.at(0);
418 featureSource = sources.at(0);
421 objectRequestsNoMultiplicityCheck = (featureSource and featureSource->
hasDetail<int32_t>(
"noCombo") and featureSource->
getDetail<int32_t>(
"noCombo") == 1);
423 if (foundFeature and priorFeaturesMap.count(featureKey + featureIndex) == 0) {
424 const std::string* key_str =
evtStore()->keyToString(featureKey);
425 ATH_MSG_DEBUG(
"Note: Will use feature hash " << featureKey + featureIndex <<
", for " << (key_str ? *key_str :
"UNKNOWN") <<
" index=" << featureIndex);
428 if (
keys.size() > 1) {
429 for (
size_t i = 1;
i <
keys.size(); ++
i) {
431 if (featureKey + featureIndex ==
keys.at(
i) + indicies.at(
i)) {
434 priorFeaturesMap[featureKey + featureIndex].insert(
keys.at(
i) + indicies.at(
i));
437 priorFeaturesMap.insert( std::pair<
uint32_t, std::set<uint32_t>>(featureKey + featureIndex, std::set<uint32_t>()) );
448 roiIsFullscan = (*(roiEL))->isFullscan();
450 const std::string* roi_str =
evtStore()->keyToString(roiKey);
451 ATH_MSG_DEBUG(
"Note: Located fallback-ROI, if used this will have feature hash =" << roiKey + roiIndex <<
", for " << (roi_str ? *roi_str :
"UNKNOWN") <<
" index=" << roiIndex);
455 if (!foundFeature && !foundROI) {
456 ATH_MSG_WARNING(
"Did not find the feature or initialRoI for " << dEL.dataID() <<
" index " << dEL.index());
459 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()
const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ fillDecisionsMap()
iterates over all inputs, associating inputs to legs
Definition at line 463 of file ComboHypo.cxx.
464 for (
size_t inputContainerIndex = 0; inputContainerIndex <
m_inputs.size(); ++inputContainerIndex ) {
466 if ( !inputHandle.isValid() ) {
467 ATH_MSG_ERROR(
"No input ReadHandle from " << inputHandle.key() );
468 return StatusCode::FAILURE;
470 ATH_MSG_DEBUG(
"-- Found ReadHandle from " << inputHandle.key() <<
" with "<< inputHandle->size() <<
" elements:" );
471 for (
const Decision* decision : *inputHandle ) {
472 ATH_MSG_DEBUG(
"-- -- Input Decision #"<< decision->index() <<
" with "<<
decisionIDs( decision ).
size() <<
" active IDs. Populating the multiplicity map:" );
475 int32_t chainLeg = 0;
484 ATH_MSG_VERBOSE(
"-- -- -- Ignoring the DecsionID " <<
id <<
" on leg " << chainLeg <<
" as it does not correspond to any of the " <<
m_legToInputCollectionMap.size() <<
" chains this Alg is processing.");
489 const std::vector<int>& legToInputCollectionIndex =
it->second;
490 const size_t requiredInputContainerIndex =
static_cast<size_t>(legToInputCollectionIndex.at(chainLeg));
491 if (requiredInputContainerIndex != inputContainerIndex) {
492 ATH_MSG_VERBOSE(
"-- -- -- Ignoring the DecisionID " <<
id <<
" on leg " << chainLeg <<
" as we are only permitted to accept passing objects on leg #" << chainLeg <<
" of " << chainID.
name()
493 <<
" which come from input collection index " << requiredInputContainerIndex <<
" (which is " <<
m_inputs.at(requiredInputContainerIndex).key() <<
")"
494 <<
". Not the current index " << inputContainerIndex <<
" (which is " <<
m_inputs.at(inputContainerIndex).key() <<
")");
507 for (
const auto&
entry: dmap){
509 const std::vector<ElementLink<DecisionContainer>>&
decisions =
entry.second;
512 ATH_MSG_DEBUG(
" Decision: (ContainerKey:"<<
d.dataID()<<
", DecisionElementIndex:"<<
d.index()<<
")");
519 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ hypoTools() [1/2]
◆ hypoTools() [2/2]
◆ initialize()
StatusCode ComboHypo::initialize |
( |
| ) |
|
|
overridevirtual |
Reimplemented in TrigMultiTrkComboHypo, TrigBmumuxComboHypo, and TrigBmuxComboHypo.
Definition at line 22 of file ComboHypo.cxx.
38 [](
const Combo::MultiplicityReqMap::value_type&
a,
const Combo::MultiplicityReqMap::value_type&
b ){
39 return a.second.size() < b.second.size();
42 const size_t maxMult = maxMultEl->second.size();
52 <<
" multiplicities: " <<
m.second
59 bool errorOccured =
false;
67 }
else if (
value.size() != it_input->second.size()) {
68 ATH_MSG_ERROR(
"Inconsistent configuration vector sizes for " <<
key <<
" Multiplicities Required size:" <<
value.size()
69 <<
", Input Collections Index size:" << it_input->second.size());
73 if (
value.size() > maxMult ) {
76 <<
" configured with input multiplicity " <<
value.size() <<
" like this: " <<
value
77 <<
" which is lower than for this chain " << maxMultEl->first <<
" " << maxMult);
82 return ( errorOccured ? StatusCode::FAILURE : 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ legToInputCollectionMap()
◆ 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.
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
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 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
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 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 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.
◆ triggerMultiplicityMap()
◆ updateVHKA()
◆ m_checkMultiplicityMap
Gaudi::Property<bool> ComboHypo::m_checkMultiplicityMap |
|
private |
Initial value:{ this, "CheckMultiplicityMap", true,
"Perform a consistency check of the MultiplicitiesMap"}
Definition at line 64 of file ComboHypo.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_hypoTools
◆ m_inputs
◆ m_legToInputCollectionMap
Gaudi::Property< Combo::LegMap > ComboHypo::m_legToInputCollectionMap |
|
private |
Initial value:{this, "LegToInputCollectionMap", {},
"Map from the chain name to the per-leg index in this algorithm's ReadHandleKeyArray which should be used as the source of incoming Decision Objects on the leg.",
"mapMergeNoReplace<std::string, std::vector<int>>"}
Definition at line 60 of file ComboHypo.h.
◆ m_multiplicitiesReqMap
Initial value:{this, "MultiplicitiesMap", {},
"Map from the chain name to multiplicities required at each input",
"mapMergeNoReplace<std::string, std::vector<int>>"}
Definition at line 56 of file ComboHypo.h.
◆ m_outputs
◆ m_requireUniqueROI
Gaudi::Property<bool> ComboHypo::m_requireUniqueROI |
|
private |
Initial value:{this, "RequireUniqueROI", false,
"Require each Feature in each leg of the combination to come from a unique L1 seeding ROI."}
Definition at line 53 of file ComboHypo.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< Combo::MultiplicityReqMap > m_multiplicitiesReqMap
StatusCode extractFeatureAndRoI(const HLT::Identifier &chainLegId, const ElementLink< TrigCompositeUtils::DecisionContainer > &EL, SG::sgkey_t &featureKey, TrigCompositeUtils::Decision::index_type &featureIndex, SG::sgkey_t &roiKey, TrigCompositeUtils::Decision::index_type &roiIndex, bool &roiFullscan, bool &objectRequestsNoMultiplicityCheck, SG::SGKeyMap< std::set< uint32_t >> &priorFeaturesMap) const
For a given Decision node from a HypoAlg, extracts type-less identification data on the node's Featur...
StatusCode copyDecisions(const Combo::LegDecisionsMap &passingLegs, const EventContext &context) const
iterates over the inputs and for every object (no filtering) crates output object linked to input mov...
void recursiveGetDecisions(const Decision *start, NavGraph &navGraph, const DecisionIDContainer &ids, const bool enforceDecisionOnStartNode)
Search back in time from "node" and locate all paths back through Decision objects for a given chain.
std::string find(const std::string &s)
return a remapped string
TrigCompositeUtils::DecisionID numeric() const
numeric ID
StatusCode fillDecisionsMap(Combo::LegDecisionsMap &dmap, const EventContext &context) const
iterates over all inputs, associating inputs to legs
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::vector< NavGraphNode * > & finalNodes() const
Get all final nodes.
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)
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.
DecisionIDContainer passedDecisionIDs(const Decision *d, const T &required)
return DecisionIDs in Decision object that match the required ones
bool msgLvl(const MSG::Level lvl) const
bool hasDetail(const std::string &name) const
Check if a given type of detail is available.
const std::string & comboHypoAlgNodeName()
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
std::map< TrigCompositeUtils::DecisionID, std::vector< ElementLink< TrigCompositeUtils::DecisionContainer > > > LegDecisionsMap
LegDecisionsMap For a given chain leg key, this map holds all Decision Objects which are active on th...
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
const std::string & initialRoIString()
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
bool typelessFindLinks(const Decision *start, const std::string &linkName, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< Decision::index_type > &indexVec, std::vector< const Decision * > &sourceVec, const unsigned int behaviour, std::set< const Decision * > *fullyExploredFrom)
search back the TC links for the object of type T linked to the one of TC (recursively) Returns the l...
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
ToolHandleArray< ComboHypoToolBase > m_hypoTools
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_outputs
Class used to describe composite objects in the HLT.
size_t index() const
Return the index of this element within its container.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const std::string & featureString()
Gaudi::Property< Combo::LegMap > m_legToInputCollectionMap
std::unordered_set< sgkey_t > SGKeySet
A set of sgkey_t values.
std::string to_string(const DetectorType &type)
virtual StatusCode sysInitialize() override
Override sysInitialize.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_inputs
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.
int32_t getIndexFromLeg(const HLT::Identifier &legIdentifier)
Extract the numeric index of a leg identifier.
std::set< DecisionID > DecisionIDContainer
#define ATH_MSG_WARNING(x)
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
std::string name() const
reports human redable name if it is enabled or, empty string
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
bool getDetail(const std::string &name, TYPE &value) const
Get an TYPE detail from the object.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
constexpr bool sgkeyEqual(const sgkey_t a, const sgkey_t b)
Compare two sgkeys for equality.
bool typelessFindLink(const Decision *start, const std::string &linkName, sgkey_t &key, uint32_t &clid, Decision::index_type &index, const Decision *&source, const bool suppressMultipleLinksWarning)
Perform a recursive search for ElementLinks of any time and name 'linkName', starting from Decision o...
Gaudi::Property< bool > m_checkMultiplicityMap