 |
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, 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 | 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, 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...
|
|
|
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()
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.
◆ 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.
169 allDecisionIds.insert(requiredDecisionID);
171 bool overallDecision =
true;
173 std::vector< SG::SGKeySet > legFeatureHashes;
174 legFeatureHashes.resize( multiplicityPerLeg.size() );
190 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex ) {
191 const size_t requiredMultiplicity = multiplicityPerLeg.at( legIndex );
195 if (multiplicityPerLeg.size() > 1) {
196 ATH_MSG_DEBUG(chainId <<
" has multiplicityPerLeg.size() > 1, so we use legXXX_HLT_YYY, instead of HLT_YYY");
201 ATH_MSG_DEBUG(
"Container " << legIndex <<
", looking at leg : " << legId );
203 Combo::LegDecisionsMap::const_iterator
it = dmap.find(requiredDecisionIDLeg);
204 if (
it == dmap.end() ) {
209 const size_t nLegDecisionObjects =
it->second.size();
211 ATH_MSG_DEBUG(
"Will attempt to meet the required multiplicity of " << requiredMultiplicity <<
" for leg " << legId
212 <<
" with " << nLegDecisionObjects <<
" Decision Objects in leg " << legIndex <<
" of " << legId);
230 bool roiIsFullscan =
false;
231 bool objectRequestsNoMultiplicityCheck =
false;
232 ATH_CHECK(
extractFeatureAndRoI(
it->first, dEL, featureKey, featureIndex, roiKey, roiIndex, roiIsFullscan, objectRequestsNoMultiplicityCheck, priorFeaturesMap) );
233 const bool theFeatureIsTheROI = (
SG::sgkeyEqual (featureKey, roiKey) and featureIndex == roiIndex);
234 const bool thereIsNoFeatureYet = (featureKey == 0 and roiKey != 0);
235 if (objectRequestsNoMultiplicityCheck or (roiIsFullscan and (theFeatureIsTheROI or thereIsNoFeatureYet))) {
237 for (
size_t i = 0;
i < requiredMultiplicity; ++
i) {
238 legFeatureHashes.at( legIndex ).insert( ++passthroughCounter );
239 ATH_MSG_DEBUG(
" -- Add feature hash '" << passthroughCounter <<
"' to leg " << legIndex
240 <<
". (Note: unique passing hash generated from " << (objectRequestsNoMultiplicityCheck ?
"an object requesting NO multiplicity checks" :
"an FullScan ROI") <<
")");
243 const SG::sgkey_t uniquenessHash = (featureKey != 0 ? (featureKey + featureIndex) : (roiKey + roiIndex));
244 legFeatureHashes.at( legIndex ).insert( uniquenessHash );
245 ATH_MSG_DEBUG(
" -- Add feature hash '" << uniquenessHash <<
"' to leg " << legIndex <<
".");
250 thisChainCombMap.insert (*
it);
251 allDecisionIds.insert(requiredDecisionIDLeg);
259 size_t emergencyBreak = 0;
261 bool somethingChanged =
false;
263 for (
auto const& [
key, payloadSet] : priorFeaturesMap) {
264 if (payloadSet.count(legHash) == 1) {
265 ATH_MSG_DEBUG(
"Feature hash=" << legHash <<
" identified as a prior feature of hash=" <<
key
266 <<
", we will up-cast this hash to the later version for ComboHypo uniqueness comparison purposes.");
267 legHashes.erase(legHash);
268 legHashes.insert(
key);
271 somethingChanged =
true;
275 if (somethingChanged) {
279 if (!somethingChanged or ++emergencyBreak == 500) {
280 if (emergencyBreak == 500) {
294 std::set<SG::sgkey_t> allFeatureHashes;
295 for (
const SG::SGKeySet& legHashes : legFeatureHashes) {
296 allFeatureHashes.insert(legHashes.begin(), legHashes.end());
298 for (
const SG::sgkey_t featureHash : allFeatureHashes) {
299 size_t legsWithHash = 0;
300 size_t keepLegIndex = 0;
302 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
303 if (legFeatureHashes.at(legIndex).count(featureHash) == 0) {
307 const int32_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
308 const int32_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
309 const int32_t safetyMargin = currentMultiplicity - requiredMultiplicity;
310 if (safetyMargin < keepLegMargin) {
311 keepLegMargin = safetyMargin;
312 keepLegIndex = legIndex;
315 if (legsWithHash == 1) {
319 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
320 if (legIndex == keepLegIndex) {
321 ATH_MSG_DEBUG(
"Keeping feature hash '" << featureHash <<
"', on leg " << legIndex <<
". This leg can least afford to lose it. "
322 <<
"Leg has " << legFeatureHashes.at(legIndex).size()
323 <<
" features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
326 if (legFeatureHashes.at(legIndex).erase(featureHash)) {
327 ATH_MSG_DEBUG(
"Removed duplicate feature hash '" << featureHash <<
"', from leg " << legIndex <<
". Leg now has " << legFeatureHashes.at(legIndex).size()
328 <<
" remaining features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
334 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
335 const size_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
336 const size_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
337 if (currentMultiplicity < requiredMultiplicity) {
338 ATH_MSG_DEBUG(
"Leg " << legIndex <<
" fails multiplicity check. Required unique features:" << requiredMultiplicity <<
", found unique features: " << currentMultiplicity);
339 overallDecision =
false;
345 ATH_MSG_DEBUG(
"Chain " << chainId << ( overallDecision ?
" is accepted" :
" is rejected") <<
" after multiplicity requirements" );
346 if ( overallDecision ==
true ) {
347 for (
auto decID: allDecisionIds) {
349 passingLegs.insert (thisChainCombMap.begin(), thisChainCombMap.end());
355 if (passingLegs.size()!=0){
366 for (
auto const& [
id,
decisions] : passingLegs) {
374 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 378 of file ComboHypo.cxx.
397 ATH_MSG_ERROR(
"We are only expecting to search from a single navigation node in extractFeatureAndRoI");
398 return StatusCode::FAILURE;
402 std::vector<SG::sgkey_t>
keys;
403 std::vector<uint32_t> clids;
404 std::vector<Decision::index_type> indicies;
405 std::vector<const Decision*> sources;
407 std::set<const Decision*> fullyExploredFrom;
412 const Decision* featureSource =
nullptr;
415 featureKey =
keys.at(0);
416 featureIndex = indicies.at(0);
417 featureSource = sources.at(0);
420 objectRequestsNoMultiplicityCheck = (featureSource and featureSource->
hasDetail<int32_t>(
"noCombo") and featureSource->
getDetail<int32_t>(
"noCombo") == 1);
422 if (foundFeature and priorFeaturesMap.count(featureKey + featureIndex) == 0) {
423 const std::string* key_str =
evtStore()->keyToString(featureKey);
424 ATH_MSG_DEBUG(
"Note: Will use feature hash " << featureKey + featureIndex <<
", for " << (key_str ? *key_str :
"UNKNOWN") <<
" index=" << featureIndex);
427 if (
keys.size() > 1) {
428 for (
size_t i = 1;
i <
keys.size(); ++
i) {
430 if (featureKey + featureIndex ==
keys.at(
i) + indicies.at(
i)) {
433 priorFeaturesMap[featureKey + featureIndex].insert(
keys.at(
i) + indicies.at(
i));
436 priorFeaturesMap.insert( std::pair<
uint32_t, std::set<uint32_t>>(featureKey + featureIndex, std::set<uint32_t>()) );
447 roiIsFullscan = (*(roiEL))->isFullscan();
449 const std::string* roi_str =
evtStore()->keyToString(roiKey);
450 ATH_MSG_DEBUG(
"Note: Located fallback-ROI, if used this will have feature hash =" << roiKey + roiIndex <<
", for " << (roi_str ? *roi_str :
"UNKNOWN") <<
" index=" << roiIndex);
454 if (!foundFeature && !foundROI) {
455 ATH_MSG_WARNING(
"Did not find the feature or initialRoI for " << dEL.dataID() <<
" index " << dEL.index());
458 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.
◆ fillDecisionsMap()
iterates over all inputs, associating inputs to legs
Definition at line 462 of file ComboHypo.cxx.
463 for (
size_t inputContainerIndex = 0; inputContainerIndex <
m_inputs.size(); ++inputContainerIndex ) {
465 if ( !inputHandle.isValid() ) {
466 ATH_MSG_ERROR(
"No input ReadHandle from " << inputHandle.key() );
467 return StatusCode::FAILURE;
469 ATH_MSG_DEBUG(
"-- Found ReadHandle from " << inputHandle.key() <<
" with "<< inputHandle->size() <<
" elements:" );
470 for (
const Decision* decision : *inputHandle ) {
471 ATH_MSG_DEBUG(
"-- -- Input Decision #"<< decision->index() <<
" with "<<
decisionIDs( decision ).
size() <<
" active IDs. Populating the multiplicity map:" );
480 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.");
485 const std::vector<int>& legToInputCollectionIndex =
it->second;
486 const size_t requiredInputContainerIndex =
static_cast<size_t>(legToInputCollectionIndex.at(chainLeg));
487 if (requiredInputContainerIndex != inputContainerIndex) {
488 ATH_MSG_VERBOSE(
"-- -- -- Ignoring the DecisionID " <<
id <<
" on leg " << chainLeg <<
" as we are only permitted to accept passing objects on leg #" << chainLeg <<
" of " <<
chainName
489 <<
" which come from input collection index " << requiredInputContainerIndex <<
" (which is " <<
m_inputs.at(requiredInputContainerIndex).key() <<
")"
490 <<
". Not the current index " << inputContainerIndex <<
" (which is " <<
m_inputs.at(inputContainerIndex).key() <<
")");
503 for (
const auto&
entry: dmap){
505 const std::vector<ElementLink<DecisionContainer>>&
decisions =
entry.second;
508 ATH_MSG_DEBUG(
" Decision: (ContainerKey:"<<
d.dataID()<<
", DecisionElementIndex:"<<
d.index()<<
")");
515 return StatusCode::SUCCESS;
◆ filterPassed()
◆ 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()
◆ 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()
◆ 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.
◆ 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
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_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.
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()
#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...
std::pair< std::string, int32_t > getNameAndIndexFromLeg(const std::string &name)
Extract the name and numeric index of a leg identifier.
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
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.
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
ToolHandleArray< ComboHypoToolBase > m_hypoTools
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.
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)
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.
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.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
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.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
size_type size() const noexcept
Returns the number of elements in the collection.
constexpr bool sgkeyEqual(const sgkey_t a, const sgkey_t b)
Compare two sgkeys for equality.
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
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