ROOT » GRAF3D » EVE » TEveChunkManager

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)

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) const
Int_tSize() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TEveChunkManager(Int_t atom_size, Int_t chunk_size)
Int_tVecSize() const

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.
 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() const
{ return fS; }
Int_t N() const
{ return fN; }
Int_t Size() const
{ return fSize; }
Int_t VecSize() const
{ return fVecSize; }
Int_t Capacity() const
{ 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; }