FairRoot/PandaRoot
PndCAArray.h
Go to the documentation of this file.
1 /****************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project *
3  * ALICE Experiment at CERN, All rights reserved. *
4  * *
5  * Copyright (C) 2009 Matthias Kretz <kretz@kde.org> *
6  * for The ALICE HLT Project. *
7  * *
8  * Permission to use, copy, modify and distribute this software and its *
9  * documentation strictly for non-commercial purposes is hereby granted *
10  * without fee, provided that the above copyright notice appears in all *
11  * copies and that both the copyright notice and this permission notice *
12  * appear in the supporting documentation. The authors make no claims *
13  * about the suitability of this software for any purpose. It is *
14  * provided "as is" without express or implied warranty. *
15  ***************************************************************************/
16 
27 #ifndef PNDCAARRAY_H
28 #define PNDCAARRAY_H
29 
30 #ifndef assert
31 #include <assert.h>
32 #endif
33 
34 #if (defined(__MMX__) || defined(__SSE__))
35 
36 #if defined(__GNUC__)
37 
38 #if __GNUC__ > 3
39 #define USE_MM_MALLOC
40 #endif // if __GNUC__ > 3
41 
42 #else // if defined(__GNUC__) // not gcc, assume it can use _mm_malloc since it supports MMX/SSE
43 
44 #define USE_MM_MALLOC
45 
46 #endif // if defined(__GNUC__)
47 #endif // if (defined(__MMX__) || defined(__SSE__))
48 
49 #ifdef USE_MM_MALLOC
50 #include <mm_malloc.h>
51 #else
52 #include <cstdlib>
53 #endif
54 #include <cstring>
55 
56 enum {
58 };
59 
61 {
62  template<bool> class STATIC_ASSERT_FAILURE;
63  template<> class STATIC_ASSERT_FAILURE<true> {};
64 }
65 
66 #define ALIHLTARRAY_STATIC_ASSERT_CONCAT_HELPER(a, b) a##b
67 #define ALIHLTARRAY_STATIC_ASSERT_CONCAT(a, b) ALIHLTARRAY_STATIC_ASSERT_CONCAT_HELPER(a, b)
68 #define ALIHLTARRAY_STATIC_ASSERT_NC(cond, msg) \
69  typedef PndCAArrayInternal::STATIC_ASSERT_FAILURE<cond> ALIHLTARRAY_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__); \
70  ALIHLTARRAY_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__) Error_##msg
71 #define ALIHLTARRAY_STATIC_ASSERT(cond, msg) ALIHLTARRAY_STATIC_ASSERT_NC(cond, msg); (void) Error_##msg
72 
73 template<typename T, int Dim> class PndCAArray;
74 
75 namespace PndCAInternal
76 {
77  template<unsigned int Size> struct Padding { char fPadding[Size]; };
78  template<> struct Padding<0> {};
79  template<typename T> struct CacheLineSizeHelperData { T fData; };
80  template<typename T> struct CacheLineSizeHelperEnums {
81  enum {
83  MaskedSize = sizeof( T ) & ( CacheLineSize - 1 ),
84  RequiredSize = MaskedSize == 0 ? sizeof( T ) : sizeof( T ) + CacheLineSize - MaskedSize,
85  PaddingSize = RequiredSize - sizeof( T )
86  };
87  };
88  template<typename T> class CacheLineSizeHelper : private CacheLineSizeHelperData<T>, private Padding<CacheLineSizeHelperEnums<T>::PaddingSize>
89  {
90  public:
91  operator T &() { return CacheLineSizeHelperData<T>::fData; }
92  operator const T &() const { return CacheLineSizeHelperData<T>::fData; }
93  //const T &operator=( const T &rhs ) { CacheLineSizeHelperData<T>::fData = rhs; }
94 
95  private:
96  };
97  template<typename T, int alignment> struct TypeForAlignmentHelper { typedef T Type; };
99 
100  // XXX
101  // The ArrayBoundsCheck and Allocator classes implement a virtual destructor only in order to
102  // silence the -Weffc++ warning. It really is not required for these classes to have a virtual
103  // dtor since polymorphism is not used (PndCAResizableArray and PndCAFixedArray are allocated on
104  // the stack only). The virtual dtor only adds an unnecessary vtable to the code.
105 #ifndef ENABLE_ARRAY_BOUNDS_CHECKING
106 
110  {
111  protected:
112  virtual inline ~ArrayBoundsCheck() {}
113  inline bool IsInBounds( int ) const { return true; }
114  inline void SetBounds( int, int ) {}
115  inline void MoveBounds( int ) {}
116  inline void ReinterpretCast( const ArrayBoundsCheck &, int, int ) {}
117  };
118 #define BOUNDS_CHECK(x, y)
119 #else
120 
123  class ArrayBoundsCheck
124  {
125  protected:
126  virtual inline ~ArrayBoundsCheck() {}
130  inline bool IsInBounds( int x ) const;
134  inline void SetBounds( int start, int end ) { fStart = start; fEnd = end; }
138  inline void MoveBounds( int d ) { fStart += d; fEnd += d; }
139 
140  inline void ReinterpretCast( const ArrayBoundsCheck &other, int sizeofOld, int sizeofNew ) {
141  fStart = other.fStart * sizeofNew / sizeofOld;
142  fEnd = other.fEnd * sizeofNew / sizeofOld;
143  }
144 
145  private:
146  int fStart;
147  int fEnd;
148  };
149 #define BOUNDS_CHECK(x, y) if (PndCAInternal::ArrayBoundsCheck::IsInBounds(x)) {} else return y
150 #endif
151  template<typename T, int alignment> class Allocator
152  {
153  public:
154 #ifdef USE_MM_MALLOC
155  static inline T *Alloc( int s ) { T *p = reinterpret_cast<T *>( _mm_malloc( s * sizeof( T ), alignment ) ); return new( p ) T[s]; }
156  static inline void Free( T *const p, int size ) {
157  for ( int i = 0; i < size; ++i ) {
158  p[i].~T();
159  }
160  _mm_free( p );
161  }
162 #else
163  static inline T *Alloc( int s ) { T *p; posix_memalign( &p, alignment, s * sizeof( T ) ); return new( p ) T[s]; }
164  static inline void Free( T *const p, int size ) {
165  for ( int i = 0; i < size; ++i ) {
166  p[i].~T();
167  }
168  std::free( p );
169  }
170 #endif
171  };
172  template<typename T> class Allocator<T, PndCAFullyCacheLineAligned>
173  {
174  public:
176 #ifdef USE_MM_MALLOC
177  static inline T2 *Alloc( int s ) { T2 *p = reinterpret_cast<T2 *>( _mm_malloc( s * sizeof( T2 ), 128 ) ); return new( p ) T2[s]; }
178  static inline void Free( T2 *const p, int size ) {
179  for ( int i = 0; i < size; ++i ) {
180  p[i].~T2();
181  }
182  _mm_free( p );
183  }
184 #else
185  static inline T2 *Alloc( int s ) { T2 *p; posix_memalign( &p, 128, s * sizeof( T2 ) ); return new( p ) T2[s]; }
186  static inline void Free( T2 *const p, int size ) {
187  for ( int i = 0; i < size; ++i ) {
188  p[i].~T2();
189  }
190  std::free( p );
191  }
192 #endif
193  };
194  template<typename T> class Allocator<T, 0>
195  {
196  public:
197 #ifdef USE_MM_MALLOC
198  static inline T *Alloc( int s ) { T *p = reinterpret_cast<T *>( _mm_malloc( s * sizeof( T ), 128 ) ); return new( p ) T[s]; }
199  static inline void Free( T *const p, int size ) {
200  for ( int i = 0; i < size; ++i ) {
201  p[i].~T();
202  }
203  _mm_free( p );
204  }
205 #else
206  static inline T *Alloc( int s ) { T *p; posix_memalign( &p, 128, s * sizeof( T ) ); return new( p ) T[s]; }
207  static inline void Free( T *const p, int size ) {
208  for ( int i = 0; i < size; ++i ) {
209  p[i].~T();
210  }
211  std::free( p );
212  }
213 #endif
214 
215 // public:
216 // static inline T *Alloc( int s ) { return new T[s]; }
217 // static inline void Free( const T *const p, int ) { delete[] p; }
218  };
219 
220  template<typename T> struct ReturnTypeHelper { typedef T Type; };
221  template<typename T> struct ReturnTypeHelper<CacheLineSizeHelper<T> > { typedef T Type; };
225  template<typename T, int Dim> class ArrayBase;
226 
230  template<typename T>
231  class ArrayBase<T, 1> : public ArrayBoundsCheck
232  {
233  friend class ArrayBase<T, 2>;
234  public:
235  ArrayBase() : fData( 0 ) {} // XXX really shouldn't be done. But -Weffc++ wants it so
236  ArrayBase( const ArrayBase &rhs ) : ArrayBoundsCheck( rhs ), fData( rhs.fData ), fSize( rhs.fSize ) {} // XXX
237  ArrayBase &operator=( const ArrayBase &rhs ) { ArrayBoundsCheck::operator=( rhs ); fData = rhs.fData; fSize = rhs.fSize; return *this; } // XXX
238  typedef typename ReturnTypeHelper<T>::Type R;
242  inline R &operator[]( int x ) { BOUNDS_CHECK( x, fData[0] ); return fData[x]; }
246  inline const R &operator[]( int x ) const { BOUNDS_CHECK( x, fData[0] ); return fData[x]; }
247 
248  protected:
250  int fSize;
251  inline void SetSize( int x, int, int ) { fSize = x; }
252  };
253 
258  template<typename T>
259  class ArrayBase<T, 2> : public ArrayBoundsCheck
260  {
261  friend class ArrayBase<T, 3>;
262  public:
263  ArrayBase() : fData( 0 ), fSize( 0 ), fStride( 0 ) {} // XXX really shouldn't be done. But -Weffc++ wants it so
264  ArrayBase( const ArrayBase &rhs ) : ArrayBoundsCheck( rhs ), fData( rhs.fData ), fSize( rhs.fSize ), fStride( rhs.fStride ) {} // XXX
265  ArrayBase &operator=( const ArrayBase &rhs ) { ArrayBoundsCheck::operator=( rhs ); fData = rhs.fData; fSize = rhs.fSize; fStride = rhs.fStride; return *this; } // XXX
266  typedef typename ReturnTypeHelper<T>::Type R;
270  inline R &operator()( int x, int y ) { BOUNDS_CHECK( x * fStride + y, fData[0] ); return fData[x * fStride + y]; }
274  inline const R &operator()( int x, int y ) const { BOUNDS_CHECK( x * fStride + y, fData[0] ); return fData[x * fStride + y]; }
278  inline PndCAArray<T, 1> operator[]( int x );
282  inline const PndCAArray<T, 1> operator[]( int x ) const;
283 
284  protected:
286  int fSize;
287  int fStride;
288  inline void SetSize( int x, int y, int ) { fStride = y; fSize = x * y; }
289  };
290 
295  template<typename T>
296  class ArrayBase<T, 3> : public ArrayBoundsCheck
297  {
298  public:
299  ArrayBase() : fData( 0 ), fSize( 0 ), fStrideX( 0 ), fStrideY( 0 ) {} // XXX really shouldn't be done. But -Weffc++ wants it so
300  ArrayBase( const ArrayBase &rhs ) : ArrayBoundsCheck( rhs ), fData( rhs.fData ), fSize( rhs.fSize ), fStrideX( rhs.fStrideX ), fStrideY( rhs.fStrideY ) {} // XXX
301  ArrayBase &operator=( const ArrayBase &rhs ) { ArrayBoundsCheck::operator=( rhs ); fData = rhs.fData; fSize = rhs.fSize; fStrideX = rhs.fStrideX; fStrideY = rhs.fStrideY; return *this; } // XXX
302  typedef typename ReturnTypeHelper<T>::Type R;
306  inline R &operator()( int x, int y, int z );
310  inline const R &operator()( int x, int y, int z ) const;
314  inline PndCAArray<T, 2> operator[]( int x );
318  inline const PndCAArray<T, 2> operator[]( int x ) const;
319 
320  protected:
322  int fSize;
323  int fStrideX;
324  int fStrideY;
325  inline void SetSize( int x, int y, int z ) { fStrideX = y * z; fStrideY = z; fSize = fStrideX * x; }
326  };
327 
328  template<typename T, unsigned int Size, int _alignment> class AlignedData
329  {
330  public:
332  const int offset = reinterpret_cast<unsigned long>( &fUnalignedArray[0] ) & ( Alignment - 1 );
333  void *mem = &fUnalignedArray[0] + ( Alignment - offset );
334  return new( mem ) T[Size];
335  }
337  const int offset = reinterpret_cast<unsigned long>( &fUnalignedArray[0] ) & ( Alignment - 1 );
338  T *mem = reinterpret_cast<T *>( &fUnalignedArray[0] + ( Alignment - offset ) );
339  for ( unsigned int i = 0; i < Size; ++i ) {
340  mem[i].~T();
341  }
342  }
343  private:
344  enum {
345  Alignment = _alignment == PndCAFullyCacheLineAligned ? 128 : _alignment,
346  PaddedSize = Size * sizeof( T ) + Alignment
347  };
348  ALIHLTARRAY_STATIC_ASSERT_NC( ( Alignment & ( Alignment - 1 ) ) == 0, alignment_needs_to_be_a_multiple_of_2 );
349 
350  char fUnalignedArray[PaddedSize];
351  };
352  template<typename T, unsigned int Size> class AlignedData<T, Size, 0>
353  {
354  public:
355  T *ConstructAlignedData() { return &fArray[0]; }
356  private:
357  T fArray[Size];
358  };
359 } // namespace PndCAInternal
360 
364 template < typename T, int Dim = 1 >
365 class PndCAArray : public PndCAInternal::ArrayBase<T, Dim>
366 {
367  public:
369 
374  inline int Size() const { return Parent::fSize; }
375 
379  inline operator bool() const { return Parent::fData != 0; }
383  inline bool IsValid() const { return Parent::fData != 0; }
384 
388  inline T &operator*() { BOUNDS_CHECK( 0, Parent::fData[0] ); return *Parent::fData; }
392  inline const T &operator*() const { BOUNDS_CHECK( 0, Parent::fData[0] ); return *Parent::fData; }
393 
398  inline T *Data() { return Parent::fData; }
403  inline const T *Data() const { return Parent::fData; }
404 
408  inline PndCAArray operator+( int x ) const;
412  inline PndCAArray operator-( int x ) const;
413 
414  template<typename Other> inline PndCAArray<Other, Dim> ReinterpretCast() const {
416  r.fData = reinterpret_cast<Other *>( Parent::fData );
417  r.ReinterpretCast( *this, sizeof( T ), sizeof( Other ) );
418  }
419 };
420 
454 template < typename T, int Dim = 1, int alignment = 0 >
455 class PndCAResizableArray : public PndCAArray<typename PndCAInternal::TypeForAlignmentHelper<T, alignment>::Type, Dim>
456 {
457  public:
463  inline PndCAResizableArray();
467  inline PndCAResizableArray( int x );
471  inline PndCAResizableArray( int x, int y );
475  inline PndCAResizableArray( int x, int y, int z );
476 
480  inline ~PndCAResizableArray() { PndCAInternal::Allocator<T, alignment>::Free( Parent::fData, Parent::fSize ); }
481 
488  inline void Resize( int x );
495  inline void Resize( int x, int y );
502  inline void Resize( int x, int y, int z );
503 
504  private:
505  // disable allocation on the heap
506  void *operator new( size_t );
507 
508  // disable copy
510  PndCAResizableArray &operator=( const PndCAResizableArray & );
511 };
512 
513 template<unsigned int x, unsigned int y = 0, unsigned int z = 0> class PndCAArraySize
514 {
515  public:
516  enum {
517  Size = y == 0 ? x : ( z == 0 ? x * y : x * y * z ),
518  Dim = y == 0 ? 1 : ( z == 0 ? 2 : 3 ),
519  X = x, Y = y, Z = z
520  };
521 };
522 
535 template<typename T, typename Size, int alignment = 0>
536 class PndCAFixedArray : public PndCAArray<typename PndCAInternal::TypeForAlignmentHelper<T, alignment>::Type, Size::Dim>
537 {
538  public:
541  inline PndCAFixedArray() {
542  fData = fFixedArray.ConstructAlignedData();
543  Parent::SetBounds( 0, Size::Size - 1 );
544  SetSize( Size::X, Size::Y, Size::Z );
545  }
547  fData = fFixedArray.ConstructAlignedData();
548  Parent::SetBounds( 0, Size::Size - 1 );
549  SetSize( Size::X, Size::Y, Size::Z );
550  std::memcpy( fData, rhs.fData, Size::Size * sizeof( T ) );
551  }
552 
553  private:
555 
556  // disable allocation on the heap
557  void *operator new( size_t );
558 
559  using Parent::fData;
560 
561  // disable copy
562  PndCAFixedArray &operator=( const PndCAFixedArray & );
563 };
564 
565 
566 
567 
571 
572 
573 
574 
575 namespace PndCAInternal
576 {
577 #ifdef ENABLE_ARRAY_BOUNDS_CHECKING
578  inline bool ArrayBoundsCheck::IsInBounds( int x ) const
579  {
580  assert( x >= fStart );
581  assert( x <= fEnd );
582  return ( x >= fStart && x <= fEnd );
583  }
584 #endif
585 
586  template<typename T>
588  {
589  x *= fStride;
590  typedef PndCAArray<T, 1> AT1;
591  BOUNDS_CHECK( x, AT1() );
593  a.fData = &fData[x];
594  a.ArrayBoundsCheck::operator=( *this );
595  a.MoveBounds( -x );
596  return a;
597  }
598 
599  template<typename T>
600  inline const PndCAArray<T, 1> ArrayBase<T, 2>::operator[]( int x ) const
601  {
602  x *= fStride;
603  typedef PndCAArray<T, 1> AT1;
604  BOUNDS_CHECK( x, AT1() );
606  a.fData = &fData[x];
607  a.ArrayBoundsCheck::operator=( *this );
608  a.MoveBounds( -x );
609  return a;
610  }
611 
612  template<typename T>
614  {
615  BOUNDS_CHECK( x * fStrideX + y + fStrideY + z, fData[0] );
616  return fData[x * fStrideX + y + fStrideY + z];
617  }
618  template<typename T>
619  inline const typename PndCAInternal::ArrayBase<T, 3>::R &ArrayBase<T, 3>::operator()( int x, int y, int z ) const
620  {
621  BOUNDS_CHECK( x * fStrideX + y + fStrideY + z, fData[0] );
622  return fData[x * fStrideX + y + fStrideY + z];
623  }
624  template<typename T>
626  {
627  x *= fStrideX;
628  typedef PndCAArray<T, 2> AT2;
629  BOUNDS_CHECK( x, AT2() );
631  a.fData = &fData[x];
632  a.fStride = fStrideY;
633  a.ArrayBoundsCheck::operator=( *this );
634  a.MoveBounds( -x );
635  return a;
636  }
637  template<typename T>
638  inline const PndCAArray<T, 2> ArrayBase<T, 3>::operator[]( int x ) const
639  {
640  x *= fStrideX;
641  typedef PndCAArray<T, 2> AT2;
642  BOUNDS_CHECK( x, AT2() );
644  a.fData = &fData[x];
645  a.fStride = fStrideY;
646  a.ArrayBoundsCheck::operator=( *this );
647  a.MoveBounds( -x );
648  return a;
649  }
650 } // namespace PndCAInternal
651 
652 
653 template<typename T, int Dim>
655 {
656  PndCAArray<T, Dim> r( *this );
657  r.fData += x;
658  r.MoveBounds( -x );
659  return r;
660 }
661 template<typename T, int Dim>
663 {
664  PndCAArray<T, Dim> r( *this );
665  r.fData -= x;
666  r.MoveBounds( x );
667  return r;
668 }
669 
670 template<typename T, int Dim, int alignment>
672 {
673  Parent::fData = 0;
674  Parent::SetSize( 0, 0, 0 );
675  Parent::SetBounds( 0, -1 );
676 }
677 template<typename T, int Dim, int alignment>
679 {
680  ALIHLTARRAY_STATIC_ASSERT( Dim == 1, PndCAResizableArray1_used_with_incorrect_dimension );
682  Parent::SetSize( x, 0, 0 );
683  Parent::SetBounds( 0, x - 1 );
684 }
685 template<typename T, int Dim, int alignment>
687 {
688  ALIHLTARRAY_STATIC_ASSERT( Dim == 2, PndCAResizableArray2_used_with_incorrect_dimension );
689  Parent::fData = PndCAInternal::Allocator<T, alignment>::Alloc( x * y );
690  Parent::SetSize( x, y, 0 );
691  Parent::SetBounds( 0, x * y - 1 );
692 }
693 template<typename T, int Dim, int alignment>
695 {
696  ALIHLTARRAY_STATIC_ASSERT( Dim == 3, PndCAResizableArray3_used_with_incorrect_dimension );
697  Parent::fData = PndCAInternal::Allocator<T, alignment>::Alloc( x * y * z );
698  Parent::SetSize( x, y, z );
699  Parent::SetBounds( 0, x * y * z - 1 );
700 }
701 // #include <iostream>
702 template<typename T, int Dim, int alignment>
704 {
705  ALIHLTARRAY_STATIC_ASSERT( Dim == 1, PndCAResizableArray1_resize_used_with_incorrect_dimension );
706  PndCAInternal::Allocator<T, alignment>::Free( Parent::fData, Parent::fSize );
707  Parent::fData = ( x == 0 ) ? 0 : PndCAInternal::Allocator<T, alignment>::Alloc( x );
708  Parent::SetSize( x, 0, 0 );
709  Parent::SetBounds( 0, x - 1 );
710 }
711 template<typename T, int Dim, int alignment>
713 {
714  ALIHLTARRAY_STATIC_ASSERT( Dim == 2, PndCAResizableArray2_resize_used_with_incorrect_dimension );
715  PndCAInternal::Allocator<T, alignment>::Free( Parent::fData, Parent::fSize );
716  Parent::fData = ( x == 0 ) ? 0 : PndCAInternal::Allocator<T, alignment>::Alloc( x * y );
717  Parent::SetSize( x, y, 0 );
718  Parent::SetBounds( 0, x * y - 1 );
719 }
720 template<typename T, int Dim, int alignment>
722 {
723  ALIHLTARRAY_STATIC_ASSERT( Dim == 3, PndCAResizableArray3_resize_used_with_incorrect_dimension );
724  PndCAInternal::Allocator<T, alignment>::Free( Parent::fData, Parent::fSize );
725  Parent::fData = ( x == 0 ) ? 0 : PndCAInternal::Allocator<T, alignment>::Alloc( x * y * z );
726  Parent::SetSize( x, y, z );
727  Parent::SetBounds( 0, x * y * z - 1 );
728 }
729 
730 #undef BOUNDS_CHECK
731 
732 #endif // ALIHLTARRAY_H
RhoError operator-(const RhoError &m1, const RhoError &m2)
Definition: RhoError.cxx:255
bool IsValid() const
Definition: PndCAArray.h:383
const R & operator[](int x) const
Definition: PndCAArray.h:246
void Resize(int x)
Definition: PndCAArray.h:703
void SetSize(int x, int y, int z)
Definition: PndCAArray.h:325
double r
Definition: RiemannTest.C:14
TObjArray * d
Int_t i
Definition: run_full.C:25
const R & operator()(int x, int y) const
Definition: PndCAArray.h:274
PndCAArray< Other, Dim > ReinterpretCast() const
Definition: PndCAArray.h:414
void SetSize(int x, int y, int)
Definition: PndCAArray.h:288
R & operator()(int x, int y)
Definition: PndCAArray.h:270
TLorentzVector s
Definition: Pnd2DStar.C:50
static void Free(T *const p, int size)
Definition: PndCAArray.h:164
void ReinterpretCast(const ArrayBoundsCheck &, int, int)
Definition: PndCAArray.h:116
const T & operator*() const
Definition: PndCAArray.h:392
const T * Data() const
Definition: PndCAArray.h:403
T & operator*()
Definition: PndCAArray.h:388
TVector3 offset(2, 0, 0)
double Y
Definition: anaLmdDigi.C:68
ArrayBase & operator=(const ArrayBase &rhs)
Definition: PndCAArray.h:301
static void Free(T *const p, int size)
Definition: PndCAArray.h:207
ArrayBase & operator=(const ArrayBase &rhs)
Definition: PndCAArray.h:237
Double_t p
Definition: anasim.C:58
PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type T2
Definition: PndCAArray.h:539
T * Data()
Definition: PndCAArray.h:398
ArrayBase(const ArrayBase &rhs)
Definition: PndCAArray.h:264
RhoError operator+(const RhoError &m1, const RhoError &m2)
Definition: RhoError.cxx:245
TTree * T
Definition: anaLmdReco.C:32
#define ALIHLTARRAY_STATIC_ASSERT(cond, msg)
Definition: PndCAArray.h:71
Int_t a
Definition: anaLmdDigi.C:126
ReturnTypeHelper< T >::Type R
Definition: PndCAArray.h:238
static T * Alloc(int s)
Definition: PndCAArray.h:163
PndCAInternal::ArrayBase< T2, Size::Dim > Parent
Definition: PndCAArray.h:540
int Size() const
Definition: PndCAArray.h:374
ArrayBase & operator=(const ArrayBase &rhs)
Definition: PndCAArray.h:265
ReturnTypeHelper< T >::Type R
Definition: PndCAArray.h:302
void SetSize(int x, int, int)
Definition: PndCAArray.h:251
Double_t z
float & operator[](int i)
Definition: P4_F32vec4.h:6
PndCAInternal::AlignedData< typename PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type, Size::Size, alignment > fFixedArray
Definition: PndCAArray.h:554
PndCAInternal::ArrayBase< T, Dim > Parent
Definition: PndCAArray.h:368
ArrayBase(const ArrayBase &rhs)
Definition: PndCAArray.h:236
PndCAFixedArray(const PndCAFixedArray &rhs)
Definition: PndCAArray.h:546
ArrayBase(const ArrayBase &rhs)
Definition: PndCAArray.h:300
#define ALIHLTARRAY_STATIC_ASSERT_NC(cond, msg)
Definition: PndCAArray.h:68
PndCAArray operator+(int x) const
Definition: PndCAArray.h:654
double X
Definition: anaLmdDigi.C:68
PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type T2
Definition: PndCAArray.h:458
PndCAArray operator-(int x) const
Definition: PndCAArray.h:662
Double_t x
PndCAInternal::ArrayBase< T2, Dim > Parent
Definition: PndCAArray.h:459
double Z
Definition: anaLmdDigi.C:68
#define BOUNDS_CHECK(x, y)
Definition: PndCAArray.h:118
Double_t y
ReturnTypeHelper< T >::Type R
Definition: PndCAArray.h:266