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

Array of integers (32 bits per element).

Definition at line 27 of file TArrayI.h.

Public Member Functions

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

Int_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 <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 79 of file TArrayI.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 55 of file TArrayI.h.

◆ Copy()

void TArrayI::Copy ( TArrayI array) const
inline

Definition at line 42 of file TArrayI.h.

◆ DeclFileName()

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

Definition at line 55 of file TArrayI.h.

◆ GetArray() [1/2]

Int_t * TArrayI::GetArray ( )
inline

Definition at line 44 of file TArrayI.h.

◆ GetArray() [2/2]

const Int_t * TArrayI::GetArray ( ) const
inline

Definition at line 43 of file TArrayI.h.

◆ GetAt()

Double_t TArrayI::GetAt ( Int_t  i) const
inlineoverridevirtual

Implements TArray.

Definition at line 45 of file TArrayI.h.

◆ GetSum()

Stat_t TArrayI::GetSum ( ) const
inline

Definition at line 46 of file TArrayI.h.

◆ IsA()

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

Reimplemented from TArray.

Reimplemented in TH1I, TH2I, and TH3I.

Definition at line 55 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 85 of file TArrayI.h.

◆ operator[]() [2/2]

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

Definition at line 92 of file TArrayI.h.

◆ Reset() [1/2]

void TArrayI::Reset ( )
inline

Definition at line 47 of file TArrayI.h.

◆ Reset() [2/2]

void TArrayI::Reset ( Int_t  val)
inline

Definition at line 48 of file TArrayI.h.

◆ Set() [1/2]

void TArrayI::Set ( Int_t  n)
overridevirtual

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 132 of file TArrayI.cxx.

◆ SetAt()

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

Implements TArray.

Definition at line 51 of file TArrayI.h.

◆ Streamer()

void TArrayI::Streamer ( TBuffer b)
overridevirtual

Stream a TArrayI object.

Reimplemented from TArray.

Reimplemented in TH1I, TH2I, and TH3I.

Definition at line 148 of file TArrayI.cxx.

◆ StreamerNVirtual()

void TArrayI::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 55 of file TArrayI.h.

Member Data Documentation

◆ fArray

Int_t* TArrayI::fArray

Definition at line 30 of file TArrayI.h.

Libraries for TArrayI:

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