// $Header$ #include "Plex.h" using namespace Reve; //______________________________________________________________________ // Plex // // A group of containers with chunked memory allocation. // //______________________________________________________________________ // VoidCPlex // // Non-structured (Void) Complete Plex. // Allocation chunk can accommodate fN atoms of byte-size fS each. // The chunks themselves are TArrayCs and are stored in a std::vector. // Holes in the structure are not supported, neither is removal of atoms. // The structure can be Refit() to occupy a single contiguous array. // void VoidCPlex::ReleaseChunks() { for (Int_t i=0; ifArray; for (Int_t i=0; ifArray, size); pos += size; } ReleaseChunks(); fN = fCapacity = fSize; fVecSize = 1; fChunks.push_back(one); } /**************************************************************************/ Char_t* VoidCPlex::NewChunk() { fChunks.push_back(new TArrayC(fS*fN)); ++fVecSize; fCapacity += fN; return fChunks.back()->fArray; } /**************************************************************************/ /**************************************************************************/