class TArrayS: public TArray


TArrayS

Array of shorts (16 bits per element).


Function Members (Methods)

public:
TArrayS()
TArrayS(Int_t n)
TArrayS(const TArrayS& array)
TArrayS(Int_t n, const Short_t* array)
virtual~TArrayS()
voidAddAt(Short_t c, Int_t idx)
voidAdopt(Int_t n, Short_t* array)
Short_tAt(Int_t i) const
static TClass*Class()
voidCopy(TArrayS& array) const
const Short_t*GetArray() const
Short_t*GetArray()
virtual Double_tGetAt(Int_t i) const
Int_tTArray::GetSize() const
Stat_tGetSum() const
virtual TClass*IsA() const
TArrayS&operator=(const TArrayS& rhs)
Short_t&operator[](Int_t i)
Short_toperator[](Int_t i) const
static TArray*TArray::ReadArray(TBuffer& b, const TClass* clReq)
voidReset()
voidReset(Short_t val)
virtual voidSet(Int_t n)
voidSet(Int_t n, const Short_t* array)
virtual voidSetAt(Double_t v, Int_t i)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(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:
Short_t*fArray[fN] Array of fN shorts
Int_tTArray::fNNumber of array elements

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

Author: Rene Brun 06/03/95
Last change: root/cont:$Id: TArrayS.h 20882 2007-11-19 11:31:26Z rdm $
Last generated: 2008-06-25 08:34
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.