class TExMap: public TObject


TExMap

This class stores a (key,value) pair using an external hash.
The (key,value) are Long_t's and therefore can contain object
pointers or any longs. The map uses an open addressing hashing
method (linear probing).


Function Members (Methods)

public:
TExMap(Int_t mapSize = 100)
TExMap(const TExMap& map)
virtual~TExMap()
voidTObject::AbstractMethod(const char* method) const
voidAdd(Long_t key, Long_t value)
voidAdd(ULong_t hash, Long_t key, Long_t value)
voidAddAt(UInt_t slot, ULong_t hash, Long_t key, Long_t value)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Int_tCapacity() const
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
virtual voidTObject::Copy(TObject& object) const
virtual voidDelete(Option_t* opt = "")
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
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()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetSize() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Long_tGetValue(Long_t key)
Long_tGetValue(ULong_t hash, Long_t key)
Long_tGetValue(ULong_t hash, Long_t key, UInt_t& slot)
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
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)
Long_t&operator()(Long_t key)
Long_t&operator()(ULong_t hash, Long_t key)
TExMap&operator=(const TExMap&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRemove(Long_t key)
voidRemove(ULong_t hash, Long_t key)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& 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()
private:
voidExpand(Int_t newsize)
Int_tFindElement(ULong_t hash, Long_t key)
voidFixCollisions(Int_t index)
Bool_tHighWaterMark()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
Int_tfSize
TExMap::Assoc_t*fTable
Int_tfTally

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TExMap(Int_t mapSize)
 Create a TExMap.
TExMap(const TExMap &map)
 Copy constructor.
TExMap& operator=(const TExMap& )
 Assignement operator.
~TExMap()
 Delete TExMap.
void Add(ULong_t hash, Long_t key, Long_t value)
 Add an (key,value) pair to the table. The key should be unique.
void AddAt(UInt_t slot, ULong_t hash, Long_t key, Long_t value)
 Add an (key,value) pair to the table. The key should be unique.
 If the 'slot' is open, use it to store the value,
 otherwise revert to Add(hash,key,value)
 This is usually used in conjuction with GetValue wiht 3 parameters:
 if ((idx = (ULong_t)fMap->GetValue(hash, key, slot)) != 0) {

 } else {
    fMap->AddAt(slot,hash,key,value);
 }
Long_t & operator()(ULong_t hash, Long_t key)
 Return a reference to the value belonging to the key with the
 specified hash value. If the key does not exist it will be added.
 NOTE: the reference will be invalidated an Expand() triggered by
 an Add() or another operator() call.
void Delete(Option_t* opt = "")
 Delete all entries stored in the TExMap.
Long_t GetValue(ULong_t hash, Long_t key)
 Return the value belonging to specified key and hash value. If key not
 found return 0.
Long_t GetValue(ULong_t hash, Long_t key, UInt_t& slot)
 Return the value belonging to specified key and hash value. If key not
 found return 0.
 In 'slot', return the index of the slot used or the first empty slot.
 (to be used with AddAt).
void Remove(ULong_t hash, Long_t key)
 Remove entry with specified key from the TExMap.
Int_t FindElement(ULong_t hash, Long_t key)
 Find an entry with specified hash and key in the TExMap.
 Returns the slot of the key or the next empty slot.
void FixCollisions(Int_t index)
 Rehash the map in case an entry has been removed.
void Expand(Int_t newsize)
 Expand the TExMap.
void Streamer(TBuffer& b)
 Stream all objects in the collection to or from the I/O buffer.
Bool_t HighWaterMark()
{ return (Bool_t) (fTally >= ((3*fSize)/4)); }
void Add(ULong_t hash, Long_t key, Long_t value)
Int_t Capacity()
{ return fSize; }
Int_t GetSize()
{ return fTally; }
Long_t GetValue(ULong_t hash, Long_t key)
void Remove(ULong_t hash, Long_t key)
Long_t & operator()(ULong_t hash, Long_t key)

Author: Fons Rademakers 26/05/99
Last update: root/cont:$Id: TExMap.h 20882 2007-11-19 11:31:26Z rdm $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.