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<typename T , size_t... I>
void fillArray (T const &iTable, std::index_sequence< I... >)
 

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

◆ const_iterator

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

Definition at line 53 of file TableView.h.

◆ Layout

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

Definition at line 51 of file TableView.h.

Constructor & Destructor Documentation

◆ TableView() [1/3]

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

Definition at line 56 of file TableView.h.

56  : m_size(iTable.size()) {
57  fillArray(iTable, std::make_index_sequence<sizeof...(Args)>{});
58  }

References edm::soa::TableView< Args >::fillArray().

◆ TableView() [2/3]

template<typename... Args>
edm::soa::TableView< Args >::TableView ( unsigned int  iSize,
std::array< void *, sizeof...(Args)> &  iArray 
)
inline

Definition at line 59 of file TableView.h.

59 : m_size(iSize), m_values(iArray) {}

◆ TableView() [3/3]

template<typename... Args>
edm::soa::TableView< Args >::TableView ( unsigned int  iSize,
std::array< void const *, sizeof...(Args)> &  iArray 
)
inline

Definition at line 61 of file TableView.h.

62  : m_size(iSize), m_values(iArray) {}

Member Function Documentation

◆ begin()

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

Definition at line 76 of file TableView.h.

76 { return const_iterator{m_values}; }

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

◆ column()

template<typename... Args>
template<typename U >
ColumnValues<typename U::type> edm::soa::TableView< Args >::column ( ) const
inline

Definition at line 72 of file TableView.h.

72  {
73  return ColumnValues<typename U::type>{static_cast<typename U::type const*>(columnAddress<U>()), m_size};
74  }

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

◆ columnAddress()

template<typename... Args>
template<typename U >
void const* edm::soa::TableView< Args >::columnAddress ( ) const
inlineprivate

Definition at line 84 of file TableView.h.

84  {
86  }

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

◆ end()

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

◆ fillArray()

template<typename... Args>
template<typename T , size_t... I>
void edm::soa::TableView< Args >::fillArray ( T const &  iTable,
std::index_sequence< I... >   
)
inlineprivate

Definition at line 89 of file TableView.h.

89  {
90  ((m_values[I] = iTable.columnAddressWorkaround(
91  static_cast<typename std::tuple_element<I, Layout>::type const*>(nullptr))),
92  ...);
93  }

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

Referenced by edm::soa::TableView< Args >::TableView().

◆ get()

template<typename... Args>
template<typename U >
U::type const& edm::soa::TableView< Args >::get ( size_t  iRow) const
inline

◆ size()

template<typename... Args>
unsigned int edm::soa::TableView< Args >::size ( void  ) const
inline

Member Data Documentation

◆ kNColumns

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

Definition at line 52 of file TableView.h.

◆ m_size

template<typename... Args>
unsigned int edm::soa::TableView< Args >::m_size
private

◆ m_values

template<typename... Args>
std::array<void const*, sizeof...(Args)> edm::soa::TableView< Args >::m_values
private
edm::soa::TableView::m_size
unsigned int m_size
Definition: TableView.h:81
edm::soa::TableView::fillArray
void fillArray(T const &iTable, std::index_sequence< I... >)
Definition: TableView.h:89
edm::soa::TableView::const_iterator
ConstTableItr< Args... > const_iterator
Definition: TableView.h:53
ColumnValues
watchdog.const
const
Definition: watchdog.py:83
edm::soa::TableView::size
unsigned int size() const
Definition: TableView.h:64
Exhume::I
const std::complex< double > I
Definition: I.h:8
edm::soa::TableView::m_values
std::array< void const *, sizeof...(Args)> m_values
Definition: TableView.h:80
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
edm::soa::impl::GetIndex::index
static constexpr int index
Definition: tablehelpers.h:39