CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Private Member Functions
edm::soa::Table< Args >::CtrFillerFromAOS Struct Reference

Static Public Member Functions

template<typename T >
static size_t fill (std::array< void *, sizeof...(Args)> &oValues, T const &iContainer)
 
template<typename T , typename F >
static size_t fillUsingFiller (F &iFiller, std::array< void *, sizeof...(Args)> &oValues, T const &iContainer)
 

Static Private Member Functions

template<int I, typename E >
static void fillElement (E const &iItem, size_t iIndex, std::array< void *, sizeof...(Args)> &oValues)
 
template<int I, typename E , typename F >
static void fillElementUsingFiller (F &iFiller, E const &iItem, size_t iIndex, std::array< void *, sizeof...(Args)> &oValues)
 
template<int I>
static void presize (std::array< void *, sizeof...(Args)> &oValues, size_t iSize)
 

Detailed Description

template<typename... Args>
struct edm::soa::Table< Args >::CtrFillerFromAOS

Definition at line 295 of file Table.h.

Member Function Documentation

template<typename... Args>
template<typename T >
static size_t edm::soa::Table< Args >::CtrFillerFromAOS::fill ( std::array< void *, sizeof...(Args)> &  oValues,
T const &  iContainer 
)
inlinestatic

Definition at line 297 of file Table.h.

Referenced by edm::soa::Table< Args >::Table().

297  {
298  presize<0>(oValues, iContainer.size());
299  unsigned index = 0;
300  for (auto&& item : iContainer) {
301  fillElement<0>(item, index, oValues);
302  ++index;
303  }
304  return iContainer.size();
305  }
template<typename... Args>
template<int I, typename E >
static void edm::soa::Table< Args >::CtrFillerFromAOS::fillElement ( E const &  iItem,
size_t  iIndex,
std::array< void *, sizeof...(Args)> &  oValues 
)
inlinestaticprivate

Definition at line 330 of file Table.h.

References constexpr, and Exhume::I.

330  {
331  if constexpr (I < sizeof...(Args)) {
332  using Layout = std::tuple<Args...>;
333  using ColumnType = typename std::tuple_element<I, Layout>::type;
334  using Type = typename ColumnType::type;
335  Type* pElement = static_cast<Type*>(oValues[I]) + iIndex;
336  *pElement = value_for_column(iItem, static_cast<ColumnType*>(nullptr));
337  fillElement<I + 1>(iItem, iIndex, oValues);
338  }
339  }
type
Definition: HCALResponse.h:21
std::tuple< Args... > Layout
Definition: Table.h:140
const std::complex< double > I
Definition: I.h:8
#define constexpr
template<typename... Args>
template<int I, typename E , typename F >
static void edm::soa::Table< Args >::CtrFillerFromAOS::fillElementUsingFiller ( F iFiller,
E const &  iItem,
size_t  iIndex,
std::array< void *, sizeof...(Args)> &  oValues 
)
inlinestaticprivate

Definition at line 342 of file Table.h.

References constexpr, and Exhume::I.

345  {
346  if constexpr (I < sizeof...(Args)) {
347  using Layout = std::tuple<Args...>;
348  using ColumnType = typename std::tuple_element<I, Layout>::type;
349  using Type = typename ColumnType::type;
350  Type* pElement = static_cast<Type*>(oValues[I]) + iIndex;
351  *pElement = iFiller.value(iItem, static_cast<ColumnType*>(nullptr));
352  fillElementUsingFiller<I + 1>(iFiller, iItem, iIndex, oValues);
353  }
354  }
type
Definition: HCALResponse.h:21
std::tuple< Args... > Layout
Definition: Table.h:140
const std::complex< double > I
Definition: I.h:8
#define constexpr
template<typename... Args>
template<typename T , typename F >
static size_t edm::soa::Table< Args >::CtrFillerFromAOS::fillUsingFiller ( F iFiller,
std::array< void *, sizeof...(Args)> &  oValues,
T const &  iContainer 
)
inlinestatic

Definition at line 308 of file Table.h.

Referenced by edm::soa::Table< Args >::Table().

308  {
309  presize<0>(oValues, iContainer.size());
310  unsigned index = 0;
311  for (auto&& item : iContainer) {
312  fillElementUsingFiller<0>(iFiller, item, index, oValues);
313  ++index;
314  }
315  return iContainer.size();
316  }
template<typename... Args>
template<int I>
static void edm::soa::Table< Args >::CtrFillerFromAOS::presize ( std::array< void *, sizeof...(Args)> &  oValues,
size_t  iSize 
)
inlinestaticprivate

Definition at line 320 of file Table.h.

References constexpr, and Exhume::I.

320  {
321  if constexpr (I < sizeof...(Args)) {
322  using Layout = std::tuple<Args...>;
324  oValues[I] = new Type[iSize];
325  presize<I + 1>(oValues, iSize);
326  }
327  }
type
Definition: HCALResponse.h:21
std::tuple< Args... > Layout
Definition: Table.h:140
const std::complex< double > I
Definition: I.h:8
#define constexpr