FairRoot/PandaRoot
|
#include <PndFTSArray.h>
Public Types | |
typedef PndFTSInternal::TypeForAlignmentHelper < T, alignment >::Type | T2 |
typedef PndFTSInternal::ArrayBase< T2, Dim > | Parent |
Public Member Functions | |
PndFTSResizableArray () | |
PndFTSResizableArray (int x) | |
PndFTSResizableArray (int x, int y) | |
PndFTSResizableArray (int x, int y, int z) | |
~PndFTSResizableArray () | |
void | Resize (int x) |
void | Resize (int x, int y) |
void | Resize (int x, int y, int z) |
int | Size () const |
operator bool () const | |
bool | IsValid () const |
PndFTSInternal::TypeForAlignmentHelper < T, alignment >::Type & | operator* () |
const PndFTSInternal::TypeForAlignmentHelper < T, alignment >::Type & | operator* () const |
PndFTSInternal::TypeForAlignmentHelper < T, alignment >::Type * | Data () |
const PndFTSInternal::TypeForAlignmentHelper < T, alignment >::Type * | Data () const |
PndFTSArray | operator+ (int x) const |
PndFTSArray | operator- (int x) const |
PndFTSArray< Other, Dim > | ReinterpretCast () const |
Private Member Functions | |
void * | operator new (size_t) |
PndFTSResizableArray (const PndFTSResizableArray &) | |
PndFTSResizableArray & | operator= (const PndFTSResizableArray &) |
Owns the data. When it goes out of scope the data is freed.
The memory is allocated on the heap.
Instantiate this class on the stack. Allocation on the heap is disallowed.
T | type of the entries in the array. |
Dim | selects the operator[]/operator() behavior it should have. I.e. makes it behave like a 1-, 2- or 3-dim array. (defaults to 1) |
alignment | Defaults to 0 (default alignment). Other valid values are any multiples of 2. This is especially useful for aligning data for SIMD vectors. |
Example:
Definition at line 455 of file PndFTSArray.h.
typedef PndFTSInternal::ArrayBase<T2, Dim> PndFTSResizableArray< T, Dim, alignment >::Parent |
Definition at line 459 of file PndFTSArray.h.
typedef PndFTSInternal::TypeForAlignmentHelper<T, alignment>::Type PndFTSResizableArray< T, Dim, alignment >::T2 |
Definition at line 458 of file PndFTSArray.h.
|
inline |
does not allocate any memory
Definition at line 671 of file PndFTSArray.h.
|
inline |
use for 1-dim arrays: allocates x * sizeof(T) bytes for the array
Definition at line 678 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Alloc(), and PNDFTSARRAY_STATIC_ASSERT.
|
inline |
use for 2-dim arrays: allocates x * y * sizeof(T) bytes for the array
Definition at line 686 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Alloc(), and PNDFTSARRAY_STATIC_ASSERT.
|
inline |
use for 3-dim arrays: allocates x * y * z * sizeof(T) bytes for the array
Definition at line 694 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Alloc(), and PNDFTSARRAY_STATIC_ASSERT.
|
inline |
|
private |
|
inlineinherited |
returns a pointer to the data This circumvents bounds checking so it should not be used.
Definition at line 398 of file PndFTSArray.h.
|
inlineinherited |
returns a const pointer to the data This circumvents bounds checking so it should not be used.
Definition at line 403 of file PndFTSArray.h.
|
inlineinherited |
allows you to check for validity of the array
Definition at line 383 of file PndFTSArray.h.
|
inlineinherited |
allows you to check for validity of the array by casting to bool
Definition at line 379 of file PndFTSArray.h.
|
private |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
moves the array base pointer so that the data that was once at index 0 will then be at index -x
|
inlineinherited |
moves the array base pointer so that the data that was once at index 0 will then be at index x
|
private |
|
inlineinherited |
Definition at line 414 of file PndFTSArray.h.
|
inline |
use for 1-dim arrays: resizes the memory for the array to x * sizeof(T) bytes.
Definition at line 703 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Free(), and PNDFTSARRAY_STATIC_ASSERT.
Referenced by PndFTSCAGBTracker::SetHits(), and PndFTSCAGBTracker::SetNHits().
|
inline |
use for 2-dim arrays: resizes the memory for the array to x * y * sizeof(T) bytes.
Definition at line 712 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Free(), and PNDFTSARRAY_STATIC_ASSERT.
|
inline |
use for 3-dim arrays: resizes the memory for the array to x * y * z * sizeof(T) bytes.
Definition at line 721 of file PndFTSArray.h.
References PndFTSInternal::Allocator< T, alignment >::Free(), and PNDFTSARRAY_STATIC_ASSERT.
|
inlineinherited |
Returns the number of elements in the array. If it is a multi-dimensional array the size is the multiplication of the dimensions ( e.g. a 10 x 20 array returns 200 as its size ).
Definition at line 374 of file PndFTSArray.h.
Referenced by PndFTSCADisplay::DrawGBPoints().