ATLAS Offline Software
Functions
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  }

◆ 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 : boost::adaptors::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  }
HLT::TrigNavStructure::getAllOfType
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.
Definition: TrigNavStructure.cxx:344
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
ChainGroup_impl::allActive
bool allActive(const std::vector< TriggerElement * > &tes)
Definition: ChainGroup.cxx:673
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
Trig::CacheGlobalMemory::navigation
const HLT::TrigNavStructure * navigation() const
Definition: CacheGlobalMemory.h:104
TrigConf::HLTSignature
HLT signature configuration information.
Definition: HLTSignature.h:29
python.ConfigurableDb.conf
def conf
Definition: ConfigurableDb.py:282
Trig::Combination
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:55
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
HLT::ComboIterator
Iterator used to loop over multi-particle combinations.
Definition: ComboIterator.h:74
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:218
TrigConf::HLTTriggerElement
HLT trigger element configuration information.
Definition: HLTTriggerElement.h:26
Trig::FeatureContainer::addWithChecking
void addWithChecking(const Combination &newComb)
add new combination to the container checking for overlap
Definition: FeatureContainer.cxx:19
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69