ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Trig::Combination Class Reference

#include <Combination.h>

Collaboration diagram for Trig::Combination:

Public Types

template<typename CONTAINER >
using ELEMENT_OF = typename CONTAINER::base_value_type
 

Public Member Functions

 Combination ()=default
 
 Combination (const std::vector< HLT::TriggerElement * > &tes, const Trig::CacheGlobalMemory *cgm)
 normal constructor More...
 
std::vector< Trig::TypelessFeaturetypelessGet (HLT::class_id_type clid, const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 Typeless version of get method. More...
 
template<class T >
std::vector< Trig::Feature< T > > get (const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 Method used to get objects. More...
 
std::vector< Trig::Feature< xAOD::IParticle > > getIParticle (HLT::class_id_type clid, const std::string &container_name, const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 Experimental flattened get for IParticle types. More...
 
template<typename CONTAINER >
std::vector< Feature< ELEMENT_OF< CONTAINER > > > elementFeature (const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 get element type features (those attached to TE as single instance of a trigger type) More...
 
template<typename CONTAINER >
std::vector< Feature< CONTAINER > > containerFeature (const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 get container type features (those attached to TE as container of a trigger type) More...
 
template<typename CONTAINER >
std::vector< Feature< ELEMENT_OF< CONTAINER > > > flattenedContainerFeature (const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
 get container type features flattened as Features (those attached to TE as container of a trigger type) More...
 
unsigned int size () const
 Size of combination. More...
 
bool active () const
 Returns the state of the combination i.e. More...
 
const std::vector< const HLT::TriggerElement * > & tes () const
 trigger elements in the combination can be used directly with ancestor method More...
 
template<class T >
void collect (const HLT::TriggerElement *te, std::vector< Trig::Feature< T > > &data, const std::string &label, unsigned int condition, const std::string &teName) const
 Method used to get objects. More...
 
bool operator== (const Combination &other) const
 
bool operator< (const Combination &other) const
 

Private Member Functions

const HLT::TrigNavStructurenavigation () const
 

Private Attributes

std::vector< const HLT::TriggerElement * > m_tes
 
const Trig::CacheGlobalMemorym_cgm {nullptr}
 

Friends

class ::HltNaviChecker
 

Detailed Description

is a connector between chains and object It store single combination of trigger elements. Thanks to templates methods get() it is able to invoke features retrieval and return actual objects (wrapped into Feature class).

Warning
It only looks simple.

Definition at line 54 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

Member Typedef Documentation

◆ ELEMENT_OF

template<typename CONTAINER >
using Trig::Combination::ELEMENT_OF = typename CONTAINER::base_value_type

Constructor & Destructor Documentation

◆ Combination() [1/2]

Trig::Combination::Combination ( )
default

◆ Combination() [2/2]

Combination::Combination ( const std::vector< HLT::TriggerElement * > &  tes,
const Trig::CacheGlobalMemory cgm 
)

normal constructor

Definition at line 21 of file Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx.

22  : m_cgm(cgm)
23 {
24  m_tes.insert(m_tes.end(), tes.begin(), tes.end());
25 }

Member Function Documentation

◆ active()

bool Combination::active ( ) const

Returns the state of the combination i.e.

if all TEs are passed by respective hypothesis. This method can be used to differentiate between passed/not-passed objects

Definition at line 28 of file Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx.

28  {
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 }

◆ collect()

template<class T >
void Trig::Combination::collect ( const HLT::TriggerElement te,
std::vector< Trig::Feature< T > > &  data,
const std::string &  label,
unsigned int  condition,
const std::string &  teName 
) const

Method used to get objects.

This is called for each TE in the combination

◆ containerFeature()

template<typename CONTAINER >
std::vector<Feature<CONTAINER> > Trig::Combination::containerFeature ( const std::string &  label = "",
unsigned int  condition = TrigDefs::Physics,
const std::string &  teName = "" 
) const
inline

get container type features (those attached to TE as container of a trigger type)

Definition at line 112 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

112  {
114  return FeatureAccessImpl::typedGet<CONTAINER,CONTAINER,CONTAINER>(features,navigation(),m_cgm->store());
115  }

◆ elementFeature()

template<typename CONTAINER >
std::vector<Feature<ELEMENT_OF<CONTAINER> > > Trig::Combination::elementFeature ( const std::string &  label = "",
unsigned int  condition = TrigDefs::Physics,
const std::string &  teName = "" 
) const
inline

get element type features (those attached to TE as single instance of a trigger type)

Definition at line 103 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

103  {
104  auto features = typelessGet(ClassID_traits<ELEMENT_OF<CONTAINER> >::ID(),label,condition,teName);
105  return FeatureAccessImpl::typedGet<ELEMENT_OF<CONTAINER>,ELEMENT_OF<CONTAINER>,CONTAINER>(features,navigation(),m_cgm->store());
106  }

◆ flattenedContainerFeature()

template<typename CONTAINER >
std::vector<Feature<ELEMENT_OF<CONTAINER> > > Trig::Combination::flattenedContainerFeature ( const std::string &  label = "",
unsigned int  condition = TrigDefs::Physics,
const std::string &  teName = "" 
) const
inline

get container type features flattened as Features (those attached to TE as container of a trigger type)

Definition at line 121 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

121  {
123  return FeatureAccessImpl::typedGet<ELEMENT_OF<CONTAINER>,CONTAINER,CONTAINER>(features,navigation(),m_cgm->store());
124  }

◆ get()

template<class T >
std::vector< Trig::Feature< T > > Combination::get ( const std::string &  label = "",
unsigned int  condition = TrigDefs::Physics,
const std::string &  teName = "" 
) const

Method used to get objects.

This is main functionality of combination class.

Parameters
labelthe keyword with which the objects were labeled in HLT algorithms (if none given most recent is returned)
conditionswitch wether to return only objects from passed RoIs (when Physics) or also from failed (alsoDeactivateTEs)
teNameto get features from TEs of specific TEs (it is to be used in combination with switch alsoDeactivateTEs or composite triggers) super-expert usecase

Definition at line 170 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

171 {
172  std::vector<Feature<T> > data;
173 
174 #if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full athena
175  for( const HLT::TriggerElement* te : m_tes )
176  FeatureAccessImpl::collect<T>(te, data, label, condition, teName, navigation());
177  for( Feature<T>& f : data ) {
178  if ( f.owned() ) {
179  m_cgm->deleteAtTheEndOfEvent( f.cptr() );
180  }
181  }
182 #else
183  std::cerr << "WARNING: Trig::Combination::get is only available in Athena proper" << std::endl;
184  (void)label;
185  (void)condition;
186  (void)teName;
187 #endif
188  return data;
189 }

◆ getIParticle()

std::vector<Trig::Feature<xAOD::IParticle> > Trig::Combination::getIParticle ( HLT::class_id_type  clid,
const std::string &  container_name,
const std::string &  label = "",
unsigned int  condition = TrigDefs::Physics,
const std::string &  teName = "" 
) const
inline

Experimental flattened get for IParticle types.

Parameters
clidmust be clid of type as stored. No flattening supported

Definition at line 91 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

91  {
92  auto features = typelessGet(clid,label,condition,teName);
93  return FeatureAccessImpl::typedGet<xAOD::IParticle,xAOD::IParticleContainer,xAOD::IParticleContainer>(features,
94  navigation(),
95  m_cgm->store(),
96  container_name);
97  }

◆ navigation()

const HLT::TrigNavStructure * Combination::navigation ( ) const
private

Definition at line 35 of file Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx.

36 {
37  return m_cgm->navigation();
38 }

◆ operator<()

bool Trig::Combination::operator< ( const Combination other) const
inline

Definition at line 152 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

152 { return m_tes < other.m_tes; }

◆ operator==()

bool Trig::Combination::operator== ( const Combination other) const
inline

Definition at line 151 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

151 { return m_tes == other.m_tes; }

◆ size()

unsigned int Trig::Combination::size ( ) const
inline

Size of combination.

Definition at line 129 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

129 { return m_tes.size(); }

◆ tes()

const std::vector<const HLT::TriggerElement*>& Trig::Combination::tes ( ) const
inline

trigger elements in the combination can be used directly with ancestor method

Definition at line 141 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h.

141 {return m_tes; }

◆ typelessGet()

std::vector< Trig::TypelessFeature > Combination::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.

Parameters
clidmust be clid of type as stored. No flattening supported

Definition at line 40 of file Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx.

40  {
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){
46  }
47  return features;
48 }

Friends And Related Function Documentation

◆ ::HltNaviChecker

friend class ::HltNaviChecker
friend

Member Data Documentation

◆ m_cgm

const Trig::CacheGlobalMemory* Trig::Combination::m_cgm {nullptr}
private

◆ m_tes

std::vector<const HLT::TriggerElement*> Trig::Combination::m_tes
private

The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Trig::Combination::m_cgm
const Trig::CacheGlobalMemory * m_cgm
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:164
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
Trig::CacheGlobalMemory::deleteAtTheEndOfEvent
void deleteAtTheEndOfEvent(T t) const
Definition: CacheGlobalMemory.h:156
navigation2dot.teName
def teName(teid)
Definition: navigation2dot.py:59
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
Trig::Combination::navigation
const HLT::TrigNavStructure * navigation() const
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/Combination.cxx:35
Trig::CacheGlobalMemory::navigation
const HLT::TrigNavStructure * navigation() const
Definition: CacheGlobalMemory.h:104
Trig::CacheGlobalMemory::store
const asg::EventStoreType * store() const
Get the event store that the object is using.
Definition: CacheGlobalMemory.h:139
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
hist_file_dump.f
f
Definition: hist_file_dump.py:135
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
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
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