ATLAS Offline Software
Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**********************************************************************************
6  * @Project: TrigDecisionTool
7  * @Package: TrigDecisionTool
8  * @Class : Combination
9  *
10  * @brief simple container to hold trigger chains
11  *
12  * @author Nicolas Berger <Nicolas.Berger@cern.ch> - LAPP Annecy
13  *
14 ***********************************************************************************/
15 
19 
20 
21 Trig::Combination::Combination(const std::vector<HLT::TriggerElement*>& tes, const Trig::CacheGlobalMemory* cgm)
22  : m_cgm(cgm)
23 {
24  m_tes.insert(m_tes.end(), tes.begin(), tes.end());
25 }
26 
27 
29  for (std::vector<const HLT::TriggerElement*>::const_iterator te = m_tes.begin(); te != m_tes.end(); ++te)
30  if ( ! (*te)->getActiveState() )
31  return false;
32  return true;
33 }
34 
36 {
37  return m_cgm->navigation();
38 }
39 
40 std::vector<Trig::TypelessFeature> Trig::Combination::typelessGet(HLT::class_id_type clid, const std::string& label, unsigned int condition, const std::string & /*teName*/) const {
41  //we will query the navigation for all features of this CLID, starting from the TE's in the combination and going up the navigation recursively.
42  std::vector<Trig::TypelessFeature> features;
43 
44  for(auto& te : m_tes){
45  FeatureAccessImpl::typelessCollect(te, clid,features, label, condition, navigation());
46  }
47  return features;
48 }
49 
50 MsgStream& operator<< ( MsgStream& m, const Trig::Combination& c ) {
51  m << "TEs: " << c.size();
52  for ( std::vector<const HLT::TriggerElement*>::const_iterator i = c.tes().begin();
53  i != c.tes().end(); ++i ) {
54  m << " " << Trig::getTEName(**i);
55  }
56  return m;
57 }
Trig::getTEName
std::string getTEName(const HLT::TriggerElement &te)
converts TEid to TE name (this may not always work, it depends on the availability of config)
Definition: TDTUtilities.cxx:61
Combination.h
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
FeatureCollectStandalone.h
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
Trig::CacheGlobalMemory
Definition: CacheGlobalMemory.h:67
HLT::TrigNavStructure
Definition: TrigNavStructure.h:40
Trig::Combination::navigation
const HLT::TrigNavStructure * navigation() const
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx:35
Trig::operator<<
std::ostream & operator<<(std::ostream &, const Trig::TypelessFeature &)
Definition: FeatureCollectStandalone.cxx:18
CacheGlobalMemory.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trig::Combination
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:55
HLT::class_id_type
uint32_t class_id_type
Definition: Trigger/TrigEvent/TrigNavStructure/Root/Types.h:11
Trig::Combination::m_tes
std::vector< const HLT::TriggerElement * > m_tes
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:163
Trig::Combination::typelessGet
std::vector< Trig::TypelessFeature > typelessGet(HLT::class_id_type clid, const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
Typeless version of get method.
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx:40
Trig::Combination::tes
const std::vector< const HLT::TriggerElement * > & tes() const
trigger elements in the combination can be used directly with ancestor method
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:141
Trig::Combination::active
bool active() const
Returns the state of the combination i.e.
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx:28
python.compressB64.c
def c
Definition: compressB64.py:93
Trig::Combination::Combination
Combination()=default
Trig::FeatureAccessImpl::typelessCollect
void typelessCollect(const HLT::TriggerElement *te, HLT::class_id_type clid, std::vector< Trig::TypelessFeature > &data, const std::string &label, unsigned int condition, const HLT::TrigNavStructure *navigation)
Definition: FeatureCollectStandalone.cxx:65