CMS 3D CMS Logo

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

#include <TableView.h>

Public Types

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

Public Member Functions

const_iterator begin () const
 
template<typename U >
ColumnValues< typename U::typecolumn () const
 
const_iterator end () const
 
template<typename U >
U::type const & get (size_t iRow) const
 
unsigned int size () const
 
template<typename... OArgs>
 TableView (Table< OArgs... > const &iTable)
 
 TableView (unsigned int iSize, std::array< void *, sizeof...(Args)> &iArray)
 
 TableView (unsigned int iSize, std::array< void const *, sizeof...(Args)> &iArray)
 

Static Public Attributes

static constexpr const size_t kNColumns = sizeof...(Args)
 

Private Member Functions

template<typename U >
void const * columnAddress () const
 
template<int I, typename T >
void fillArray (T const &iTable, std::true_type)
 
template<int I, typename T >
void fillArray (T const &iTable, std::false_type)
 

Private Attributes

unsigned int m_size
 
std::array< void const *, sizeof...(Args)> m_values
 

Detailed Description

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

Definition at line 49 of file TableView.h.

Member Typedef Documentation

template<typename... Args>
using edm::soa::TableView< Args >::const_iterator = ConstTableItr<Args...>

Definition at line 54 of file TableView.h.

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

Definition at line 52 of file TableView.h.

Constructor & Destructor Documentation

template<typename... Args>
template<typename... OArgs>
edm::soa::TableView< Args >::TableView ( Table< OArgs... > const &  iTable)
inline

Definition at line 57 of file TableView.h.

57  :
58  m_size(iTable.size()) {
59  fillArray<0>(iTable,std::true_type{});
60  }
unsigned int m_size
Definition: TableView.h:88
template<typename... Args>
edm::soa::TableView< Args >::TableView ( unsigned int  iSize,
std::array< void *, sizeof...(Args)> &  iArray 
)
inline

Definition at line 61 of file TableView.h.

61  :
62  m_size(iSize),
63  m_values(iArray) {}
unsigned int m_size
Definition: TableView.h:88
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87
template<typename... Args>
edm::soa::TableView< Args >::TableView ( unsigned int  iSize,
std::array< void const *, sizeof...(Args)> &  iArray 
)
inline

Definition at line 65 of file TableView.h.

65  :
66  m_size(iSize),
67  m_values(iArray) {}
unsigned int m_size
Definition: TableView.h:88
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87

Member Function Documentation

template<typename... Args>
const_iterator edm::soa::TableView< Args >::begin ( void  ) const
inline

Definition at line 83 of file TableView.h.

References edm::soa::TableView< Args >::m_values.

83 { return const_iterator{m_values}; }
ConstTableItr< Args... > const_iterator
Definition: TableView.h:54
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87
template<typename... Args>
template<typename U >
ColumnValues<typename U::type> edm::soa::TableView< Args >::column ( ) const
inline

Definition at line 79 of file TableView.h.

References edm::soa::TableView< Args >::m_size.

79  {
80  return ColumnValues<typename U::type>{static_cast<typename U::type const*>(columnAddress<U>()), m_size};
81  }
type
Definition: HCALResponse.h:21
unsigned int m_size
Definition: TableView.h:88
template<typename... Args>
template<typename U >
void const* edm::soa::TableView< Args >::columnAddress ( ) const
inlineprivate

Definition at line 91 of file TableView.h.

References edm::soa::TableView< Args >::m_values.

91  {
93  }
static constexpr int index
Definition: tablehelpers.h:39
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87
template<typename... Args>
const_iterator edm::soa::TableView< Args >::end ( void  ) const
inline

Definition at line 84 of file TableView.h.

References edm::soa::TableView< Args >::m_values, and edm::soa::TableView< Args >::size().

84 { return const_iterator{m_values,size()}; }
unsigned int size() const
Definition: TableView.h:69
ConstTableItr< Args... > const_iterator
Definition: TableView.h:54
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87
template<typename... Args>
template<int I, typename T >
void edm::soa::TableView< Args >::fillArray ( T const &  iTable,
std::true_type   
)
inlineprivate

Definition at line 96 of file TableView.h.

References Exhume::I, and edm::soa::TableView< Args >::m_values.

96  {
97  using ElementType = typename std::tuple_element<I, Layout>::type;
98  m_values[I] = iTable.columnAddressWorkaround(static_cast<ElementType const*>(nullptr));
99  fillArray<I+1>(iTable, std::conditional_t<I+1<sizeof...(Args), std::true_type, std::false_type>{});
100  }
type
Definition: HCALResponse.h:21
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:87
const std::complex< double > I
Definition: I.h:8
template<typename... Args>
template<int I, typename T >
void edm::soa::TableView< Args >::fillArray ( T const &  iTable,
std::false_type   
)
inlineprivate

Definition at line 102 of file TableView.h.

102 {}
template<typename... Args>
template<typename U >
U::type const& edm::soa::TableView< Args >::get ( size_t  iRow) const
inline
template<typename... Args>
unsigned int edm::soa::TableView< Args >::size ( void  ) const
inline

Member Data Documentation

template<typename... Args>
constexpr const size_t edm::soa::TableView< Args >::kNColumns = sizeof...(Args)
static

Definition at line 53 of file TableView.h.

template<typename... Args>
unsigned int edm::soa::TableView< Args >::m_size
private
template<typename... Args>
std::array<void const*, sizeof...(Args)> edm::soa::TableView< Args >::m_values
private