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

Array of chars or bytes (8 bits per element).

Definition at line 27 of file TArrayC.h.

Public Member Functions

 TArrayC ()
 Default TArrayC ctor.
 TArrayC (const TArrayC &array)
 Copy constructor.
 TArrayC (Int_t n)
 Create TArrayC object and set array size to n chars.
 TArrayC (Int_t n, const Char_t *array)
 Create TArrayC object and initialize it with values of array.
virtual ~TArrayC ()
 Delete TArrayC object.
void AddAt (Char_t c, Int_t i)
 Add char c at position i. Check for out of bounds.
void Adopt (Int_t n, Char_t *array)
 Adopt array arr into TArrayC, i.e.
Char_t At (Int_t i) const
void Copy (TArrayC &array) const
Char_tGetArray ()
const Char_tGetArray () const
Double_t GetAt (Int_t i) const override
Int_t GetSize () const
Stat_t GetSum () const
TClassIsA () const override
TArrayCoperator= (const TArrayC &rhs)
 TArrayC assignment operator.
Char_toperator[] (Int_t i)
Char_t operator[] (Int_t i) const
void Reset (Char_t val=0)
void Set (Int_t n) override
 Set size of this array to n chars.
void Set (Int_t n, const Char_t *array)
 Set size of this array to n chars and set the contents.
void SetAt (Double_t v, Int_t i) override
std::size_t size () const
void Streamer (TBuffer &) override
 Stream a TArrayC object.
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 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

Char_tfArray
Int_t fN

Protected Member Functions

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 <TArrayC.h>

Inheritance diagram for TArrayC:
TArray TH1C TH2C TH3C TGLTH3Composition

Constructor & Destructor Documentation

◆ TArrayC() [1/4]

TArrayC::TArrayC ( )

Default TArrayC ctor.

Definition at line 25 of file TArrayC.cxx.

◆ TArrayC() [2/4]

TArrayC::TArrayC ( Int_t n)

Create TArrayC object and set array size to n chars.

Definition at line 33 of file TArrayC.cxx.

◆ TArrayC() [3/4]

TArrayC::TArrayC ( Int_t n,
const Char_t * array )

Create TArrayC object and initialize it with values of array.

Definition at line 42 of file TArrayC.cxx.

◆ TArrayC() [4/4]

TArrayC::TArrayC ( const TArrayC & array)

Copy constructor.

Definition at line 51 of file TArrayC.cxx.

◆ ~TArrayC()

TArrayC::~TArrayC ( )
virtual

Delete TArrayC object.

Definition at line 70 of file TArrayC.cxx.

Member Function Documentation

◆ AddAt()

void TArrayC::AddAt ( Char_t c,
Int_t i )

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

Definition at line 92 of file TArrayC.cxx.

◆ Adopt()

void TArrayC::Adopt ( Int_t n,
Char_t * arr )

Adopt array arr into TArrayC, i.e.

don't copy arr but use it directly in TArrayC. User may not delete arr, TArrayC dtor will do it.

Definition at line 80 of file TArrayC.cxx.

◆ At()

Char_t TArrayC::At ( Int_t i) const
inline

Definition at line 78 of file TArrayC.h.

◆ BoundsOk()

Bool_t TArray::BoundsOk ( const char * where,
Int_t at ) const
inlineprotectedinherited

Definition at line 79 of file TArray.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 54 of file TArrayC.h.

◆ Copy()

void TArrayC::Copy ( TArrayC & array) const
inline

Definition at line 42 of file TArrayC.h.

◆ DeclFileName()

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

Definition at line 54 of file TArrayC.h.

◆ GetArray() [1/2]

Char_t * TArrayC::GetArray ( )
inline

Definition at line 44 of file TArrayC.h.

◆ GetArray() [2/2]

const Char_t * TArrayC::GetArray ( ) const
inline

Definition at line 43 of file TArrayC.h.

◆ GetAt()

Double_t TArrayC::GetAt ( Int_t i) const
inlineoverridevirtual

Implements TArray.

Definition at line 45 of file TArrayC.h.

◆ GetSize()

Int_t TArray::GetSize ( ) const
inlineinherited

Definition at line 47 of file TArray.h.

◆ GetSum()

Stat_t TArrayC::GetSum ( ) const
inline

Definition at line 46 of file TArrayC.h.

◆ IsA()

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

Reimplemented from TArray.

Reimplemented in TGLTH3Composition, TH1C, TH2C, and TH3C.

Definition at line 54 of file TArrayC.h.

◆ operator=()

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

TArrayC assignment operator.

Definition at line 60 of file TArrayC.cxx.

◆ operator[]() [1/2]

Char_t & TArrayC::operator[] ( Int_t i)
inline

Definition at line 84 of file TArrayC.h.

◆ operator[]() [2/2]

Char_t TArrayC::operator[] ( Int_t i) const
inline

Definition at line 91 of file TArrayC.h.

◆ OutOfBoundsError()

Bool_t TArray::OutOfBoundsError ( const char * where,
Int_t i ) const
protectedinherited

Generate an out-of-bounds error. Always returns false.

Definition at line 29 of file TArray.cxx.

◆ ReadArray()

TArray * TArray::ReadArray ( TBuffer & b,
const TClass * clReq )
staticinherited

Read TArray object from buffer.

Simplified version of TBuffer::ReadObject (does not keep track of multiple references to same array).

Definition at line 40 of file TArray.cxx.

◆ Reset()

void TArrayC::Reset ( Char_t val = 0)
inline

Definition at line 47 of file TArrayC.h.

◆ Set() [1/2]

void TArrayC::Set ( Int_t n)
overridevirtual

Set size of this array to n chars.

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 TArrayC.cxx.

◆ Set() [2/2]

void TArrayC::Set ( Int_t n,
const Char_t * array )

Set size of this array to n chars and set the contents.

This function should not be called if the array was declared via Adopt.

Definition at line 131 of file TArrayC.cxx.

◆ SetAt()

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

Implements TArray.

Definition at line 50 of file TArrayC.h.

◆ size()

std::size_t TArray::size ( ) const
inlineinherited

Definition at line 50 of file TArray.h.

◆ Streamer()

void TArrayC::Streamer ( TBuffer & b)
overridevirtual

Stream a TArrayC object.

Reimplemented from TArray.

Reimplemented in TGLTH3Composition, TH1C, TH2C, and TH3C.

Definition at line 147 of file TArrayC.cxx.

◆ StreamerNVirtual()

void TArrayC::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 54 of file TArrayC.h.

◆ WriteArray()

void TArray::WriteArray ( TBuffer & b,
const TArray * a )
staticinherited

Write TArray object to buffer.

Simplified version of TBuffer::WriteObject (does not keep track of multiple references to the same array).

Definition at line 81 of file TArray.cxx.

Member Data Documentation

◆ fArray

Char_t* TArrayC::fArray

Definition at line 30 of file TArrayC.h.

◆ fN

Int_t TArray::fN
inherited

Definition at line 38 of file TArray.h.


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