library: libTree
#include "TEntryListBlock.h"

TEntryListBlock


class description - header file - source file
viewCVS header - viewCVS source

class TEntryListBlock: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TEntryListBlock()
TEntryListBlock(const TEntryListBlock& eblock)
~TEntryListBlock()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
Int_tContains(Int_t entry)
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
Bool_tEnter(Int_t entry)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tGetEntry(Int_t entry)
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
Int_tGetNPassed()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
Int_tGetType()
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
Int_tMerge(TEntryListBlock* block)
Int_tNext()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TEntryListBlock&operator=(const TEntryListBlock&)
voidOptimizeStorage()
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
voidPrintWithShift(Int_t shift) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
Bool_tRemove(Int_t entry)
voidTObject::ResetBit(UInt_t f)
voidResetIndices()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
voidTransform(Bool_t dir, UShort_t* indexnew)

Data Members

public:
enum { kBlockSize
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tfNPassednumber of entries in the entry list
Int_tfNsize of fIndices for I/O =fNPassed for list, fBlockSize for bits
UShort_t*fIndices[fN]
Int_tfType0 - bits, 1 - list
Bool_tfPassing1 - stores entries that belong to the list
UShort_tfCurrent! to fasten Enter() and Contains() in list mode
Int_tfLastIndexQueried! to optimize GetEntry() in a loop
Int_tfLastIndexReturned! to optimize GetEntry() in a loop

Class Description

 TEntryListBlock

 Used internally in TEntryList to store the entry numbers. 

 There are 2 ways to represent entry numbers in a TEntryListBlock:
 1) as bits, where passing entry numbers are assigned 1, not passing - 0
 2) as a simple array of entry numbers
 In both cases, a UShort_t* is used. The second option is better in case
 less than 1/16 of entries passes the selection, and the representation can be
 changed by calling OptimizeStorage() function. 
 When the block is being filled, it's always stored as bits, and the OptimizeStorage()
 function is called by TEntryList when it starts filling the next block. If
 Enter() or Remove() is called after OptimizeStorage(), representation is 
 again changed to 1).

 Operations on blocks (see also function comments):
 - Merge() - adds all entries from one block to the other. If the first block 
             uses array representation, it's changed to bits representation only
             if the total number of passing entries is still less than kBlockSize
 - GetEntry(n) - returns n-th non-zero entry.
 - Next()      - return next non-zero entry. In case of representation 1), Next()
                 is faster than GetEntry()


TEntryListBlock()
default c-tor
TEntryListBlock(const TEntryListBlock &eblock)
copy c-tor
~TEntryListBlock()
destructor
Bool_t Enter(Int_t entry)
If the block has already been optimized and the entries
are stored as a list and not as bits, trying to enter a new entry
will make the block switch to bits representation
Bool_t Remove(Int_t entry)
Remove entry #entry
Int_t Contains(Int_t entry)
true if the block contains entry #entry
Int_t Merge(TEntryListBlock *block)
Merge with the other block
Int_t GetEntry(Int_t entry)
Return entry #entry
See also Next()
Int_t Next()
Return the next non-zero entry
Faster than GetEntry() function
void Print(const Option_t *option)
Print the entries in this block
void PrintWithShift(Int_t shift)
print the indices of this block + shift (used from TEntryList::Print()) to 
print the corrent values
void OptimizeStorage()
if there are < kBlockSize entries, change to an array representation
void Transform(Bool_t dir, UShort_t *indexnew)
Transform the existing fIndices
dir=0 - transform from bits to a list
dir=1 - tranform from a list to bits
void ResetIndices()
{fLastIndexQueried = -1, fLastIndexReturned = -1;}
Int_t GetType()
{ return fType; }
Int_t GetNPassed()
{ return fNPassed; }

Author: Anna Kreshuk 27/10/2006
Last update: root/tree:$Name: $:$Id: TEntryListBlock.cxx,v 1.4 2006/11/30 07:49:39 brun Exp $
Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

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.