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 override final
 
std::vector< std::pair< char const *, std::type_index > > columnDescriptions () const override final
 
std::vector< std::type_index > columnTypes () const override final
 
TableExaminer< T > & operator= (const TableExaminer< T > &)=default
 
size_t size () const override final
 
 TableExaminer (T const *iTable)
 
 TableExaminer (const TableExaminer< T > &)=default
 
const std::type_info * typeID () const override 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

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

Definition at line 33 of file TableExaminer.h.

References edm::soa::TableExaminer< T >::operator=().

33 : m_table(iTable) {}
template<typename T >
edm::soa::TableExaminer< T >::TableExaminer ( const TableExaminer< T > &  )
default
template<typename T >
edm::soa::TableExaminer< T >::~TableExaminer ( )
inlineoverride

Definition at line 39 of file TableExaminer.h.

39 {}

Member Function Documentation

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

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  }
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 constexpr, 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  }
type
Definition: HCALResponse.h:21
char const * label
const std::complex< double > I
Definition: I.h:8
#define constexpr
template<typename T >
std::vector<std::pair<char const*, std::type_index> > edm::soa::TableExaminer< T >::columnDescriptions ( ) const
inlinefinaloverridevirtual

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
template<typename T >
std::vector<std::type_index> edm::soa::TableExaminer< T >::columnTypes ( ) const
inlinefinaloverridevirtual

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
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 constexpr, and 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  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
#define constexpr
template<typename T >
TableExaminer<T>& edm::soa::TableExaminer< T >::operator= ( const TableExaminer< T > &  )
default
template<typename T >
size_t edm::soa::TableExaminer< T >::size ( void  ) const
inlinefinaloverridevirtual
template<typename T >
const std::type_info* edm::soa::TableExaminer< T >::typeID ( ) const
inlinefinaloverridevirtual

Implements edm::soa::TableExaminerBase.

Definition at line 63 of file TableExaminer.h.

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

Member Data Documentation

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