CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
edm::soa::MutableRowView< Args > Class Template Reference

#include <RowView.h>

Public Member Functions

template<typename U >
void * columnAddress ()
 
template<typename U >
void const * columnAddress () const
 
template<typename O >
void copyValuesFrom (O const &iObj)
 
template<typename O , typename... CArgs>
void copyValuesFrom (O const &iObj, ColumnFillers< CArgs... > iFiller)
 
template<typename U >
U::typeget ()
 
template<typename U >
U::type const & get () const
 
 MutableRowView (std::array< void *, sizeof...(Args)> &iValues)
 
template<typename U >
MutableRowView< Args... > & set (typename U::type const &iValue)
 

Private Types

using Layout = std::tuple< Args... >
 

Private Member Functions

template<int I, typename O >
void copyValueFromImpl (O const &iObj)
 

Static Private Member Functions

template<int I, typename E , typename F >
static void copyValuesUsingFiller (F &iFiller, E const &iItem, std::array< void *, sizeof...(Args)> &oValues)
 

Private Attributes

std::array< void *, sizeof...(Args)> m_values
 

Detailed Description

template<typename... Args>
class edm::soa::MutableRowView< Args >

Definition at line 76 of file RowView.h.

Member Typedef Documentation

◆ Layout

template<typename... Args>
using edm::soa::MutableRowView< Args >::Layout = std::tuple<Args...>
private

Definition at line 77 of file RowView.h.

Constructor & Destructor Documentation

◆ MutableRowView()

template<typename... Args>
edm::soa::MutableRowView< Args >::MutableRowView ( std::array< void *, sizeof...(Args)> &  iValues)
inlineexplicit

Definition at line 81 of file RowView.h.

81 : m_values{iValues} {}
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78

Member Function Documentation

◆ columnAddress() [1/2]

template<typename... Args>
template<typename U >
void* edm::soa::MutableRowView< Args >::columnAddress ( )
inline

Definition at line 99 of file RowView.h.

References edm::soa::MutableRowView< Args >::m_values.

99  {
101  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
static constexpr int index
Definition: tablehelpers.h:39

◆ columnAddress() [2/2]

template<typename... Args>
template<typename U >
void const* edm::soa::MutableRowView< Args >::columnAddress ( ) const
inline

Definition at line 103 of file RowView.h.

References edm::soa::MutableRowView< Args >::m_values.

103  {
105  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
static constexpr int index
Definition: tablehelpers.h:39

◆ copyValueFromImpl()

template<typename... Args>
template<int I, typename O >
void edm::soa::MutableRowView< Args >::copyValueFromImpl ( O const &  iObj)
inlineprivate

Definition at line 118 of file RowView.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), Exhume::I, edm::soa::MutableRowView< Args >::m_values, and edm::soa::value_for_column().

118  {
119  if constexpr (I < sizeof...(Args)) {
120  using ColumnType = typename std::tuple_element<I, Layout>::type;
121  using Type = typename ColumnType::type;
122  auto ptr = static_cast<Type*>(m_values[I]);
123  *ptr = value_for_column(iObj, static_cast<ColumnType*>(nullptr));
124  copyValueFromImpl<I + 1>(iObj);
125  }
126  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
const std::complex< double > I
Definition: I.h:8
col::Eta ::type value_for_column(Object const &x, col::Eta *)

◆ copyValuesFrom() [1/2]

template<typename... Args>
template<typename O >
void edm::soa::MutableRowView< Args >::copyValuesFrom ( O const &  iObj)
inline

Definition at line 108 of file RowView.h.

108  {
109  copyValueFromImpl<0>(iObj);
110  }

◆ copyValuesFrom() [2/2]

template<typename... Args>
template<typename O , typename... CArgs>
void edm::soa::MutableRowView< Args >::copyValuesFrom ( O const &  iObj,
ColumnFillers< CArgs... >  iFiller 
)
inline

Definition at line 112 of file RowView.h.

References edm::soa::MutableRowView< Args >::m_values.

112  {
113  copyValuesUsingFiller<0>(iFiller, iObj, m_values);
114  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78

◆ copyValuesUsingFiller()

template<typename... Args>
template<int I, typename E , typename F >
static void edm::soa::MutableRowView< Args >::copyValuesUsingFiller ( F iFiller,
E const &  iItem,
std::array< void *, sizeof...(Args)> &  oValues 
)
inlinestaticprivate

Definition at line 129 of file RowView.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), Exhume::I, and mkLumiAveragedPlots::tuple.

129  {
130  if constexpr (I < sizeof...(Args)) {
131  using Layout = std::tuple<Args...>;
132  using ColumnType = typename std::tuple_element<I, Layout>::type;
133  using Type = typename ColumnType::type;
134  Type* pElement = static_cast<Type*>(oValues[I]);
135  *pElement = iFiller.value(iItem, static_cast<ColumnType*>(nullptr));
136  copyValuesUsingFiller<I + 1>(iFiller, iItem, oValues);
137  }
138  }
const std::complex< double > I
Definition: I.h:8
std::tuple< Args... > Layout
Definition: RowView.h:77

◆ get() [1/2]

template<typename... Args>
template<typename U >
U::type& edm::soa::MutableRowView< Args >::get ( )
inline

◆ get() [2/2]

template<typename... Args>
template<typename U >
U::type const& edm::soa::MutableRowView< Args >::get ( ) const
inline

◆ set()

template<typename... Args>
template<typename U >
MutableRowView<Args...>& edm::soa::MutableRowView< Args >::set ( typename U::type const &  iValue)
inline

Definition at line 93 of file RowView.h.

93  {
94  get<U>() = iValue;
95  return *this;
96  }

Member Data Documentation

◆ m_values

template<typename... Args>
std::array<void*, sizeof...(Args)> edm::soa::MutableRowView< Args >::m_values
private