CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::soa::TableExaminer< T > Class Template Reference

#include <TableExaminer.h>

Inheritance diagram for edm::soa::TableExaminer< T >:
edm::soa::TableExaminerBase

Public Member Functions

void const * columnAddress (unsigned int iColumnIndex) const final
 
std::vector< std::pair< char const *, std::type_index > > columnDescriptions () const final
 
std::vector< std::type_index > columnTypes () const final
 
TableExaminer< T > & operator= (const TableExaminer< T > &)=default
 
size_t size () const final
 
 TableExaminer (T const *iTable)
 
 TableExaminer (const TableExaminer< T > &)=default
 
const std::type_info * typeID () const final
 
 ~TableExaminer () override
 
- Public Member Functions inherited from edm::soa::TableExaminerBase
TableExaminerBaseoperator= (const TableExaminerBase &)=default
 
 TableExaminerBase ()=default
 
 TableExaminerBase (const TableExaminerBase &)=default
 
virtual ~TableExaminerBase ()=default
 

Private Member Functions

template<int I, int S>
void columnDescImpl (std::vector< std::pair< char const *, std::type_index >> &iV) const
 
template<int I, int S>
void columnTypesImpl (std::vector< std::type_index > &iV) const
 

Private Attributes

T const * m_table
 

Detailed Description

template<typename T>
class edm::soa::TableExaminer< T >

Definition at line 31 of file TableExaminer.h.

Constructor & Destructor Documentation

◆ TableExaminer() [1/2]

template<typename T >
edm::soa::TableExaminer< T >::TableExaminer ( T const *  iTable)
inlineexplicit

Definition at line 33 of file TableExaminer.h.

33 : m_table(iTable) {}

◆ TableExaminer() [2/2]

template<typename T >
edm::soa::TableExaminer< T >::TableExaminer ( const TableExaminer< T > &  )
default

◆ ~TableExaminer()

template<typename T >
edm::soa::TableExaminer< T >::~TableExaminer ( )
inlineoverride

Definition at line 39 of file TableExaminer.h.

39 {}

Member Function Documentation

◆ columnAddress()

template<typename T >
void const* edm::soa::TableExaminer< T >::columnAddress ( unsigned int  iColumnIndex) const
inlinefinalvirtual

Implements edm::soa::TableExaminerBase.

Definition at line 45 of file TableExaminer.h.

References edm::soa::TableExaminer< T >::m_table.

45  {
46  return m_table->columnAddressByIndex(iColumnIndex);
47  }

◆ columnDescImpl()

template<typename T >
template<int I, int S>
void edm::soa::TableExaminer< T >::columnDescImpl ( std::vector< std::pair< char const *, std::type_index >> &  iV) const
inlineprivate

Definition at line 76 of file TableExaminer.h.

References Exhume::I, and label.

76  {
77  if constexpr (I != S) {
78  using Layout = typename T::Layout;
79  using ColumnType = typename std::tuple_element<I, Layout>::type;
80  iV.emplace_back(ColumnType::label(), typeid(typename ColumnType::type));
81  columnDescImpl<I + 1, S>(iV);
82  }
83  }
char const * label
const std::complex< double > I
Definition: I.h:8

◆ columnDescriptions()

template<typename T >
std::vector<std::pair<char const*, std::type_index> > edm::soa::TableExaminer< T >::columnDescriptions ( ) const
inlinefinalvirtual

Implements edm::soa::TableExaminerBase.

Definition at line 56 of file TableExaminer.h.

References kNColumns.

56  {
57  std::vector<std::pair<char const*, std::type_index>> returnValue;
58  returnValue.reserve(T::kNColumns);
59  columnDescImpl<0, T::kNColumns>(returnValue);
60  return returnValue;
61  }
static const unsigned int kNColumns

◆ columnTypes()

template<typename T >
std::vector<std::type_index> edm::soa::TableExaminer< T >::columnTypes ( ) const
inlinefinalvirtual

Implements edm::soa::TableExaminerBase.

Definition at line 49 of file TableExaminer.h.

References kNColumns.

49  {
50  std::vector<std::type_index> returnValue;
51  returnValue.reserve(T::kNColumns);
52  columnTypesImpl<0, T::kNColumns>(returnValue);
53  return returnValue;
54  }
static const unsigned int kNColumns

◆ columnTypesImpl()

template<typename T >
template<int I, int S>
void edm::soa::TableExaminer< T >::columnTypesImpl ( std::vector< std::type_index > &  iV) const
inlineprivate

Definition at line 67 of file TableExaminer.h.

References Exhume::I.

67  {
68  if constexpr (I != S) {
69  using Layout = typename T::Layout;
70  iV.emplace_back(typeid(typename std::tuple_element<I, Layout>::type));
71  columnTypesImpl<I + 1, S>(iV);
72  }
73  }
const std::complex< double > I
Definition: I.h:8

◆ operator=()

template<typename T >
TableExaminer<T>& edm::soa::TableExaminer< T >::operator= ( const TableExaminer< T > &  )
default

◆ size()

template<typename T >
size_t edm::soa::TableExaminer< T >::size ( void  ) const
inlinefinalvirtual

◆ typeID()

template<typename T >
const std::type_info* edm::soa::TableExaminer< T >::typeID ( ) const
inlinefinalvirtual

Implements edm::soa::TableExaminerBase.

Definition at line 63 of file TableExaminer.h.

63 { return &typeid(T); }
long double T

Member Data Documentation

◆ m_table

template<typename T >
T const* edm::soa::TableExaminer< T >::m_table
private