ATLAS Offline Software
Loading...
Searching...
No Matches
ExpressionParsing::DecorHelper< T_Cont, T_src > Class Template Reference

Auxiliary class to handle decorator handle based xAOD object content access. More...

#include <xAODAccessor.h>

Collaboration diagram for ExpressionParsing::DecorHelper< T_Cont, T_src >:

Classes

class  Kit
 Auxiliary class to create the corresponding auxiliary helper object. More...

Public Member Functions

 DecorHelper (const EventContext &ctx, const SG::ReadDecorHandleKey< T_Cont > &key, SG::ReadHandle< T_Cont > &handle)
std::size_t size (const T_Cont &cont) const
T_src get (const T_Cont &cont) const
 Get the scalar provided by the container.
T_src get (const T_Cont &cont, std::size_t idx) const
 Get the specified element of the vector provided by the container.

Private Attributes

SG::ReadDecorHandle< T_Cont, T_src > m_decorHandle
const void * m_data

Detailed Description

template<class T_Cont, typename T_src>
class ExpressionParsing::DecorHelper< T_Cont, T_src >

Auxiliary class to handle decorator handle based xAOD object content access.

Definition at line 70 of file xAODAccessor.h.

Constructor & Destructor Documentation

◆ DecorHelper()

template<class T_Cont, typename T_src>
ExpressionParsing::DecorHelper< T_Cont, T_src >::DecorHelper ( const EventContext & ctx,
const SG::ReadDecorHandleKey< T_Cont > & key,
SG::ReadHandle< T_Cont > & handle )
inline

Definition at line 72 of file xAODAccessor.h.

75 {
76 if (!m_decorHandle.isValid()) {
78 }
79 }
static void throwInvalidHandle(const std::string &key)
Auxiliary class to handle decorator handle based xAOD object content access.
SG::ReadDecorHandle< T_Cont, T_src > m_decorHandle
const void * getDataArray(SG::auxid_t auxid) const
Return a const pointer to the start of an aux data vector.
const SG::AuxVectorData * getVectorData(const T &cont)

Member Function Documentation

◆ get() [1/2]

template<class T_Cont, typename T_src>
T_src ExpressionParsing::DecorHelper< T_Cont, T_src >::get ( const T_Cont & cont) const
inline

Get the scalar provided by the container.

Definition at line 86 of file xAODAccessor.h.

86 {
87 return m_decorHandle( cont );
88 }

◆ get() [2/2]

template<class T_Cont, typename T_src>
T_src ExpressionParsing::DecorHelper< T_Cont, T_src >::get ( const T_Cont & cont,
std::size_t idx ) const
inline

Get the specified element of the vector provided by the container.

Definition at line 91 of file xAODAccessor.h.

91 {
92 (void) cont;
94 }
static reference_type index(void *ptr, size_t ndx)
Look up an element in the container by index.

◆ size()

template<class T_Cont, typename T_src>
std::size_t ExpressionParsing::DecorHelper< T_Cont, T_src >::size ( const T_Cont & cont) const
inline

Definition at line 81 of file xAODAccessor.h.

81 {
82 return getContainerSize(cont);
83 }

Member Data Documentation

◆ m_data

template<class T_Cont, typename T_src>
const void* ExpressionParsing::DecorHelper< T_Cont, T_src >::m_data
private

Definition at line 120 of file xAODAccessor.h.

◆ m_decorHandle

template<class T_Cont, typename T_src>
SG::ReadDecorHandle<T_Cont,T_src> ExpressionParsing::DecorHelper< T_Cont, T_src >::m_decorHandle
private

Definition at line 119 of file xAODAccessor.h.


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