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

Array of floats (32 bits per element).

Definition at line 27 of file TArrayF.h.

Public Member Functions

 TArrayF ()
 Default TArrayF ctor.
 
 TArrayF (const TArrayF &array)
 Copy constructor.
 
 TArrayF (Int_t n)
 Create TArrayF object and set array size to n floats.
 
 TArrayF (Int_t n, const Float_t *array)
 Create TArrayF object and initialize it with values of array.
 
virtual ~TArrayF ()
 Delete TArrayF object.
 
void AddAt (Float_t c, Int_t i)
 Add float c at position i. Check for out of bounds.
 
void Adopt (Int_t n, Float_t *array)
 Adopt array arr into TArrayF, i.e.
 
Float_t At (Int_t i) const
 
void Copy (TArrayF &array) const
 
Float_tGetArray ()
 
const Float_tGetArray () const
 
Double_t GetAt (Int_t i) const override
 
Stat_t GetSum () const
 
TClassIsA () const override
 
TArrayFoperator= (const TArrayF &rhs)
 TArrayF assignment operator.
 
Float_toperator[] (Int_t i)
 
Float_t operator[] (Int_t i) const
 
void Reset ()
 
void Reset (Float_t val)
 
void Set (Int_t n) override
 Set size of this array to n floats.
 
void Set (Int_t n, const Float_t *array)
 Set size of this array to n floats and set the contents.
 
void SetAt (Double_t v, Int_t i) override
 
void Streamer (TBuffer &) override
 Stream a TArrayF 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

Float_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 <TArrayF.h>

Inheritance diagram for TArrayF:
[legend]

Constructor & Destructor Documentation

◆ TArrayF() [1/4]

TArrayF::TArrayF ( )

Default TArrayF ctor.

Definition at line 26 of file TArrayF.cxx.

◆ TArrayF() [2/4]

TArrayF::TArrayF ( Int_t  n)

Create TArrayF object and set array size to n floats.

Definition at line 34 of file TArrayF.cxx.

◆ TArrayF() [3/4]

TArrayF::TArrayF ( Int_t  n,
const Float_t array 
)

Create TArrayF object and initialize it with values of array.

Definition at line 43 of file TArrayF.cxx.

◆ TArrayF() [4/4]

TArrayF::TArrayF ( const TArrayF array)

Copy constructor.

Definition at line 52 of file TArrayF.cxx.

◆ ~TArrayF()

TArrayF::~TArrayF ( )
virtual

Delete TArrayF object.

Definition at line 71 of file TArrayF.cxx.

Member Function Documentation

◆ AddAt()

void TArrayF::AddAt ( Float_t  c,
Int_t  i 
)

Add float c at position i. Check for out of bounds.

Definition at line 93 of file TArrayF.cxx.

◆ Adopt()

void TArrayF::Adopt ( Int_t  n,
Float_t arr 
)

Adopt array arr into TArrayF, i.e.

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

Definition at line 81 of file TArrayF.cxx.

◆ At()

Float_t TArrayF::At ( Int_t  i) const
inline

Definition at line 78 of file TArrayF.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 55 of file TArrayF.h.

◆ Copy()

void TArrayF::Copy ( TArrayF array) const
inline

Definition at line 42 of file TArrayF.h.

◆ DeclFileName()

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

Definition at line 55 of file TArrayF.h.

◆ GetArray() [1/2]

Float_t * TArrayF::GetArray ( )
inline

Definition at line 44 of file TArrayF.h.

◆ GetArray() [2/2]

const Float_t * TArrayF::GetArray ( ) const
inline

Definition at line 43 of file TArrayF.h.

◆ GetAt()

Double_t TArrayF::GetAt ( Int_t  i) const
inlineoverridevirtual

Implements TArray.

Definition at line 45 of file TArrayF.h.

◆ GetSum()

Stat_t TArrayF::GetSum ( ) const
inline

Definition at line 46 of file TArrayF.h.

◆ IsA()

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

Reimplemented from TArray.

Reimplemented in TH1F, TH1K, TH2F, and TH3F.

Definition at line 55 of file TArrayF.h.

◆ operator=()

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

TArrayF assignment operator.

Definition at line 61 of file TArrayF.cxx.

◆ operator[]() [1/2]

Float_t & TArrayF::operator[] ( Int_t  i)
inline

Definition at line 84 of file TArrayF.h.

◆ operator[]() [2/2]

Float_t TArrayF::operator[] ( Int_t  i) const
inline

Definition at line 91 of file TArrayF.h.

◆ Reset() [1/2]

void TArrayF::Reset ( )
inline

Definition at line 47 of file TArrayF.h.

◆ Reset() [2/2]

void TArrayF::Reset ( Float_t  val)
inline

Definition at line 48 of file TArrayF.h.

◆ Set() [1/2]

void TArrayF::Set ( Int_t  n)
overridevirtual

Set size of this array to n floats.

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 TArrayF.cxx.

◆ Set() [2/2]

void TArrayF::Set ( Int_t  n,
const Float_t array 
)

Set size of this array to n floats and set the contents.

This function should not be called if the array was declared via Adopt.

Definition at line 132 of file TArrayF.cxx.

◆ SetAt()

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

Implements TArray.

Definition at line 51 of file TArrayF.h.

◆ Streamer()

void TArrayF::Streamer ( TBuffer b)
overridevirtual

Stream a TArrayF object.

Reimplemented from TArray.

Reimplemented in TH1F, TH1K, TH2F, and TH3F.

Definition at line 148 of file TArrayF.cxx.

◆ StreamerNVirtual()

void TArrayF::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 55 of file TArrayF.h.

Member Data Documentation

◆ fArray

Float_t* TArrayF::fArray

Definition at line 30 of file TArrayF.h.

Libraries for TArrayF:

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