ROOT  6.06/09
Reference Guide
Public Member Functions | Public Attributes | List of all members
TArrayS Class Reference

Array of shorts (16 bits per element).

Definition at line 29 of file TArrayS.h.

Public Member Functions

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

Public Attributes

Short_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
 

#include <TArrayS.h>

+ Inheritance diagram for TArrayS:
+ Collaboration diagram for TArrayS:

Constructor & Destructor Documentation

TArrayS::TArrayS ( )
TArrayS::TArrayS ( Int_t  n)

Create TArrayS object and set array size to n shorts.

Definition at line 33 of file TArrayS.cxx.

TArrayS::TArrayS ( Int_t  n,
const Short_t array 
)

Create TArrayS object and initialize it with values of array.

Definition at line 42 of file TArrayS.cxx.

TArrayS::TArrayS ( const TArrayS array)

Copy constructor.

Definition at line 51 of file TArrayS.cxx.

TArrayS::~TArrayS ( )
virtual

Delete TArrayS object.

Definition at line 70 of file TArrayS.cxx.

Member Function Documentation

void TArrayS::AddAt ( Short_t  c,
Int_t  i 
)

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

Definition at line 92 of file TArrayS.cxx.

Referenced by SetAt().

void TArrayS::Adopt ( Int_t  n,
Short_t arr 
)

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.

Definition at line 80 of file TArrayS.cxx.

Short_t TArrayS::At ( Int_t  i) const
inline

Definition at line 80 of file TArrayS.h.

Referenced by GetAt(), and rr_arrays_new().

void TArrayS::Copy ( TArrayS array) const
inline

Definition at line 44 of file TArrayS.h.

Referenced by TH1S::TH1S(), TH2S::TH2S(), and TH3S::TH3S().

const Short_t* TArrayS::GetArray ( ) const
inline

Definition at line 45 of file TArrayS.h.

Referenced by TGRegion::TGRegion().

Short_t* TArrayS::GetArray ( )
inline

Definition at line 46 of file TArrayS.h.

Double_t TArrayS::GetAt ( Int_t  i) const
inlinevirtual

Implements TArray.

Definition at line 47 of file TArrayS.h.

Stat_t TArrayS::GetSum ( ) const
inline

Definition at line 48 of file TArrayS.h.

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

TArrayS assignment operator.

Definition at line 60 of file TArrayS.cxx.

Short_t & TArrayS::operator[] ( Int_t  i)
inline

Definition at line 86 of file TArrayS.h.

Short_t TArrayS::operator[] ( Int_t  i) const
inline

Definition at line 93 of file TArrayS.h.

void TArrayS::Reset ( void  )
inline

Definition at line 49 of file TArrayS.h.

Referenced by TH2S::Reset(), TH3S::Reset(), and TH1S::Reset().

void TArrayS::Reset ( Short_t  val)
inline

Definition at line 50 of file TArrayS.h.

void TArrayS::Set ( Int_t  n)
virtual

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.

Implements TArray.

Definition at line 104 of file TArrayS.cxx.

Referenced by Copy(), operator=(), TH2S::SetBinsLength(), TH3S::SetBinsLength(), TH1S::SetBinsLength(), TArrayS(), TH1S::TH1S(), TH2S::TH2S(), and TH3S::TH3S().

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

Definition at line 128 of file TArrayS.cxx.

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

Implements TArray.

Definition at line 53 of file TArrayS.h.

Member Data Documentation

Short_t* TArrayS::fArray

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