ATLAS Offline Software
Loading...
Searching...
No Matches
Trig::Feature< T > Class Template Reference

is basic vehicle of object access in TDT More...

#include <Feature.h>

Collaboration diagram for Trig::Feature< T >:

Public Types

typedef T ValueType
 $brief constructor of empty Feature
typedef T * PointerType
typedef link_or_not< T, is_storable_type< T >::value >::type link_type

Public Member Functions

 Feature ()
 Feature (const TypelessFeature &feat, const T *const feature)
 Feature (const TypelessFeature &feat, const std::shared_ptr< const T > &feature)
 Feature (Feature &&) noexcept=default
 Add move operator.
 Feature (const Feature &)=default
 Add copy operator.
Featureoperator= (const Feature &)=default
Featureoperator= (Feature &&)=default
 Feature (const T *feature, const HLT::TriggerElement *te, const std::string &label="", const bool own=false, const link_type link=link_type())
 constructor of valid Feature object
 ~Feature ()
 destructor taking care of removal
 operator const T * () const
 implicit conversion to object pointer
const T * cptr () const
 explicit conversion to object
 operator const HLT::TriggerElement * () const
 implicit conversion to TriggerElement
const HLT::TriggerElementte () const
 explicit conversion to TriggerElement
 operator const std::string () const
 implicit conversion to feature label
const std::string & label () const
 explicit conversion to feature label
bool empty () const
 test method to check if the object is truly there
bool owned () const
link_type link () const

Private Attributes

std::shared_ptr< const T > m_owning_feature
const T * m_feature
const HLT::TriggerElementm_te
std::string m_label
bool m_owned
link_type m_link

Detailed Description

template<class T>
class Trig::Feature< T >

is basic vehicle of object access in TDT

It is wrapped pointer to trigger object of given type (template argument).

It is also the point in the structure of navigation where certain objects is attached. This point is identified by HLT::TriggerElement and label of feature.

In C++ this class is very handy as it is convertible to HLT::TriggerElement or object through to it's conversion operators. This, in turn gives an access to the particular HLT hypothesis decision through the state of

See also
HLT::TriggerElement::getActiveState() .

More explicit access is also possible by cptr(), te() and label() methods. It is necessary in the python. If the access is unsuccessful for any reason i.e. actual lack of object the Feature::empty() returns true.

Definition at line 112 of file Feature.h.

Member Typedef Documentation

◆ link_type

template<class T>
typedef link_or_not<T,is_storable_type<T>::value>::type Trig::Feature< T >::link_type

Definition at line 121 of file Feature.h.

◆ PointerType

template<class T>
typedef T* Trig::Feature< T >::PointerType

Definition at line 118 of file Feature.h.

◆ ValueType

template<class T>
typedef T Trig::Feature< T >::ValueType

$brief constructor of empty Feature

Definition at line 117 of file Feature.h.

Constructor & Destructor Documentation

◆ Feature() [1/6]

template<class T>
Trig::Feature< T >::Feature ( )
inline

Definition at line 124 of file Feature.h.

125 : m_feature((const T*)0), m_te(0), m_label(""), m_owned(false) { }
is basic vehicle of object access in TDT
Definition Feature.h:112
const HLT::TriggerElement * m_te
Definition Feature.h:208
const T * m_feature
Definition Feature.h:207
std::string m_label
Definition Feature.h:209

◆ Feature() [2/6]

template<class T>
Trig::Feature< T >::Feature ( const TypelessFeature< T > & feat,
const T *const feature )
inline

Definition at line 127 of file Feature.h.

129 m_label(feat.label()), m_owned(false) { }
const HLT::TriggerElement * te() const
explicit conversion to TriggerElement
Definition Feature.h:181
const std::string & label() const
explicit conversion to feature label
Definition Feature.h:192

◆ Feature() [3/6]

template<class T>
Trig::Feature< T >::Feature ( const TypelessFeature< T > & feat,
const std::shared_ptr< const T > & feature )
inline

Definition at line 131 of file Feature.h.

134 m_te(feat.te()), m_label(feat.label()), m_owned(true) { }
std::shared_ptr< const T > m_owning_feature
Definition Feature.h:206

◆ Feature() [4/6]

template<class T>
Trig::Feature< T >::Feature ( Feature< T > && )
defaultnoexcept

Add move operator.

◆ Feature() [5/6]

template<class T>
Trig::Feature< T >::Feature ( const Feature< T > & )
default

Add copy operator.

◆ Feature() [6/6]

template<class T>
Trig::Feature< T >::Feature ( const T * feature,
const HLT::TriggerElement * te,
const std::string & label = "",
const bool own = false,
const link_type link = link_type() )
inline

constructor of valid Feature object

Definition at line 150 of file Feature.h.

152 //in Athena if we own this feature, it will be deleted by AnyTypeDeleter in CGM
153 //so we're fine by just setting the non-owning ptr.
154 }
link_type m_link
Definition Feature.h:212
link_type link() const
Definition Feature.h:202

◆ ~Feature()

template<class T>
Trig::Feature< T >::~Feature ( )
inline

destructor taking care of removal

Definition at line 160 of file Feature.h.

160 {
161 }

Member Function Documentation

◆ cptr()

template<class T>
const T * Trig::Feature< T >::cptr ( ) const
inline

explicit conversion to object

Definition at line 171 of file Feature.h.

171{ return m_feature; }

◆ empty()

template<class T>
bool Trig::Feature< T >::empty ( ) const
inline

test method to check if the object is truly there

Definition at line 197 of file Feature.h.

197{ return (!m_te || !m_feature); }

◆ label()

template<class T>
const std::string & Trig::Feature< T >::label ( ) const
inline

explicit conversion to feature label

Definition at line 192 of file Feature.h.

192{ return m_label; }

◆ link()

template<class T>
link_type Trig::Feature< T >::link ( ) const
inline

Definition at line 202 of file Feature.h.

202{return m_link;}

◆ operator const HLT::TriggerElement *()

template<class T>
Trig::Feature< T >::operator const HLT::TriggerElement * ( ) const
inline

implicit conversion to TriggerElement

Definition at line 176 of file Feature.h.

176{ return m_te; }

◆ operator const std::string()

template<class T>
Trig::Feature< T >::operator const std::string ( ) const
inline

implicit conversion to feature label

Definition at line 187 of file Feature.h.

187{ return m_label; }

◆ operator const T *()

template<class T>
Trig::Feature< T >::operator const T * ( ) const
inline

implicit conversion to object pointer

Definition at line 166 of file Feature.h.

166{ return cptr(); }
const T * cptr() const
explicit conversion to object
Definition Feature.h:171

◆ operator=() [1/2]

template<class T>
Feature & Trig::Feature< T >::operator= ( const Feature< T > & )
default

◆ operator=() [2/2]

template<class T>
Feature & Trig::Feature< T >::operator= ( Feature< T > && )
default

◆ owned()

template<class T>
bool Trig::Feature< T >::owned ( ) const
inline

Definition at line 199 of file Feature.h.

199{ return m_owned; }

◆ te()

template<class T>
const HLT::TriggerElement * Trig::Feature< T >::te ( ) const
inline

explicit conversion to TriggerElement

Definition at line 181 of file Feature.h.

181{ return m_te; }

Member Data Documentation

◆ m_feature

template<class T>
const T* Trig::Feature< T >::m_feature
private

Definition at line 207 of file Feature.h.

◆ m_label

template<class T>
std::string Trig::Feature< T >::m_label
private

Definition at line 209 of file Feature.h.

◆ m_link

template<class T>
link_type Trig::Feature< T >::m_link
private

Definition at line 212 of file Feature.h.

◆ m_owned

template<class T>
bool Trig::Feature< T >::m_owned
private

Definition at line 210 of file Feature.h.

◆ m_owning_feature

template<class T>
std::shared_ptr<const T> Trig::Feature< T >::m_owning_feature
private

Definition at line 206 of file Feature.h.

◆ m_te

template<class T>
const HLT::TriggerElement* Trig::Feature< T >::m_te
private

Definition at line 208 of file Feature.h.


The documentation for this class was generated from the following file: