ROOT logo
ROOT » TREE » TREE » TBasket

class TBasket: public TKey


  Manages buffers for branches of a Tree.
  See picture in TTree.

Function Members (Methods)

public:
TBasket()
TBasket(TDirectory* motherDir)
TBasket(const char* name, const char* title, TBranch* branch)
virtual~TBasket()
voidTObject::AbstractMethod(const char* method) const
virtual voidAdjustSize(Int_t newsize)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTKey::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
Long64_tCopyTo(TFile* to)
virtual voidTKey::Delete(Option_t* option = "")
virtual voidTKey::DeleteBuffer()
virtual voidDeleteEntryOffset()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual Int_tDropBuffers()
virtual voidTObject::Dump() constMENU
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 voidTKey::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TBranch*GetBranch() const
virtual char*TKey::GetBuffer() const
TBuffer*TKey::GetBufferRef() const
Int_tGetBufferSize() const
virtual const char*TKey::GetClassName() const
Short_tTKey::GetCycle() const
const TDatime&TKey::GetDatime() const
Int_t*GetDisplacement() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_t*GetEntryOffset() const
Int_tGetEntryPointer(Int_t Entry)
TFile*TKey::GetFile() const
virtual const char*TKey::GetIconName() const
Short_tTKey::GetKeep() const
Int_tTKey::GetKeylen() const
Int_tGetLast() const
TDirectory*TKey::GetMotherDir() const
virtual const char*TNamed::GetName() const
Int_tTKey::GetNbytes() const
Int_tGetNevBuf() const
Int_tGetNevBufSize() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
Int_tTKey::GetObjlen() const
virtual Option_t*TObject::GetOption() const
virtual Long64_tTKey::GetSeekKey() const
virtual Long64_tTKey::GetSeekPdir() const
virtual const char*TKey::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Int_tTKey::GetVersion() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTKey::Hash() const
virtual voidTKey::IncrementPidOffset(UShort_t offset)
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() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTKey::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTKey::Keep()
Int_tLoadBasketBuffers(Long64_t pos, Int_t len, TFile* file, TTree* tree = 0)
virtual voidTKey::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidMoveEntries(Int_t dentries)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrepareBasket(Long64_t)
virtual voidTKey::Print(Option_t* option = "") const
virtual Int_tTKey::Read(TObject* obj)
Int_tReadBasketBuffers(Long64_t pos, Int_t len, TFile* file)
Int_tReadBasketBytes(Long64_t pos, TFile* file)
virtual voidTKey::ReadBuffer(char*& buffer)
virtual Bool_tTKey::ReadFile()
voidTKey::ReadKeyBuffer(char*& buffer)
virtual TObject*TKey::ReadObj()
virtual void*TKey::ReadObjectAny(const TClass* expectedClass)
virtual TObject*TKey::ReadObjWithBuffer(char* bufferRead)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidReset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetBranch(TBranch* branch)
virtual voidTKey::SetBuffer()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidTKey::SetMotherDir(TDirectory* dir)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNevBufSize(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTKey::SetParent(const TObject* parent)
virtual voidSetReadMode()
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetWriteMode()
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTKey::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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
voidUpdate(Int_t newlast)
virtual voidUpdate(Int_t newlast, Int_t skipped)
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
virtual Int_tWriteBuffer()
virtual Int_tTKey::WriteFile(Int_t cycle = 1, TFile* f = 0)
protected:
voidTKey::Build(TDirectory* motherDir, const char* classname, Long64_t filepos)
virtual voidTKey::Create(Int_t nbytes, TFile* f = 0)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
virtual Int_tTKey::Read(const char* name)
virtual Int_tTKey::WriteFileKeepBuffer(TFile* f = 0)

Data Members

protected:
TBranch*fBranchPointer to the basket support branch
char*TKey::fBufferObject buffer
TBuffer*TKey::fBufferRefPointer to the TBuffer object
Int_tfBufferSizefBuffer length in bytes
TStringTKey::fClassNameObject Class name
TBuffer*fCompressedBufferRef! Compressed buffer.
Short_tTKey::fCycleCycle number
TDatimeTKey::fDatimeDate/Time of insertion in file
Int_t*fDisplacement![fNevBuf] Displacement of entries in fBuffer(TKey)
Int_t*fEntryOffset[fNevBuf] Offset of entries in fBuffer(TKey)
Bool_tfHeaderOnlyTrue when only the basket header must be read/written
Short_tTKey::fKeylenNumber of bytes for the key itself
Int_tfLastPointer to last used byte in basket
Int_tfLastWriteBufferSize! Size of the buffer last time we wrote it to disk
Int_tTKey::fLeftNumber of bytes left in current segment
TDirectory*TKey::fMotherDir! pointer to mother directory
TStringTNamed::fNameobject identifier
Int_tTKey::fNbytesNumber of bytes for the object on file
Int_tfNevBufNumber of entries in basket
Int_tfNevBufSizeLength in Int_t of fEntryOffset OR fixed length of each entry if fEntryOffset is null!
Int_tTKey::fObjlenLength of uncompressed object in bytes
Bool_tfOwnsCompressedBuffer! Whether or not we own the compressed buffer.
UShort_tTKey::fPidOffset! Offset to be added to the pid index in this key/buffer. This is actually saved in the high bits of fSeekPdir
Long64_tTKey::fSeekKeyLocation of object on file
Long64_tTKey::fSeekPdirLocation of parent directory on file
TStringTNamed::fTitleobject title
Int_tTKey::fVersionKey version identifier

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TBasket()
 Default contructor.
TBasket(TDirectory* motherDir)
 Constructor used during reading.
TBasket(const char* name, const char* title, TBranch* branch)
 Basket normal constructor, used during writing.
~TBasket()
 Basket destructor.
void AdjustSize(Int_t newsize)
 Increase the size of the current fBuffer up to newsize.
Long64_t CopyTo(TFile* to)
 Copy the basket of this branch onto the file to.
void DeleteEntryOffset()
Int_t DropBuffers()
 Drop buffers of this basket if it is not the current basket.
Int_t GetEntryPointer(Int_t Entry)
 Get pointer to buffer for internal entry.
Int_t LoadBasketBuffers(Long64_t pos, Int_t len, TFile* file, TTree* tree = 0)
 Load basket buffers in memory without unziping.
 This function is called by TTreeCloner.
 The function returns 0 in case of success, 1 in case of error.
void MoveEntries(Int_t dentries)
 Remove the first dentries of this basket, moving entries at
 dentries to the start of the buffer.
Int_t ReadBasketBuffersUncompressedCase()
 By-passing buffer unzipping has been requested and is
 possible (only 1 entry in this basket).
Int_t ReadBasketBuffersUnzip(char* , Int_t , Bool_t , TFile* )
 We always create the TBuffer for the basket but it hold the buffer from the cache.
void inline InitializeCompressedBuffer(Int_t len, TFile* file)
 Initialize the compressed buffer; either from the TTree or create a local one.
Int_t ReadBasketBuffers(Long64_t pos, Int_t len, TFile* file)
 Read basket buffers in memory and cleanup.

 Read a basket buffer. Check if buffers of previous ReadBasket
 should not be dropped. Remember, we keep buffers in memory up to
 fMaxVirtualSize.
 The function returns 0 in case of success, 1 in case of error
 This function was modified with the addition of the parallel
 unzipping, it will try to get the unzipped file from the cache
 receiving only a pointer to that buffer (so we shall not
 delete that pointer), although we get a new buffer in case
 it's not found in the cache.
 There is a lot of code duplication but it was necesary to assure
 the expected behavior when there is no cache.
Int_t ReadBasketBytes(Long64_t pos, TFile* file)
 Read basket buffers in memory and cleanup

 Read first bytes of a logical record starting at position pos
 return record length (first 4 bytes of record).
void Reset()
 Reset the basket to the starting state. i.e. as it was after calling
 the constructor (and potentially attaching a TBuffer.)
 Reduce memory used by fEntryOffset and the TBuffer if needed ..
void SetReadMode()
 Set read mode of basket.
void SetWriteMode()
 Set write mode of basket.
void Streamer(TBuffer& )
 Stream a class object.
void Update(Int_t newlast, Int_t skipped)
 Update basket header and EntryOffset table.
Int_t WriteBuffer()
 Write buffer of this basket on the current file.

 The function returns the number of bytes committed to the memory.
 If a write error occurs, the number of bytes returned is -1.
 If no data are written, the number of bytes returned is 0.

TBasket(const TBasket& )
TBasket& operator=(const TBasket& )
TBranch * GetBranch() const
{return fBranch;}
Int_t GetBufferSize() const
{return fBufferSize;}
Int_t * GetDisplacement() const
{return fDisplacement;}
Int_t * GetEntryOffset() const
{return fEntryOffset;}
Int_t GetNevBuf() const
{return fNevBuf;}
Int_t GetNevBufSize() const
{return fNevBufSize;}
Int_t GetLast() const
{return fLast;}
void PrepareBasket(Long64_t )
{}
void SetBranch(TBranch* branch)
{ fBranch = branch; }
void SetNevBufSize(Int_t n)
void Update(Int_t newlast)
{ Update(newlast,newlast); }