ATLAS Offline Software
Static Public Member Functions | List of all members
ExpressionParsing::VectorHelper Class Reference

Auxiliary class to handle vector like containers (AuxVectorBase). More...

#include <GenAccessor.h>

Collaboration diagram for ExpressionParsing::VectorHelper:

Static Public Member Functions

template<class T_Dest , class T_Cont , class T_Helper >
static void fillVector (T_Helper &helper, SG::ReadHandle< T_Cont > &handle, std::vector< T_Dest > &result)
 
template<class T_Dest , class T_Cont , class T_Helper >
static T_Dest getScalar (T_Helper &helper, SG::ReadHandle< T_Cont > &handle, const T_Dest &dummy)
 

Detailed Description

Auxiliary class to handle vector like containers (AuxVectorBase).

Definition at line 36 of file GenAccessor.h.

Member Function Documentation

◆ fillVector()

template<class T_Dest , class T_Cont , class T_Helper >
static void ExpressionParsing::VectorHelper::fillVector ( T_Helper &  helper,
SG::ReadHandle< T_Cont > &  handle,
std::vector< T_Dest > &  result 
)
inlinestatic

Definition at line 39 of file GenAccessor.h.

39  {
40  std::size_t n_elements=helper.size(*handle);
41  // helper.checkSize(n_elements);
42  result.reserve(n_elements);
43  for(std::size_t idx =0; idx <n_elements; ++idx) {
44  result.push_back( static_cast<T_Dest>( helper.get(*handle, idx)) );
45  }
46  }

◆ getScalar()

template<class T_Dest , class T_Cont , class T_Helper >
static T_Dest ExpressionParsing::VectorHelper::getScalar ( T_Helper &  helper,
SG::ReadHandle< T_Cont > &  handle,
const T_Dest &  dummy 
)
inlinestatic

Definition at line 48 of file GenAccessor.h.

48  {
49  (void) dummy;
50  if (getContainerSize(*handle) != 1) {
52  }
53 
54  return static_cast<T_Dest>( helper.get(*handle, 0));
55  }

The documentation for this class was generated from the following file:
get_generator_info.result
result
Definition: get_generator_info.py:21
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
python.xAODType.dummy
dummy
Definition: xAODType.py:4
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
ExpressionParsing::getContainerSize
std::size_t getContainerSize(const T &cont)
Definition: PhysicsAnalysis/CommonTools/ExpressionEvaluation/src/Utils.h:73
ExpressionParsing::BaseAccessor::throwVectorContainsNotOneElement
static void throwVectorContainsNotOneElement(const std::string &key, std::size_t n_elements)
Definition: BaseAccessor.h:25
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69