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

Constructor & Destructor Documentation

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

Definition at line 36 of file TableExaminer.h.

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

36  :
37  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 43 of file TableExaminer.h.

43 {}

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

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

49  {
50  return m_table->columnAddressByIndex(iColumnIndex);
51  }
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 89 of file TableExaminer.h.

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

90  {
91  using Layout = typename T::Layout;
92  using ColumnType = typename std::tuple_element<I,Layout>::type;
93  iV.emplace_back( ColumnType::label(), typeid( typename ColumnType::type ) );
94  columnDescImpl<I+1, S>(iV,
95  static_cast<typename std::conditional< I+1 != S,
96  std::true_type,
97  std::false_type>::type*>(nullptr));
98  }
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 101 of file TableExaminer.h.

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

References kNColumns.

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

References kNColumns.

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

References Exhume::I.

76  {
77  using Layout = typename T::Layout;
78  iV.emplace_back( typeid( typename std::tuple_element<I,Layout>::type ) );
79  columnTypesImpl<I+1, S>(iV,
80  static_cast<typename std::conditional< I+1 != S,
81  std::true_type,
82  std::false_type>::type*>(nullptr));
83  }
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 86 of file TableExaminer.h.

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

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

Member Data Documentation

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