CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
edm::StdArray< T, N > Class Template Reference

#include <StdArray.h>

Public Types

using const_iterator = const_pointer
 
using const_pointer = const value_type *
 
using const_reference = value_type const &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using difference_type = std::ptrdiff_t
 
using iterator = pointer
 
using pointer = value_type *
 
using reference = value_type &
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = std::size_t
 
using value_type = T
 

Public Member Functions

constexpr reference at (size_type pos)
 
constexpr const_reference at (size_type pos) const
 
constexpr reference back ()
 
constexpr const_reference back () const
 
constexpr iterator begin () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
constexpr pointer data () noexcept
 
constexpr const_pointer data () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr iterator end () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr void fill (const T &value)
 
constexpr reference front ()
 
constexpr const_reference front () const
 
constexpr size_type max_size () const noexcept
 
constexpr operator std::array< T, N > () const
 
constexpr StdArrayoperator= (std::array< T, N > const &init)
 
constexpr StdArrayoperator= (std::array< T, N > &&init)
 
constexpr reference operator[] (size_type pos)
 
constexpr const_reference operator[] (size_type pos) const
 
constexpr reverse_iterator rbegin () noexcept
 
constexpr const_reverse_iterator rbegin () const noexcept
 
constexpr reverse_iterator rend () noexcept
 
constexpr const_reverse_iterator rend () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr void swap (StdArray &other) noexcept(std::is_nothrow_swappable_v< T >)
 

Static Public Member Functions

static short Class_Version ()
 

Public Attributes

detail::StdArrayTrait< T, N >::array_type data_
 

Detailed Description

template<typename T, std::size_t N>
class edm::StdArray< T, N >

Definition at line 39 of file StdArray.h.

Member Typedef Documentation

◆ const_iterator

template<typename T, std::size_t N>
using edm::StdArray< T, N >::const_iterator = const_pointer

Definition at line 51 of file StdArray.h.

◆ const_pointer

template<typename T, std::size_t N>
using edm::StdArray< T, N >::const_pointer = const value_type*

Definition at line 49 of file StdArray.h.

◆ const_reference

template<typename T, std::size_t N>
using edm::StdArray< T, N >::const_reference = value_type const&

Definition at line 47 of file StdArray.h.

◆ const_reverse_iterator

template<typename T, std::size_t N>
using edm::StdArray< T, N >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 53 of file StdArray.h.

◆ difference_type

template<typename T, std::size_t N>
using edm::StdArray< T, N >::difference_type = std::ptrdiff_t

Definition at line 45 of file StdArray.h.

◆ iterator

template<typename T, std::size_t N>
using edm::StdArray< T, N >::iterator = pointer

Definition at line 50 of file StdArray.h.

◆ pointer

template<typename T, std::size_t N>
using edm::StdArray< T, N >::pointer = value_type*

Definition at line 48 of file StdArray.h.

◆ reference

template<typename T, std::size_t N>
using edm::StdArray< T, N >::reference = value_type&

Definition at line 46 of file StdArray.h.

◆ reverse_iterator

template<typename T, std::size_t N>
using edm::StdArray< T, N >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 52 of file StdArray.h.

◆ size_type

template<typename T, std::size_t N>
using edm::StdArray< T, N >::size_type = std::size_t

Definition at line 44 of file StdArray.h.

◆ value_type

template<typename T, std::size_t N>
using edm::StdArray< T, N >::value_type = T

Definition at line 43 of file StdArray.h.

Member Function Documentation

◆ at() [1/2]

template<typename T, std::size_t N>
constexpr reference edm::StdArray< T, N >::at ( size_type  pos)
inline

Definition at line 86 of file StdArray.h.

References edm::StdArray< T, N >::data_, and N.

86  {
87  if (pos >= N)
88  abort();
89  return data_[pos];
90  }
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ at() [2/2]

template<typename T, std::size_t N>
constexpr const_reference edm::StdArray< T, N >::at ( size_type  pos) const
inline

Definition at line 91 of file StdArray.h.

References edm::StdArray< T, N >::data_, and N.

91  {
92  if (pos >= N)
93  abort();
94  return data_[pos];
95  }
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ back() [1/2]

template<typename T, std::size_t N>
constexpr reference edm::StdArray< T, N >::back ( )
inline

Definition at line 116 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

116  {
117  if constexpr (N == 0)
118  abort();
119  return data_[N - 1];
120  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ back() [2/2]

template<typename T, std::size_t N>
constexpr const_reference edm::StdArray< T, N >::back ( ) const
inline

Definition at line 121 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

121  {
122  if constexpr (N == 0)
123  abort();
124  return data_[N - 1];
125  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ begin() [1/2]

template<typename T, std::size_t N>
constexpr iterator edm::StdArray< T, N >::begin ( void  )
inlinenoexcept

Definition at line 147 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

Referenced by edm::StdArray< T, N >::crend(), and edm::StdArray< T, N >::rend().

147  {
148  if constexpr (N != 0)
149  return data_;
150  else
151  return nullptr;
152  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ begin() [2/2]

template<typename T, std::size_t N>
constexpr const_iterator edm::StdArray< T, N >::begin ( void  ) const
inlinenoexcept

Definition at line 153 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

153  {
154  if constexpr (N != 0)
155  return data_;
156  else
157  return nullptr;
158  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ cbegin()

template<typename T, std::size_t N>
constexpr const_iterator edm::StdArray< T, N >::cbegin ( ) const
inlinenoexcept

Definition at line 159 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

159  {
160  if constexpr (N != 0)
161  return data_;
162  else
163  return nullptr;
164  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ cend()

template<typename T, std::size_t N>
constexpr const_iterator edm::StdArray< T, N >::cend ( ) const
inlinenoexcept

Definition at line 180 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

180  {
181  if constexpr (N != 0)
182  return data_ + N;
183  else
184  return nullptr;
185  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ Class_Version()

template<typename T, std::size_t N>
static short edm::StdArray< T, N >::Class_Version ( )
inlinestatic

Definition at line 232 of file StdArray.h.

◆ crbegin()

template<typename T, std::size_t N>
constexpr const_reverse_iterator edm::StdArray< T, N >::crbegin ( ) const
inlinenoexcept

Definition at line 191 of file StdArray.h.

References edm::StdArray< T, N >::end().

191 { return const_reverse_iterator(end()); }
constexpr iterator end() noexcept
Definition: StdArray.h:168
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: StdArray.h:53

◆ crend()

template<typename T, std::size_t N>
constexpr const_reverse_iterator edm::StdArray< T, N >::crend ( ) const
inlinenoexcept

Definition at line 197 of file StdArray.h.

References edm::StdArray< T, N >::begin().

197 { return const_reverse_iterator(begin()); }
constexpr iterator begin() noexcept
Definition: StdArray.h:147
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: StdArray.h:53

◆ data() [1/2]

template<typename T, std::size_t N>
constexpr pointer edm::StdArray< T, N >::data ( )
inlinenoexcept

Definition at line 130 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

130  {
131  if constexpr (N != 0)
132  return data_;
133  else
134  return nullptr;
135  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ data() [2/2]

template<typename T, std::size_t N>
constexpr const_pointer edm::StdArray< T, N >::data ( ) const
inlinenoexcept

Definition at line 136 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

136  {
137  if constexpr (N != 0)
138  return data_;
139  else
140  return nullptr;
141  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ empty()

template<typename T, std::size_t N>
constexpr bool edm::StdArray< T, N >::empty ( ) const
inlinenoexcept

Definition at line 202 of file StdArray.h.

References N.

202 { return N == 0; }
#define N
Definition: blowfish.cc:9

◆ end() [1/2]

template<typename T, std::size_t N>
constexpr iterator edm::StdArray< T, N >::end ( void  )
inlinenoexcept

Definition at line 168 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), edm::StdArray< T, N >::crbegin(), and edm::StdArray< T, N >::rbegin().

168  {
169  if constexpr (N != 0)
170  return data_ + N;
171  else
172  return nullptr;
173  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ end() [2/2]

template<typename T, std::size_t N>
constexpr const_iterator edm::StdArray< T, N >::end ( void  ) const
inlinenoexcept

Definition at line 174 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

174  {
175  if constexpr (N != 0)
176  return data_ + N;
177  else
178  return nullptr;
179  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ fill()

template<typename T, std::size_t N>
constexpr void edm::StdArray< T, N >::fill ( const T value)
inline

Definition at line 213 of file StdArray.h.

References edm::StdArray< T, N >::data_, mps_fire::i, and N.

213  {
214  for (size_type i = 0; i < N; ++i)
215  data_[i] = N;
216  }
std::size_t size_type
Definition: StdArray.h:44
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ front() [1/2]

template<typename T, std::size_t N>
constexpr reference edm::StdArray< T, N >::front ( )
inline

Definition at line 103 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

103  {
104  if constexpr (N == 0)
105  abort();
106  return data_[0];
107  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ front() [2/2]

template<typename T, std::size_t N>
constexpr const_reference edm::StdArray< T, N >::front ( ) const
inline

Definition at line 108 of file StdArray.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), edm::StdArray< T, N >::data_, and N.

108  {
109  if constexpr (N == 0)
110  abort();
111  return data_[0];
112  }
return((rh ^ lh) &mask)
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ max_size()

template<typename T, std::size_t N>
constexpr size_type edm::StdArray< T, N >::max_size ( ) const
inlinenoexcept

Definition at line 208 of file StdArray.h.

References N.

208 { return N; }
#define N
Definition: blowfish.cc:9

◆ operator std::array< T, N >()

template<typename T, std::size_t N>
constexpr edm::StdArray< T, N >::operator std::array< T, N > ( ) const
inline

Definition at line 74 of file StdArray.h.

References filterCSVwithJSON::copy, edm::StdArray< T, N >::data_, mps_fire::i, and N.

74  {
75  std::array<T, N> copy;
76  for (size_type i = 0; i < N; ++i) {
77  copy[i] = data_[i];
78  }
79  return copy;
80  }
std::size_t size_type
Definition: StdArray.h:44
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ operator=() [1/2]

template<typename T, std::size_t N>
constexpr StdArray& edm::StdArray< T, N >::operator= ( std::array< T, N > const &  init)
inline

Definition at line 58 of file StdArray.h.

References edm::StdArray< T, N >::data_, mps_fire::i, and N.

58  {
59  for (size_type i = 0; i < N; ++i) {
60  data_[i] = init[i];
61  }
62  return *this;
63  }
std::size_t size_type
Definition: StdArray.h:44
Definition: init.py:1
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ operator=() [2/2]

template<typename T, std::size_t N>
constexpr StdArray& edm::StdArray< T, N >::operator= ( std::array< T, N > &&  init)
inline

Definition at line 66 of file StdArray.h.

References edm::StdArray< T, N >::data_, mps_fire::i, eostools::move(), and N.

66  {
67  for (size_type i = 0; i < N; ++i) {
68  data_[i] = std::move(init[i]);
69  }
70  return *this;
71  }
std::size_t size_type
Definition: StdArray.h:44
Definition: init.py:1
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229
def move(src, dest)
Definition: eostools.py:511

◆ operator[]() [1/2]

template<typename T, std::size_t N>
constexpr reference edm::StdArray< T, N >::operator[] ( size_type  pos)
inline

Definition at line 98 of file StdArray.h.

References edm::StdArray< T, N >::data_.

98 { return data_[pos]; }
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ operator[]() [2/2]

template<typename T, std::size_t N>
constexpr const_reference edm::StdArray< T, N >::operator[] ( size_type  pos) const
inline

Definition at line 99 of file StdArray.h.

References edm::StdArray< T, N >::data_.

99 { return data_[pos]; }
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

◆ rbegin() [1/2]

template<typename T, std::size_t N>
constexpr reverse_iterator edm::StdArray< T, N >::rbegin ( )
inlinenoexcept

Definition at line 189 of file StdArray.h.

References edm::StdArray< T, N >::end().

189 { return reverse_iterator(end()); }
constexpr iterator end() noexcept
Definition: StdArray.h:168
std::reverse_iterator< iterator > reverse_iterator
Definition: StdArray.h:52

◆ rbegin() [2/2]

template<typename T, std::size_t N>
constexpr const_reverse_iterator edm::StdArray< T, N >::rbegin ( ) const
inlinenoexcept

Definition at line 190 of file StdArray.h.

References edm::StdArray< T, N >::end().

190 { return const_reverse_iterator(end()); }
constexpr iterator end() noexcept
Definition: StdArray.h:168
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: StdArray.h:53

◆ rend() [1/2]

template<typename T, std::size_t N>
constexpr reverse_iterator edm::StdArray< T, N >::rend ( )
inlinenoexcept

Definition at line 195 of file StdArray.h.

References edm::StdArray< T, N >::begin().

195 { return reverse_iterator(begin()); }
constexpr iterator begin() noexcept
Definition: StdArray.h:147
std::reverse_iterator< iterator > reverse_iterator
Definition: StdArray.h:52

◆ rend() [2/2]

template<typename T, std::size_t N>
constexpr const_reverse_iterator edm::StdArray< T, N >::rend ( ) const
inlinenoexcept

Definition at line 196 of file StdArray.h.

References edm::StdArray< T, N >::begin().

196 { return const_reverse_iterator(begin()); }
constexpr iterator begin() noexcept
Definition: StdArray.h:147
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: StdArray.h:53

◆ size()

template<typename T, std::size_t N>
constexpr size_type edm::StdArray< T, N >::size ( void  ) const
inlinenoexcept

Definition at line 205 of file StdArray.h.

References N.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

205 { return N; }
#define N
Definition: blowfish.cc:9

◆ swap()

template<typename T, std::size_t N>
constexpr void edm::StdArray< T, N >::swap ( StdArray< T, N > &  other)
inlinenoexcept

Definition at line 219 of file StdArray.h.

References edm::StdArray< T, N >::data_, mps_fire::i, N, trackingPlots::other, and edm::swap().

219  {
220  if (&other == this)
221  return;
222  for (size_type i = 0; i < N; ++i)
223  std::swap(data_[i], other[i]);
224  }
std::size_t size_type
Definition: StdArray.h:44
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
#define N
Definition: blowfish.cc:9
detail::StdArrayTrait< T, N >::array_type data_
Definition: StdArray.h:229

Member Data Documentation

◆ data_

template<typename T, std::size_t N>
detail::StdArrayTrait<T, N>::array_type edm::StdArray< T, N >::data_