library: libCore #include "TProcessID.h" |
TProcessID
class description - header file - source file - inheritance tree (.pdf)
public:
TProcessID()
TProcessID(const TProcessID& ref)
virtual ~TProcessID()
static TProcessID* AddProcessID()
static UInt_t AssignID(TObject* obj)
static TClass* Class()
static void Cleanup()
virtual void Clear(Option_t* option = "")
Int_t DecrementCount()
Int_t GetCount() const
static UInt_t GetNProcessIDs()
static UInt_t GetObjectCount()
TObjArray* GetObjects() const
TObject* GetObjectWithID(UInt_t uid)
static TProcessID* GetProcessID(UShort_t pid)
static TProcessID* GetProcessWithUID(UInt_t uid, void* obj)
static TProcessID* GetSessionProcessID()
Int_t IncrementCount()
virtual TClass* IsA() const
static Bool_t IsValid(TProcessID* pid)
TProcessID& operator=(const TProcessID&)
void PutObjectWithID(TObject* obj, UInt_t uid = 0)
static TProcessID* ReadProcessID(UShort_t pidf, TFile* file)
virtual void RecursiveRemove(TObject* obj)
static void SetObjectCount(UInt_t number)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
static UShort_t WriteProcessID(TProcessID* pid, TFile* file)
protected:
Int_t fCount !Reference count to this object (from TFile)
TObjArray* fObjects !Array pointing to the referenced objects
static TProcessID* fgPID Pointer to current session ProcessID
static TObjArray* fgPIDs Table of ProcessIDs
static TExMap* fgObjPIDs Table pointer to pids
static UInt_t fgNumber Referenced objects count
TProcessID
A TProcessID identifies a ROOT job in a unique way in time and space.
The TProcessID title consists of a TUUID object which provides a globally
unique identifier (for more see TUUID.h).
A TProcessID is automatically created by the TROOT constructor.
When a TFile contains referenced objects (see TRef), the TProcessID
object is written to the file.
If a file has been written in multiple sessions (same machine or not),
a TProcessID is written for each session.
These objects are used by the class TRef to uniquely identified
any TObject pointed by a TRef.
When a referenced object is read from a file (its bit kIsReferenced is set),
this object is entered into the objects table of the corresponding TProcessID.
Each TFile has a list of TProcessIDs (see TFile::fProcessIDs) also
accessible via TProcessID::fgPIDs (for all files).
When this object is deleted, it is removed from the table via the cleanup
mechanism invoked by the TObject destructor.
Each TProcessID has a table (TObjArray *fObjects) that keeps track
of all referenced objects. If a referenced object has a fUniqueID set,
a pointer to this unique object may be found via fObjects->At(fUniqueID).
In the same way, when a TRef::GetObject is called, GetObject uses
its own fUniqueID to find the pointer to the referenced object.
See TProcessID::GetObjectWithID and PutObjectWithID.
When a referenced object is deleted, its slot in fObjects is set to null.
See also TProcessUUID: a specialized TProcessID to manage the single list
of TUUIDs.
UInt_t AssignID(TObject *obj)
static function returning the ID assigned to obj
If the object is not yet referenced, its kIsReferenced bit is set
and its fUniqueID set to the current number of referenced objects so far.
void Cleanup()
static function (called by TROOT destructor) to delete all TProcessIDs
void PutObjectWithID(TObject *obj, UInt_t uid)
stores the object at the uid th slot in the table of objects
The object uniqueid is set as well as its kMustCleanup bit
void RecursiveRemove(TObject *obj)
called by the object destructor
remove reference to obj from the current table if it is referenced
void SetObjectCount(UInt_t number)
static function to set the current referenced object count
fgNumber is incremented everytime a new object is referenced
UShort_t WriteProcessID(TProcessID *pidd, TFile *file)
static function
Check if the ProcessID pid is already in the file.
if not, add it and return the index number in the local file list
Author: Rene Brun 28/09/2001
Last update: root/cont:$Name: $:$Id: TProcessID.cxx,v 1.29 2006/04/20 18:49:43 pcanal Exp $
Copyright (C) 1995-2000, 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.