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

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

Definition at line 46 of file ColumnFillers.h.

Constructor & Destructor Documentation

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

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.

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

50  {
51  return std::get<I>(m_fillers).m_f(iEl);
52  }
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.

References constexpr, Exhume::I, and relativeConstraints::value.

55  {
56  if constexpr (I < sizeof...(Args)) {
57  using Pair = typename std::tuple_element<I, Layout>::type;
58  using COL = typename Pair::Column_type;
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  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
#define constexpr
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.

Referenced by average.Average::average().

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

Member Data Documentation

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().