ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
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. More...
 
T_src get (const T_Cont &cont, std::size_t idx) const
 Get the specified element of the vector provided by the container. More...
 

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.

73  : m_decorHandle(key, ctx),
75  {
76  if (!m_decorHandle.isValid()) {
78  }
79  }

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  }

◆ 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:
SG::AuxVectorData::getDataArray
const void * getDataArray(SG::auxid_t auxid) const
Return a const pointer to the start of an aux data vector.
SG::AuxDataTraits::index
static reference_type index(void *ptr, size_t ndx)
Look up an element in the container by index.
Definition: AuxDataTraits.h:62
ExpressionParsing::DecorHelper::m_decorHandle
SG::ReadDecorHandle< T_Cont, T_src > m_decorHandle
Definition: xAODAccessor.h:119
SG::ReadDecorHandle::auxid
SG::auxid_t auxid() const
Return the aux id for this variable.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ExpressionParsing::BaseAccessor::throwInvalidHandle
static void throwInvalidHandle(const std::string &key)
Definition: BaseAccessor.h:20
ExpressionParsing::getContainerSize
std::size_t getContainerSize(const T &cont)
Definition: PhysicsAnalysis/CommonTools/ExpressionEvaluation/src/Utils.h:73
ExpressionParsing::getVectorData
const SG::AuxVectorData * getVectorData(const T &cont)
Definition: PhysicsAnalysis/CommonTools/ExpressionEvaluation/src/Utils.h:78
ExpressionParsing::DecorHelper::m_data
const void * m_data
Definition: xAODAccessor.h:120
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37