CMS 3D CMS Logo

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

#include <ColumnFillers.h>

Public Member Functions

 ColumnFillers (Args... iArgs)
 
template<typename ELEMENT , typename COLUMN >
COLUMN::type value (ELEMENT &&iEl, COLUMN *)
 

Private Types

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

Private Member Functions

template<int I, typename ELEMENT >
decltype(auto) callFiller (ELEMENT &&iEl)
 
template<int I, typename COLUMN , typename ELEMENT >
COLUMN::type tryValue (ELEMENT &&iEl)
 

Private Attributes

Layout m_fillers
 

Detailed Description

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

Definition at line 45 of file ColumnFillers.h.

Member Typedef Documentation

◆ Layout

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

Definition at line 46 of file ColumnFillers.h.

Constructor & Destructor Documentation

◆ ColumnFillers()

template<typename... Args>
edm::soa::ColumnFillers< Args >::ColumnFillers ( Args...  iArgs)
inline

Definition at line 72 of file ColumnFillers.h.

72 : m_fillers(std::forward<Args>(iArgs)...) {}

Member Function Documentation

◆ callFiller()

template<typename... Args>
template<int I, typename ELEMENT >
decltype(auto) edm::soa::ColumnFillers< Args >::callFiller ( ELEMENT &&  iEl)
inlineprivate

Definition at line 50 of file ColumnFillers.h.

50  {
51  return std::get<I>(m_fillers).m_f(iEl);
52  }

References edm::soa::ColumnFillers< Args >::m_fillers.

◆ tryValue()

template<typename... Args>
template<int I, typename COLUMN , typename ELEMENT >
COLUMN::type edm::soa::ColumnFillers< Args >::tryValue ( ELEMENT &&  iEl)
inlineprivate

Definition at line 55 of file ColumnFillers.h.

55  {
56  if constexpr (I < sizeof...(Args)) {
57  using Pair = typename std::tuple_element<I, Layout>::type;
58  using COL = typename Pair::Column_type;
59  if constexpr (std::is_same<COL, COLUMN>::value) {
60  return callFiller<I>(iEl);
61  } else {
62  //try another filler to see if it matches
63  return tryValue<I + 1, COLUMN>(iEl);
64  }
65  } else {
66  //no matches so call overload function
67  return value_for_column(iEl, static_cast<COLUMN*>(nullptr));
68  }
69  }

References Exhume::I, relativeConstraints::value, and edm::soa::value_for_column().

◆ value()

template<typename... Args>
template<typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::value ( ELEMENT &&  iEl,
COLUMN *   
)
inline

Definition at line 75 of file ColumnFillers.h.

75  {
76  return tryValue<0, COLUMN>(iEl);
77  }

Referenced by average.Average::average().

Member Data Documentation

◆ m_fillers

template<typename... Args>
Layout edm::soa::ColumnFillers< Args >::m_fillers
private

Definition at line 47 of file ColumnFillers.h.

Referenced by edm::soa::ColumnFillers< Args >::callFiller().

edm::soa::ColumnFillers::m_fillers
Layout m_fillers
Definition: ColumnFillers.h:47
Exhume::I
const std::complex< double > I
Definition: I.h:8
edm::soa::value_for_column
col::Eta ::type value_for_column(Object const &x, col::Eta *)
Definition: KinematicColumns.h:24
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
relativeConstraints.value
value
Definition: relativeConstraints.py:53