library: libCore #include "TArrayF.h"

# TArrayF

class description - source file - inheritance tree (.pdf)

## class TArrayF : public TArray

| Inheritance Chart:

`TArray`

<-

`TArrayF`

<-

`TH1F` |

`TH1K` |

`TH2F` |

`TH3F` |

        public:

                          TArrayF()
                          TArrayF(Int_t n)
                          TArrayF(Int_t n, const Float_t* array)
                          TArrayF(const TArrayF& array)
                  virtual ~TArrayF()
                     void AddAt(Float_t c, Int_t i)
                     void Adopt(Int_t n, Float_t* array)
                  Float_t At(Int_t i) const
           static TClass* Class()
                     void Copy(TArrayF& array) const
           const Float_t* GetArray() const
                 Float_t* GetArray()
                   Stat_t GetSum() const
          virtual TClass* IsA() const
                 TArrayF& operator=(const TArrayF& rhs)
                 Float_t& operator[](Int_t i)
                  Float_t operator[](Int_t i) const
                     void Reset()
                     void Reset(Float_t val)
             virtual void Set(Int_t n)
                     void Set(Int_t n, const Float_t* array)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        public:

          Float_t* fArray  [fN] Array of fN floats

## Class Description

     TArrayF

     Array of floats (32 bits per element).

TArrayF()

     Default TArrayF ctor.

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.

TArrayF(const TArrayF &array) : TArray(array)

     Copy constructor.

~TArrayF()

     Delete TArrayF object.

void 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.

void AddAt(Float_t c, Int_t i)

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

void Set(Int_t n)

     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.

void 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.

void Streamer(TBuffer &b)

     Stream a TArrayF object.

### Inline Functions

                  TArrayF& operator=(const TArrayF& rhs)
                   Float_t At(Int_t i) const
                      void Copy(TArrayF& array) const
            const Float_t* GetArray() const
                  Float_t* GetArray()
                    Stat_t GetSum() const
                      void Reset()
                      void Reset(Float_t val)
                  Float_t& operator[](Int_t i)
                   Float_t operator[](Int_t i) const
                   TClass* Class()
                   TClass* IsA() const
                      void ShowMembers(TMemberInspector& insp, char* parent)
                      void StreamerNVirtual(TBuffer& b)

Author: Rene Brun 06/03/95
Last update: root/cont:$Name: $:$Id: TArrayF.cxx,v 1.13 2004/05/06 12:32:43 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *