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 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 90 of file ColumnFillers.h.

90 : 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 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 ELEMENT , typename RET >
RET edm::soa::ColumnFillers< Args >::callFiller ( ELEMENT &&  iEl,
RET *  ,
std::false_type   
)
inlineprivate

Definition at line 55 of file ColumnFillers.h.

55  {
56  return RET{};
57  }
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 60 of file ColumnFillers.h.

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

60  {
61  using Pair = typename std::tuple_element<I,Layout>::type;
62  using COL = typename Pair::Column_type;
64  return callFiller<I>(iEl,
65  static_cast<typename COLUMN::type*>(nullptr),
66  std::conditional_t<std::is_same<COL,COLUMN>::value,
67  std::true_type, std::false_type>{});
68  }
69  return tryValue<I+1>(iEl, static_cast<COLUMN*>(nullptr),
70  std::conditional_t<I+1 == sizeof...(Args),
71  std::false_type, std::true_type>{},
73  std::false_type, std::true_type>{});
74  }
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 77 of file ColumnFillers.h.

77  {
78  return value_for_column(iEl,static_cast<COLUMN*>(nullptr));
79  }
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 81 of file ColumnFillers.h.

81  {
82  return typename COLUMN::type{};
83  }
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 85 of file ColumnFillers.h.

85  {
86  return typename COLUMN::type{};
87  }
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 93 of file ColumnFillers.h.

Referenced by average.Average::average().

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

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