ATLAS Offline Software
Loading...
Searching...
No Matches
ChainGroup_impl Namespace Reference

Functions

bool allActive (const std::vector< TriggerElement * > &tes)
void collectCombinations (const TrigConf::HLTChain *conf, const CacheGlobalMemory &cgm, FeatureContainer &fc, unsigned int condition)

Function Documentation

◆ allActive()

bool ChainGroup_impl::allActive ( const std::vector< TriggerElement * > & tes)

Definition at line 673 of file ChainGroup.cxx.

673 {
674 for(TriggerElement* te : tes){
675 if (te->getActiveState() == false)
676 return false;
677 }
678 return true;
679 }
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...

◆ collectCombinations()

void ChainGroup_impl::collectCombinations ( const TrigConf::HLTChain * conf,
const CacheGlobalMemory & cgm,
FeatureContainer & fc,
unsigned int condition )

Definition at line 683 of file ChainGroup.cxx.

683 {
684 // go over the steps of the chain and collecte TEs combinations for each of the chain step (signature)
685 bool last_step=true;
686 const TrigConf::HLTSignature* previous_sig(0);
687 for(const TrigConf::HLTSignature* sig : std::views::reverse(conf->signatureList())) {
688 // chain without signatures
689 if (!sig) break;
690
691 // the signatures size changes from step to step, this needs custom treatement and the iteration eeds to be stoped here
692 if ( previous_sig && previous_sig->outputTEs().size() != sig->outputTEs().size() )
693 break;
694 previous_sig = sig;
695
696 std::vector<std::vector<HLT::TriggerElement*> > tes(sig->outputTEs().size()); // preallocate
697 size_t idx = 0;
698 for(const TrigConf::HLTTriggerElement* confte : sig->outputTEs() ) {
699
700 // here the condition enters; if we take only accepted objects we need to pick only the active TEs
701 cgm.navigation()->getAllOfType(confte->id(), tes[idx], condition & TrigDefs::Physics );
702 idx++;
703 }
704 HLT::ComboIterator combination(tes, cgm.navigation());
705
706 // build the combinations, sometimes a huge list
707 while (combination.isValid()) {
708 // very very tricky, if all TEs in the combination are active then it means they were already picked up by previous combinations
709 // but we can not do this for the last chain step, (we woudl be unable to pick objects whcih made trigger passing)
710 //std::cerr << "emitting new combination last_step: "<< last_step << std::endl;
711 if (!allActive(*combination) || last_step) {
712 fc.addWithChecking(Combination(*combination, &cgm));
713 }
714 ++combination;
715 }
716
717 if ( condition & TrigDefs::Physics ) // here again athe condition calls for the loop breaking
718 break;
719 else
720 last_step = false; // and go deeper
721 }
722 }
This class provides a combination very quickly.
Iterator used to loop over multi-particle combinations.
void getAllOfType(const te_id_type id, std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements if name is given.
HLT signature configuration information.
HLT trigger element configuration information.
const HLT::TrigNavStructure * navigation() const
void addWithChecking(const Combination &newComb)
add new combination to the container checking for overlap
bool allActive(const std::vector< TriggerElement * > &tes)