Logo ROOT   6.08/07
Reference Guide
List of all members | Public Member Functions | Public Attributes | List of all members
TArrayI Class Reference

Array of integers (32 bits per element).

Definition at line 29 of file TArrayI.h.

Public Member Functions

 TArrayI ()
 Default TArrayI ctor. More...
 
 TArrayI (Int_t n)
 Create TArrayI object and set array size to n integers. More...
 
 TArrayI (Int_t n, const Int_t *array)
 Create TArrayI object and initialize it with values of array. More...
 
 TArrayI (const TArrayI &array)
 Copy constructor. More...
 
virtual ~TArrayI ()
 Delete TArrayI object. More...
 
void AddAt (Int_t c, Int_t i)
 Add Int_t c at position i. Check for out of bounds. More...
 
void Adopt (Int_t n, Int_t *array)
 Adopt array arr into TArrayI, i.e. More...
 
Int_t At (Int_t i) const
 
void Copy (TArrayI &array) const
 
const Int_tGetArray () const
 
Int_tGetArray ()
 
Double_t GetAt (Int_t i) const
 
Stat_t GetSum () const
 
TArrayIoperator= (const TArrayI &rhs)
 TArrayI assignment operator. More...
 
Int_toperator[] (Int_t i)
 
Int_t operator[] (Int_t i) const
 
void Reset ()
 
void Reset (Int_t val)
 
void Set (Int_t n)
 Set size of this array to n ints. More...
 
void Set (Int_t n, const Int_t *array)
 Set size of this array to n ints and set the contents. More...
 
void SetAt (Double_t v, Int_t i)
 
- Public Member Functions inherited from TArray
 TArray ()
 
 TArray (Int_t n)
 
 TArray (const TArray &a)
 
virtual ~TArray ()
 
Int_t GetSize () const
 
TArrayoperator= (const TArray &rhs)
 

Public Attributes

Int_tfArray
 
- Public Attributes inherited from TArray
Int_t fN
 

Additional Inherited Members

- Static Public Member Functions inherited from TArray
static TArrayReadArray (TBuffer &b, const TClass *clReq)
 Read TArray object from buffer. More...
 
static void WriteArray (TBuffer &b, const TArray *a)
 Write TArray object to buffer. More...
 
- 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. More...
 

#include <TArrayI.h>

Inheritance diagram for TArrayI:
[legend]

Constructor & Destructor Documentation

◆ TArrayI() [1/4]

TArrayI::TArrayI ( )

Default TArrayI ctor.

Definition at line 26 of file TArrayI.cxx.

◆ TArrayI() [2/4]

TArrayI::TArrayI ( Int_t  n)

Create TArrayI object and set array size to n integers.

Definition at line 34 of file TArrayI.cxx.

◆ TArrayI() [3/4]

TArrayI::TArrayI ( Int_t  n,
const Int_t array 
)

Create TArrayI object and initialize it with values of array.

Definition at line 43 of file TArrayI.cxx.

◆ TArrayI() [4/4]

TArrayI::TArrayI ( const TArrayI array)

Copy constructor.

Definition at line 52 of file TArrayI.cxx.

◆ ~TArrayI()

TArrayI::~TArrayI ( )
virtual

Delete TArrayI object.

Definition at line 71 of file TArrayI.cxx.

Member Function Documentation

◆ AddAt()

void TArrayI::AddAt ( Int_t  c,
Int_t  i 
)

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

Definition at line 93 of file TArrayI.cxx.

◆ Adopt()

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

Definition at line 81 of file TArrayI.cxx.

◆ At()

Int_t TArrayI::At ( Int_t  i) const
inline

Definition at line 81 of file TArrayI.h.

◆ Copy()

void TArrayI::Copy ( TArrayI array) const
inline

Definition at line 44 of file TArrayI.h.

◆ GetArray() [1/2]

const Int_t* TArrayI::GetArray ( ) const
inline

Definition at line 45 of file TArrayI.h.

◆ GetArray() [2/2]

Int_t* TArrayI::GetArray ( )
inline

Definition at line 46 of file TArrayI.h.

◆ GetAt()

Double_t TArrayI::GetAt ( Int_t  i) const
inlinevirtual

Implements TArray.

Definition at line 47 of file TArrayI.h.

◆ GetSum()

Stat_t TArrayI::GetSum ( ) const
inline

Definition at line 48 of file TArrayI.h.

◆ operator=()

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

TArrayI assignment operator.

Definition at line 61 of file TArrayI.cxx.

◆ operator[]() [1/2]

Int_t & TArrayI::operator[] ( Int_t  i)
inline

Definition at line 87 of file TArrayI.h.

◆ operator[]() [2/2]

Int_t TArrayI::operator[] ( Int_t  i) const
inline

Definition at line 94 of file TArrayI.h.

◆ Reset() [1/2]

void TArrayI::Reset ( void  )
inline

Definition at line 49 of file TArrayI.h.

◆ Reset() [2/2]

void TArrayI::Reset ( Int_t  val)
inline

Definition at line 50 of file TArrayI.h.

◆ Set() [1/2]

void TArrayI::Set ( Int_t  n)
virtual

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.

Implements TArray.

Definition at line 105 of file TArrayI.cxx.

◆ Set() [2/2]

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

Definition at line 129 of file TArrayI.cxx.

◆ SetAt()

void TArrayI::SetAt ( Double_t  v,
Int_t  i 
)
inlinevirtual

Implements TArray.

Definition at line 53 of file TArrayI.h.

Member Data Documentation

◆ fArray

Int_t* TArrayI::fArray

Definition at line 32 of file TArrayI.h.


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