|
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() ) {
206 overallDecision =
false;
211 const size_t nLegDecisionObjects =
it->second.size();
213 ATH_MSG_DEBUG(
"Will attempt to meet the required multiplicity of " << requiredMultiplicity <<
" for leg " << legId
214 <<
" with " << nLegDecisionObjects <<
" Decision Objects in leg " << legIndex <<
" of " << legId);
232 bool roiIsFullscan =
false;
233 bool objectRequestsNoMultiplicityCheck =
false;
234 ATH_CHECK(
extractFeatureAndRoI(
it->first, dEL, featureKey, featureIndex, roiKey, roiIndex, roiIsFullscan, objectRequestsNoMultiplicityCheck, priorFeaturesMap) );
235 const bool theFeatureIsTheROI = (
SG::sgkeyEqual (featureKey, roiKey) and featureIndex == roiIndex);
236 const bool thereIsNoFeatureYet = (featureKey == 0 and roiKey != 0);
237 if (objectRequestsNoMultiplicityCheck or (roiIsFullscan and (theFeatureIsTheROI or thereIsNoFeatureYet))) {
239 for (
size_t i = 0;
i < requiredMultiplicity; ++
i) {
240 legFeatureHashes.at( legIndex ).insert( ++passthroughCounter );
241 ATH_MSG_DEBUG(
" -- Add feature hash '" << passthroughCounter <<
"' to leg " << legIndex
242 <<
". (Note: unique passing hash generated from " << (objectRequestsNoMultiplicityCheck ?
"an object requesting NO multiplicity checks" :
"an FullScan ROI") <<
")");
245 const SG::sgkey_t uniquenessHash = (featureKey != 0 ? (featureKey + featureIndex) : (roiKey + roiIndex));
246 legFeatureHashes.at( legIndex ).insert( uniquenessHash );
247 ATH_MSG_DEBUG(
" -- Add feature hash '" << uniquenessHash <<
"' to leg " << legIndex <<
".");
252 thisChainCombMap.insert (*
it);
253 allDecisionIds.insert(requiredDecisionIDLeg);
261 size_t emergencyBreak = 0;
263 bool somethingChanged =
false;
265 for (
auto const& [
key, payloadSet] : priorFeaturesMap) {
266 if (payloadSet.count(legHash) == 1) {
267 ATH_MSG_DEBUG(
"Feature hash=" << legHash <<
" identified as a prior feature of hash=" <<
key
268 <<
", we will up-cast this hash to the later version for ComboHypo uniqueness comparison purposes.");
269 legHashes.erase(legHash);
270 legHashes.insert(
key);
273 somethingChanged =
true;
277 if (somethingChanged) {
281 if (!somethingChanged or ++emergencyBreak == 500) {
282 if (emergencyBreak == 500) {
296 std::set<SG::sgkey_t> allFeatureHashes;
297 for (
const SG::SGKeySet& legHashes : legFeatureHashes) {
298 allFeatureHashes.insert(legHashes.begin(), legHashes.end());
300 for (
const SG::sgkey_t featureHash : allFeatureHashes) {
301 size_t legsWithHash = 0;
302 size_t keepLegIndex = 0;
304 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
305 if (legFeatureHashes.at(legIndex).count(featureHash) == 0) {
309 const int32_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
310 const int32_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
311 const int32_t safetyMargin = currentMultiplicity - requiredMultiplicity;
312 if (safetyMargin < keepLegMargin) {
313 keepLegMargin = safetyMargin;
314 keepLegIndex = legIndex;
317 if (legsWithHash == 1) {
321 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
322 if (legIndex == keepLegIndex) {
323 ATH_MSG_DEBUG(
"Keeping feature hash '" << featureHash <<
"', on leg " << legIndex <<
". This leg can least afford to lose it. "
324 <<
"Leg has " << legFeatureHashes.at(legIndex).size()
325 <<
" features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
328 if (legFeatureHashes.at(legIndex).erase(featureHash)) {
329 ATH_MSG_DEBUG(
"Removed duplicate feature hash '" << featureHash <<
"', from leg " << legIndex <<
". Leg now has " << legFeatureHashes.at(legIndex).size()
330 <<
" remaining features, and a multiplicity requirement of " << multiplicityPerLeg.at(legIndex));
336 for (
size_t legIndex = 0; legIndex < multiplicityPerLeg.size(); ++legIndex) {
337 const size_t requiredMultiplicity = multiplicityPerLeg.at(legIndex);
338 const size_t currentMultiplicity = legFeatureHashes.at(legIndex).size();
339 if (currentMultiplicity < requiredMultiplicity) {
340 ATH_MSG_DEBUG(
"Leg " << legIndex <<
" fails multiplicity check. Required unique features:" << requiredMultiplicity <<
", found unique features: " << currentMultiplicity);
341 overallDecision =
false;
347 ATH_MSG_DEBUG(
"Chain " << chainId << ( overallDecision ?
" is accepted" :
" is rejected") <<
" after multiplicity requirements" );
348 if ( overallDecision ==
true ) {
349 for (
auto decID: allDecisionIds) {
351 passingLegs.insert (thisChainCombMap.begin(), thisChainCombMap.end());
357 if (passingLegs.size()!=0){
368 for (
auto const& [
id,
decisions] : passingLegs) {
376 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 380 of file ComboHypo.cxx.
399 ATH_MSG_ERROR(
"We are only expecting to search from a single navigation node in extractFeatureAndRoI");
400 return StatusCode::FAILURE;
404 std::vector<SG::sgkey_t>
keys;
405 std::vector<uint32_t> clids;
406 std::vector<Decision::index_type> indicies;
407 std::vector<const Decision*> sources;
409 std::set<const Decision*> fullyExploredFrom;
414 const Decision* featureSource =
nullptr;
417 featureKey =
keys.at(0);
418 featureIndex = indicies.at(0);
419 featureSource = sources.at(0);
422 objectRequestsNoMultiplicityCheck = (featureSource and featureSource->
hasDetail<int32_t>(
"noCombo") and featureSource->
getDetail<int32_t>(
"noCombo") == 1);
424 if (foundFeature and priorFeaturesMap.count(featureKey + featureIndex) == 0) {
425 const std::string* key_str =
evtStore()->keyToString(featureKey);
426 ATH_MSG_DEBUG(
"Note: Will use feature hash " << featureKey + featureIndex <<
", for " << (key_str ? *key_str :
"UNKNOWN") <<
" index=" << featureIndex);
429 if (
keys.size() > 1) {
430 for (
size_t i = 1;
i <
keys.size(); ++
i) {
432 if (featureKey + featureIndex ==
keys.at(
i) + indicies.at(
i)) {
435 priorFeaturesMap[featureKey + featureIndex].insert(
keys.at(
i) + indicies.at(
i));
438 priorFeaturesMap.insert( std::pair<
uint32_t, std::set<uint32_t>>(featureKey + featureIndex, std::set<uint32_t>()) );
449 roiIsFullscan = (*(roiEL))->isFullscan();
451 const std::string* roi_str =
evtStore()->keyToString(roiKey);
452 ATH_MSG_DEBUG(
"Note: Located fallback-ROI, if used this will have feature hash =" << roiKey + roiIndex <<
", for " << (roi_str ? *roi_str :
"UNKNOWN") <<
" index=" << roiIndex);
456 if (!foundFeature && !foundROI) {
457 ATH_MSG_WARNING(
"Did not find the feature or initialRoI for " << dEL.dataID() <<
" index " << dEL.index());
460 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 464 of file ComboHypo.cxx.
465 for (
size_t inputContainerIndex = 0; inputContainerIndex <
m_inputs.size(); ++inputContainerIndex ) {
467 if ( !inputHandle.isValid() ) {
468 ATH_MSG_ERROR(
"No input ReadHandle from " << inputHandle.key() );
469 return StatusCode::FAILURE;
471 ATH_MSG_DEBUG(
"-- Found ReadHandle from " << inputHandle.key() <<
" with "<< inputHandle->size() <<
" elements:" );
472 for (
const Decision* decision : *inputHandle ) {
473 ATH_MSG_DEBUG(
"-- -- Input Decision #"<< decision->index() <<
" with "<<
decisionIDs( decision ).
size() <<
" active IDs. Populating the multiplicity map:" );
476 int32_t chainLeg = 0;
485 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.");
490 const std::vector<int>& legToInputCollectionIndex =
it->second;
491 const size_t requiredInputContainerIndex =
static_cast<size_t>(legToInputCollectionIndex.at(chainLeg));
492 if (requiredInputContainerIndex != inputContainerIndex) {
493 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()
494 <<
" which come from input collection index " << requiredInputContainerIndex <<
" (which is " <<
m_inputs.at(requiredInputContainerIndex).key() <<
")"
495 <<
". Not the current index " << inputContainerIndex <<
" (which is " <<
m_inputs.at(inputContainerIndex).key() <<
")");
508 for (
const auto&
entry: dmap){
510 const std::vector<ElementLink<DecisionContainer>>&
decisions =
entry.second;
513 ATH_MSG_DEBUG(
" Decision: (ContainerKey:"<<
d.dataID()<<
", DecisionElementIndex:"<<
d.index()<<
")");
520 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, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, 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)
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