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
Int_t GetSize () const
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
std::size_t size () const
void Streamer (TBuffer &) override
 Stream a TArrayD object.
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 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
Int_t fN

Protected Member Functions

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:
TArray TH1D TH2D TH3D TProfile TProfile2D TProfile3D

Constructor & Destructor Documentation

◆ TArrayD() [1/4]

TArrayD::TArrayD ( )

Default TArrayD ctor.

Definition at line 25 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 33 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 42 of file TArrayD.cxx.

◆ TArrayD() [4/4]

TArrayD::TArrayD ( const TArrayD & array)

Copy constructor.

Definition at line 51 of file TArrayD.cxx.

◆ ~TArrayD()

TArrayD::~TArrayD ( )
virtual

Delete TArrayD object.

Definition at line 70 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 93 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 80 of file TArrayD.cxx.

◆ At()

Double_t TArrayD::At ( Int_t i) const
inline

Definition at line 79 of file TArrayD.h.

◆ BoundsOk()

Bool_t TArray::BoundsOk ( const char * where,
Int_t at ) const
inlineprotectedinherited

Definition at line 79 of file TArray.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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()

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.

◆ GetSize()

Int_t TArray::GetSize ( ) const
inlineinherited

Definition at line 47 of file TArray.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, TProfile2D, TProfile3D, and TProfile.

Definition at line 55 of file TArrayD.h.

◆ operator=()

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

TArrayD assignment operator.

Definition at line 60 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.

◆ OutOfBoundsError()

Bool_t TArray::OutOfBoundsError ( const char * where,
Int_t i ) const
protectedinherited

Generate an out-of-bounds error. Always returns false.

Definition at line 29 of file TArray.cxx.

◆ ReadArray()

TArray * TArray::ReadArray ( TBuffer & b,
const TClass * clReq )
staticinherited

Read TArray object from buffer.

Simplified version of TBuffer::ReadObject (does not keep track of multiple references to same array).

Definition at line 40 of file TArray.cxx.

◆ 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 105 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 132 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.

◆ size()

std::size_t TArray::size ( ) const
inlineinherited

Definition at line 50 of file TArray.h.

◆ Streamer()

void TArrayD::Streamer ( TBuffer & b)
overridevirtual

Stream a TArrayD object.

Reimplemented from TArray.

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

Definition at line 148 of file TArrayD.cxx.

◆ StreamerNVirtual()

void TArrayD::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 55 of file TArrayD.h.

◆ WriteArray()

void TArray::WriteArray ( TBuffer & b,
const TArray * a )
staticinherited

Write TArray object to buffer.

Simplified version of TBuffer::WriteObject (does not keep track of multiple references to the same array).

Definition at line 81 of file TArray.cxx.

Member Data Documentation

◆ fArray

Double_t* TArrayD::fArray

Definition at line 30 of file TArrayD.h.

◆ fN

Int_t TArray::fN
inherited

Definition at line 38 of file TArray.h.


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