ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
TEveChunkManager Class Reference

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.

Definition at line 27 of file TEveChunkManager.h.

Classes

struct  iterator
 

Public Member Functions

 TEveChunkManager ()
 Default constructor. More...
 
 TEveChunkManager (Int_t atom_size, Int_t chunk_size)
 Constructor. More...
 
virtual ~TEveChunkManager ()
 Destructor. More...
 
void Reset (Int_t atom_size, Int_t chunk_size)
 Empty the container and reset it with given atom and chunk sizes. More...
 
void Refit ()
 Refit the container so that all current data fits into a single chunk. More...
 
Int_t S () const
 
Int_t N () const
 
Int_t Size () const
 
Int_t VecSize () const
 
Int_t Capacity () const
 
Char_tAtom (Int_t idx) const
 
Char_tChunk (Int_t chk) const
 
Int_t NAtoms (Int_t chk) const
 
Char_tNewAtom ()
 
Char_tNewChunk ()
 Allocate a new memory chunk and register it. More...
 
 ClassDef (TEveChunkManager, 1)
 

Protected Member Functions

void ReleaseChunks ()
 Release all memory chunks. More...
 

Protected Attributes

Int_t fS
 
Int_t fN
 
Int_t fSize
 
Int_t fVecSize
 
Int_t fCapacity
 
std::vector< TArrayC * > fChunks
 

Private Member Functions

 TEveChunkManager (const TEveChunkManager &)
 
TEveChunkManageroperator= (const TEveChunkManager &)
 

#include <TEveChunkManager.h>

Inheritance diagram for TEveChunkManager:
[legend]

Constructor & Destructor Documentation

TEveChunkManager::TEveChunkManager ( const TEveChunkManager )
private
TEveChunkManager::TEveChunkManager ( )

Default constructor.

Call reset for initialization.

Definition at line 41 of file TEveChunkManager.cxx.

TEveChunkManager::TEveChunkManager ( Int_t  atom_size,
Int_t  chunk_size 
)

Constructor.

Definition at line 50 of file TEveChunkManager.cxx.

TEveChunkManager::~TEveChunkManager ( )
virtual

Destructor.

Definition at line 59 of file TEveChunkManager.cxx.

Member Function Documentation

Char_t* TEveChunkManager::Atom ( Int_t  idx) const
inline
Int_t TEveChunkManager::Capacity ( ) const
inline

Definition at line 58 of file TEveChunkManager.h.

Char_t* TEveChunkManager::Chunk ( Int_t  chk) const
inline
TEveChunkManager::ClassDef ( TEveChunkManager  ,
 
)
Int_t TEveChunkManager::N ( ) const
inline

Definition at line 54 of file TEveChunkManager.h.

Referenced by TEveBoxSet::Reset().

Int_t TEveChunkManager::NAtoms ( Int_t  chk) const
inline
Char_t * TEveChunkManager::NewAtom ( )
inline
Char_t * TEveChunkManager::NewChunk ( )

Allocate a new memory chunk and register it.

Definition at line 101 of file TEveChunkManager.cxx.

Referenced by NewAtom().

TEveChunkManager& TEveChunkManager::operator= ( const TEveChunkManager )
private
void TEveChunkManager::Refit ( )

Refit the container so that all current data fits into a single chunk.

Definition at line 79 of file TEveChunkManager.cxx.

Referenced by TEveDigitSet::RefitPlex(), and TEveStraightLineSetProjected::UpdateProjection().

void TEveChunkManager::ReleaseChunks ( )
protected

Release all memory chunks.

Definition at line 30 of file TEveChunkManager.cxx.

Referenced by Refit(), Reset(), and ~TEveChunkManager().

void TEveChunkManager::Reset ( Int_t  atom_size,
Int_t  chunk_size 
)

Empty the container and reset it with given atom and chunk sizes.

Definition at line 67 of file TEveChunkManager.cxx.

Referenced by TEveBoxSet::Reset(), TEveQuadSet::Reset(), and TEveStraightLineSetProjected::UpdateProjection().

Int_t TEveChunkManager::S ( ) const
inline
Int_t TEveChunkManager::Size ( ) const
inline
Int_t TEveChunkManager::VecSize ( ) const
inline

Member Data Documentation

Int_t TEveChunkManager::fCapacity
protected

Definition at line 39 of file TEveChunkManager.h.

Referenced by Capacity(), NewAtom(), NewChunk(), Refit(), and Reset().

std::vector<TArrayC*> TEveChunkManager::fChunks
protected

Definition at line 41 of file TEveChunkManager.h.

Referenced by Atom(), Chunk(), NewChunk(), Refit(), and ReleaseChunks().

Int_t TEveChunkManager::fN
protected

Definition at line 35 of file TEveChunkManager.h.

Referenced by Atom(), N(), NAtoms(), NewChunk(), Refit(), and Reset().

Int_t TEveChunkManager::fS
protected

Definition at line 34 of file TEveChunkManager.h.

Referenced by Atom(), NewChunk(), Refit(), Reset(), and S().

Int_t TEveChunkManager::fSize
protected

Definition at line 37 of file TEveChunkManager.h.

Referenced by NAtoms(), NewAtom(), Refit(), Reset(), and Size().

Int_t TEveChunkManager::fVecSize
protected

Definition at line 38 of file TEveChunkManager.h.

Referenced by NAtoms(), NewChunk(), Refit(), ReleaseChunks(), Reset(), and VecSize().

Collaboration diagram for TEveChunkManager:
[legend]

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