class TEveChunkManager


 Vector-like container with chunked memory allocation.

 Allocation chunk can accommodate fN atoms of byte-size fS each.
 The chunks themselves are TArrayCs and are stored in a std::vector<TArrayC*>.
 Holes in the structure are not supported, neither is removal of atoms.
 The structure can be Refit() to occupy a single contiguous array.

Function Members (Methods)

TEveChunkManager(Int_t atom_size, Int_t chunk_size)
Char_t*Atom(Int_t idx) const
Int_tCapacity() const
Char_t*Chunk(Int_t chk) const
static TClass*Class()
virtual TClass*IsA() const
Int_tN() const
Int_tNAtoms(Int_t chk) const
voidReset(Int_t atom_size, Int_t chunk_size)
Int_tS() const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
Int_tSize() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
Int_tVecSize() const
TEveChunkManager(const TEveChunkManager&)
TEveChunkManager&operator=(const TEveChunkManager&)

Data Members

Int_tfCapacityAvailable capacity within the chunks
vector<TArrayC*>fChunksMemory blocks
Int_tfNNumber of atoms in a chunk
Int_tfSSize of atom
Int_tfSizeSize of container, number of atoms
Int_tfVecSizeNumber of allocated chunks

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void ReleaseChunks()
 Release all memory chunks.
TEveChunkManager(const TEveChunkManager& )
 Default constructor.
 Call reset for initialization.
TEveChunkManager(Int_t atom_size, Int_t chunk_size)
void Reset(Int_t atom_size, Int_t chunk_size)
 Empty the container and reset it with given atom and chunk sizes.
void Refit()
 Refit the container so that all current data fits into a single
Char_t* NewChunk()
 Allocate a new memory chunk and register it.
Char_t* NewAtom()
TEveChunkManager(const TEveChunkManager& )
TEveChunkManager& operator=(const TEveChunkManager& )
Int_t S()
{ return fS; }
Int_t N()
{ return fN; }
Int_t Size()
{ return fSize; }
Int_t VecSize()
{ return fVecSize; }
Int_t Capacity()
{ return fCapacity; }
Char_t* Atom(Int_t idx) const
{ return fChunks[idx/fN]->fArray + idx%fN*fS; }
Char_t* Chunk(Int_t chk) const
{ return fChunks[chk]->fArray; }
Int_t NAtoms(Int_t chk) const
{ return (chk < fVecSize-1) ? fN : (fSize-1)%fN + 1; }

Last update: root/eve:$Id: TEveChunkManager.h 21054 2007-11-26 18:00:41Z matevz $
Copyright (C) 1995-2007, 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.