Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TArrayD Class Reference

Array of doubles (64 bits per element).

Definition at line 27 of file TArrayD.h.

Public Member Functions

 TArrayD ()
 Default TArrayD ctor.
 
 TArrayD (const TArrayD &array)
 Copy constructor.
 
 TArrayD (Int_t n)
 Create TArrayD object and set array size to n doubles.
 
 TArrayD (Int_t n, const Double_t *array)
 Create TArrayD object and initialize it with values of array.
 
virtual ~TArrayD ()
 Delete TArrayD object.
 
void AddAt (Double_t c, Int_t i)
 Set the double c value at position i in the array.
 
void Adopt (Int_t n, Double_t *array)
 Adopt array arr into TArrayD, i.e.
 
Double_t At (Int_t i) const
 
void Copy (TArrayD &array) const
 
Double_tGetArray ()
 
const Double_tGetArray () const
 
Double_t GetAt (Int_t i) const override
 
Stat_t GetSum () const
 
TClassIsA () const override
 
TArrayDoperator= (const TArrayD &rhs)
 TArrayD assignment operator.
 
Double_toperator[] (Int_t i)
 
Double_t operator[] (Int_t i) const
 
void Reset ()
 
void Reset (Double_t val)
 
void Set (Int_t n) override
 Set size of this array to n doubles.
 
void Set (Int_t n, const Double_t *array)
 Set size of this array to n doubles and set the contents This function should not be called if the array was declared via Adopt.
 
void SetAt (Double_t v, Int_t i) override
 
void Streamer (TBuffer &) override
 Stream a TArrayD object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TArray
 TArray ()
 
 TArray (const TArray &a)
 
 TArray (Int_t n)
 
virtual ~TArray ()
 
Int_t GetSize () const
 
TArrayoperator= (const TArray &rhs)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TArray
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TArrayReadArray (TBuffer &b, const TClass *clReq)
 Read TArray object from buffer.
 
static void WriteArray (TBuffer &b, const TArray *a)
 Write TArray object to buffer.
 

Public Attributes

Double_tfArray
 
- Public Attributes inherited from TArray
Int_t fN
 

Additional Inherited Members

- Protected Member Functions inherited from TArray
Bool_t BoundsOk (const char *where, Int_t at) const
 
Bool_t OutOfBoundsError (const char *where, Int_t i) const
 Generate an out-of-bounds error. Always returns false.
 

#include <TArrayD.h>

Inheritance diagram for TArrayD:
[legend]

Constructor & Destructor Documentation

◆ TArrayD() [1/4]

TArrayD::TArrayD ( )

Default TArrayD ctor.

Definition at line 26 of file TArrayD.cxx.

◆ TArrayD() [2/4]

TArrayD::TArrayD ( Int_t  n)

Create TArrayD object and set array size to n doubles.

Definition at line 34 of file TArrayD.cxx.

◆ TArrayD() [3/4]

TArrayD::TArrayD ( Int_t  n,
const Double_t array 
)

Create TArrayD object and initialize it with values of array.

Definition at line 43 of file TArrayD.cxx.

◆ TArrayD() [4/4]

TArrayD::TArrayD ( const TArrayD array)

Copy constructor.

Definition at line 52 of file TArrayD.cxx.

◆ ~TArrayD()

TArrayD::~TArrayD ( )
virtual

Delete TArrayD object.

Definition at line 71 of file TArrayD.cxx.

Member Function Documentation

◆ AddAt()

void TArrayD::AddAt ( Double_t  c,
Int_t  i 
)

Set the double c value at position i in the array.

Check for out of bounds. Warning: the name of the method is misleading, it actually overwrites the position i.

Definition at line 94 of file TArrayD.cxx.

◆ Adopt()

void TArrayD::Adopt ( Int_t  n,
Double_t arr 
)

Adopt array arr into TArrayD, i.e.

don't copy arr but use it directly in TArrayD. User may not delete arr, TArrayD dtor will do it.

Definition at line 81 of file TArrayD.cxx.

◆ At()

Double_t TArrayD::At ( Int_t  i) const
inline

Definition at line 79 of file TArrayD.h.

◆ Class()

static TClass * TArrayD::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TArrayD::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TArrayD::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 55 of file TArrayD.h.

◆ Copy()

void TArrayD::Copy ( TArrayD array) const
inline

Definition at line 42 of file TArrayD.h.

◆ DeclFileName()

static const char * TArrayD::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 55 of file TArrayD.h.

◆ GetArray() [1/2]

Double_t * TArrayD::GetArray ( )
inline

Definition at line 44 of file TArrayD.h.

◆ GetArray() [2/2]

const Double_t * TArrayD::GetArray ( ) const
inline

Definition at line 43 of file TArrayD.h.

◆ GetAt()

Double_t TArrayD::GetAt ( Int_t  i) const
inlineoverridevirtual

Implements TArray.

Definition at line 45 of file TArrayD.h.

◆ GetSum()

Stat_t TArrayD::GetSum ( ) const
inline

Definition at line 46 of file TArrayD.h.

◆ IsA()

TClass * TArrayD::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TArray.

Reimplemented in TH1D, TH2D, TH3D, TProfile, TProfile2D, and TProfile3D.

Definition at line 55 of file TArrayD.h.

◆ operator=()

TArrayD & TArrayD::operator= ( const TArrayD rhs)

TArrayD assignment operator.

Definition at line 61 of file TArrayD.cxx.

◆ operator[]() [1/2]

Double_t & TArrayD::operator[] ( Int_t  i)
inline

Definition at line 85 of file TArrayD.h.

◆ operator[]() [2/2]

Double_t TArrayD::operator[] ( Int_t  i) const
inline

Definition at line 92 of file TArrayD.h.

◆ Reset() [1/2]

void TArrayD::Reset ( )
inline

Definition at line 47 of file TArrayD.h.

◆ Reset() [2/2]

void TArrayD::Reset ( Double_t  val)
inline

Definition at line 48 of file TArrayD.h.

◆ Set() [1/2]

void TArrayD::Set ( Int_t  n)
overridevirtual

Set size of this array to n doubles.

A new array is created, the old contents copied to the new array, then the old array is deleted. This function should not be called if the array was declared via Adopt.

Implements TArray.

Definition at line 106 of file TArrayD.cxx.

◆ Set() [2/2]

void TArrayD::Set ( Int_t  n,
const Double_t array 
)

Set size of this array to n doubles and set the contents This function should not be called if the array was declared via Adopt.

Definition at line 133 of file TArrayD.cxx.

◆ SetAt()

void TArrayD::SetAt ( Double_t  v,
Int_t  i 
)
inlineoverridevirtual

Implements TArray.

Definition at line 51 of file TArrayD.h.

◆ Streamer()

void TArrayD::Streamer ( TBuffer b)
overridevirtual

Stream a TArrayD object.

Reimplemented from TArray.

Reimplemented in TH1D, TH2D, TH3D, TProfile, TProfile2D, and TProfile3D.

Definition at line 149 of file TArrayD.cxx.

◆ StreamerNVirtual()

void TArrayD::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 55 of file TArrayD.h.

Member Data Documentation

◆ fArray

Double_t* TArrayD::fArray

Definition at line 30 of file TArrayD.h.

Libraries for TArrayD:

The documentation for this class was generated from the following files: