library: libCore #include "TArrayI.h"

# TArrayI

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

## class TArrayI : public TArray

| Inheritance Chart:
`TArray`
| <- | `TArrayI` |
<- |
`TH1I` |
`TH2I` |
`TH3I` |

        public:

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

### Data Members

        public:

          Int_t* fArray  [fN] Array of fN 32 bit integers

## Class Description

     TArrayI

     Array of integers (32 bits per element).

TArrayI()

     Default TArrayI ctor.

TArrayI(Int_t n)

     Create TArrayI object and set array size to n integers.

TArrayI(Int_t n, const Int_t *array)

     Create TArrayI object and initialize it with values of array.

TArrayI(const TArrayI &array) : TArray(array)

     Copy constructor.

~TArrayI()

     Delete TArrayI object.

void Adopt(Int_t n, Int_t *arr)

     Adopt array arr into TArrayI, i.e. don't copy arr but use it directly
     in TArrayI. User may not delete arr, TArrayI dtor will do it.

void AddAt(Int_t c, Int_t i)

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

void Set(Int_t n)

     Set size of this array to n ints.
     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 Int_t *array)

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

void Streamer(TBuffer &b)

     Stream a TArrayI object.

### Inline Functions

                TArrayI& operator=(const TArrayI& rhs)
                   Int_t At(Int_t i) const
                    void Copy(TArrayI& array) const
            const Int_t* GetArray() const
                  Int_t* GetArray()
                  Stat_t GetSum() const
                    void Reset()
                    void Reset(Int_t val)
                  Int_t& operator[](Int_t i)
                   Int_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: TArrayI.cxx,v 1.13 2004/05/06 12:32:43 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *