class TEveChunkManager

 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)

public:
TEveChunkManager()
TEveChunkManager(Int_t atom_size, Int_t chunk_size)
virtual~TEveChunkManager()
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
Char_t*NewAtom()
Char_t*NewChunk()
voidRefit()
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
protected:
voidReleaseChunks()
private:
TEveChunkManager(const TEveChunkManager&)
TEveChunkManager&operator=(const TEveChunkManager&)

Data Members

protected:
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)
 Constructor.
~TEveChunkManager()
 Destructor.
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
 chunk.
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 change: root/eve:$Id: TEveChunkManager.h 21807 2008-01-22 15:46:23Z matevz $
Last generated: 2008-06-25 08:36
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.