ATLAS Offline Software
Loading...
Searching...
No Matches
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
21Trig::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
40std::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
50MsgStream& 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}
is a connector between chains and object It store single combination of trigger elements.
Combination()=default
const std::vector< const HLT::TriggerElement * > & tes() const
trigger elements in the combination can be used directly with ancestor method
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.
bool active() const
Returns the state of the combination i.e.
std::string label(const std::string &format, int i)
Definition label.h:19
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)
std::string getTEName(const HLT::TriggerElement &te)
converts TEid to TE name (this may not always work, it depends on the availability of config)
std::ostream & operator<<(std::ostream &, const Trig::TypelessFeature &)