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 , typename RET >
auto callFiller (ELEMENT &&iEl, RET *, std::true_type) -> decltype(std::get< I >(m_fillers).m_f(iEl))
 
template<int I, typename ELEMENT , typename RET >
RET callFiller (ELEMENT &&iEl, RET *, std::false_type)
 
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type tryValue (ELEMENT &&iEl, COLUMN *, std::true_type, std::true_type)
 
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type tryValue (ELEMENT &&iEl, COLUMN *, std::false_type, std::true_type)
 
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type tryValue (ELEMENT &&iEl, COLUMN *, std::true_type, std::false_type)
 
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type tryValue (ELEMENT &&iEl, COLUMN *, std::false_type, std::false_type)
 

Private Attributes

Layout m_fillers
 

Detailed Description

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

Definition at line 44 of file ColumnFillers.h.

Member Typedef Documentation

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

Definition at line 45 of file ColumnFillers.h.

Constructor & Destructor Documentation

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

Definition at line 89 of file ColumnFillers.h.

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

Member Function Documentation

template<typename... Args>
template<int I, typename ELEMENT , typename RET >
auto edm::soa::ColumnFillers< Args >::callFiller ( ELEMENT &&  iEl,
RET *  ,
std::true_type   
) -> decltype(std::get<I>(m_fillers).m_f(iEl))
inlineprivate

Definition at line 49 of file ColumnFillers.h.

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

49  {
50  return std::get<I>(m_fillers).m_f(iEl);
51  }
template<typename... Args>
template<int I, typename ELEMENT , typename RET >
RET edm::soa::ColumnFillers< Args >::callFiller ( ELEMENT &&  iEl,
RET *  ,
std::false_type   
)
inlineprivate

Definition at line 54 of file ColumnFillers.h.

54  {
55  return RET{};
56  }
template<typename... Args>
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::tryValue ( ELEMENT &&  iEl,
COLUMN *  ,
std::true_type  ,
std::true_type   
)
inlineprivate

Definition at line 59 of file ColumnFillers.h.

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

59  {
60  using Pair = typename std::tuple_element<I,Layout>::type;
61  using COL = typename Pair::Column_type;
63  return callFiller<I>(iEl,
64  static_cast<typename COLUMN::type*>(nullptr),
65  std::conditional_t<std::is_same<COL,COLUMN>::value,
66  std::true_type, std::false_type>{});
67  }
68  return tryValue<I+1>(iEl, static_cast<COLUMN*>(nullptr),
69  std::conditional_t<I+1 == sizeof...(Args),
70  std::false_type, std::true_type>{},
72  std::false_type, std::true_type>{});
73  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
template<typename... Args>
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::tryValue ( ELEMENT &&  iEl,
COLUMN *  ,
std::false_type  ,
std::true_type   
)
inlineprivate

Definition at line 76 of file ColumnFillers.h.

76  {
77  return value_for_column(iEl,static_cast<COLUMN*>(nullptr));
78  }
template<typename... Args>
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::tryValue ( ELEMENT &&  iEl,
COLUMN *  ,
std::true_type  ,
std::false_type   
)
inlineprivate

Definition at line 80 of file ColumnFillers.h.

80  {
81  return typename COLUMN::type{};
82  }
type
Definition: HCALResponse.h:21
template<typename... Args>
template<int I, typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::tryValue ( ELEMENT &&  iEl,
COLUMN *  ,
std::false_type  ,
std::false_type   
)
inlineprivate

Definition at line 84 of file ColumnFillers.h.

84  {
85  return typename COLUMN::type{};
86  }
type
Definition: HCALResponse.h:21
template<typename... Args>
template<typename ELEMENT , typename COLUMN >
COLUMN::type edm::soa::ColumnFillers< Args >::value ( ELEMENT &&  iEl,
COLUMN *   
)
inline

Definition at line 92 of file ColumnFillers.h.

Referenced by average.Average::average().

92  {
93  return tryValue<0>(iEl, static_cast<COLUMN*>(nullptr), std::true_type{},std::true_type{});
94  }

Member Data Documentation

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

Definition at line 46 of file ColumnFillers.h.

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