ROOT logo
ROOT » CORE » CONT » TArrayL

class TArrayL: public TArray


TArrayL

Array of longs (32 or 64 bits per element).


Function Members (Methods)

public:
TArrayL()
TArrayL(Int_t n)
TArrayL(const TArrayL& array)
TArrayL(Int_t n, const Long_t* array)
virtual~TArrayL()
voidAddAt(Long_t c, Int_t i)
voidAdopt(Int_t n, Long_t* array)
Long_tAt(Int_t i) const
static TClass*Class()
static TClass*TArray::Class()
voidCopy(TArrayL& array) const
const Long_t*GetArray() const
Long_t*GetArray()
virtual Double_tGetAt(Int_t i) const
virtual Double_tTArray::GetAt(Int_t i) const
Int_tTArray::GetSize() const
Stat_tGetSum() const
virtual TClass*IsA() const
TArrayL&operator=(const TArrayL& rhs)
TArray&TArray::operator=(const TArray& rhs)
Long_t&operator[](Int_t i)
Long_toperator[](Int_t i) const
static TArray*TArray::ReadArray(TBuffer& b, const TClass* clReq)
voidReset()
voidReset(Long_t val)
virtual voidSet(Int_t n)
virtual voidTArray::Set(Int_t n)
voidSet(Int_t n, const Long_t* array)
virtual voidSetAt(Double_t v, Int_t i)
virtual voidTArray::SetAt(Double_t v, Int_t i)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTArray::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
virtual voidTArray::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTArray::StreamerNVirtual(TBuffer& b)
static voidTArray::WriteArray(TBuffer& b, const TArray* a)
protected:
Bool_tTArray::BoundsOk(const char* where, Int_t at) const
Bool_tTArray::OutOfBoundsError(const char* where, Int_t i) const

Data Members

public:
Long_t*fArray[fN] Array of fN longs
Int_tTArray::fNNumber of array elements

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TArrayL()
 Default TArrayL ctor.
TArrayL(Int_t n)
 Create TArrayL object and set array size to n longs.
TArrayL(Int_t n, const Long_t* array)
 Create TArrayL object and initialize it with values of array.
TArrayL(const TArrayL &array)
 Copy constructor.
TArrayL & operator=(const TArrayL& rhs)
 TArrayL assignment operator.
~TArrayL()
 Delete TArrayL object.
void Adopt(Int_t n, Long_t* array)
 Adopt array arr into TArrayL, i.e. don't copy arr but use it directly
 in TArrayL. User may not delete arr, TArrayL dtor will do it.
void AddAt(Long_t c, Int_t i)
 Add long c at position i. Check for out of bounds.
void Set(Int_t n)
 Set size of this array to n longs.
 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 Long_t* array)
 Set size of this array to n longs and set the contents.
 This function should not be called if the array was declared via Adopt.
void Streamer(TBuffer& b)
 Stream a TArrayL object.
Long_t At(Int_t i) const
Long_t & operator[](Int_t i)
Long_t operator[](Int_t i)
void Copy(TArrayL& array) const
{array.Set(fN,fArray);}
const Long_t * GetArray()
{ return fArray; }
Long_t * GetArray()
{ return fArray; }
Double_t GetAt(Int_t i) const
{ return At(i); }
Stat_t GetSum() const
{Stat_t sum=0; for (Int_t i=0;i<fN;i++) sum+=fArray[i]; return sum;}
void Reset()
{memset(fArray, 0, fN*sizeof(Long_t));}
void Reset(Long_t val)
{for (Int_t i=0;i<fN;i++) fArray[i] = val;}
void SetAt(Double_t v, Int_t i)
{ AddAt((Long_t)v, i); }