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, std::true_type *) const
 
template<int I, int S>
void columnDescImpl (std::vector< std::pair< char const *, std::type_index >> &, std::false_type *) const
 
template<int I, int S>
void columnTypesImpl (std::vector< std::type_index > &iV, std::true_type *) const
 
template<int I, int S>
void columnTypesImpl (std::vector< std::type_index > &, std::false_type *) 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 35 of file TableExaminer.h.

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

35  :
36  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 42 of file TableExaminer.h.

42 {}

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 48 of file TableExaminer.h.

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

48  {
49  return m_table->columnAddressByIndex(iColumnIndex);
50  }
template<typename T >
template<int I, int S>
void edm::soa::TableExaminer< T >::columnDescImpl ( std::vector< std::pair< char const *, std::type_index >> &  iV,
std::true_type *   
) const
inlineprivate

Definition at line 88 of file TableExaminer.h.

References Exhume::I, and diffTwoXMLs::label.

89  {
90  using Layout = typename T::Layout;
91  using ColumnType = typename std::tuple_element<I,Layout>::type;
92  iV.emplace_back( ColumnType::label(), typeid( typename ColumnType::type ) );
93  columnDescImpl<I+1, S>(iV,
94  static_cast<typename std::conditional< I+1 != S,
95  std::true_type,
96  std::false_type>::type*>(nullptr));
97  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
template<typename T >
template<int I, int S>
void edm::soa::TableExaminer< T >::columnDescImpl ( std::vector< std::pair< char const *, std::type_index >> &  ,
std::false_type *   
) const
inlineprivate

Definition at line 100 of file TableExaminer.h.

101  {};
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 61 of file TableExaminer.h.

References kNColumns.

61  {
62  std::vector<std::pair<char const*, std::type_index>> returnValue;
63  returnValue.reserve(T::kNColumns);
64  using Layout = typename T::Layout;
65  columnDescImpl<0, T::kNColumns>(returnValue, static_cast<std::true_type*>(nullptr));
66  return returnValue;
67  }
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 52 of file TableExaminer.h.

References kNColumns.

52  {
53  std::vector<std::type_index> returnValue;
54  returnValue.reserve(T::kNColumns);
55  using Layout = typename T::Layout;
56  columnTypesImpl<0, T::kNColumns>(returnValue, static_cast<std::true_type*>(nullptr));
57  return returnValue;
58  }
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,
std::true_type *   
) const
inlineprivate

Definition at line 75 of file TableExaminer.h.

References Exhume::I.

75  {
76  using Layout = typename T::Layout;
77  iV.emplace_back( typeid( typename std::tuple_element<I,Layout>::type ) );
78  columnTypesImpl<I+1, S>(iV,
79  static_cast<typename std::conditional< I+1 != S,
80  std::true_type,
81  std::false_type>::type*>(nullptr));
82  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
template<typename T >
template<int I, int S>
void edm::soa::TableExaminer< T >::columnTypesImpl ( std::vector< std::type_index > &  ,
std::false_type *   
) const
inlineprivate

Definition at line 85 of file TableExaminer.h.

85 {};
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 69 of file TableExaminer.h.

69  {
70  return &typeid(T);
71  }
long double T

Member Data Documentation

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