TProcessID


class description - source file - inheritance tree

class TProcessID : public TNamed

    private:
protected:
public:
TProcessID TProcessID() TProcessID TProcessID(const TProcessID& ref) virtual void ~TProcessID() static TProcessID* AddProcessID() static UInt_t AssignID(TObject* obj) static TClass* Class() static void Cleanup() Int_t DecrementCount() Int_t GetCount() const static UInt_t GetObjectCount() TObjArray* GetObjects() const TObject* GetObjectWithID(UInt_t uid) static TProcessID* GetProcessID(UShort_t pid) Int_t IncrementCount() virtual TClass* IsA() const 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)

Data Members

    private:
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 UInt_t fgNumber Referenced objects count

Class Description

 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.



TProcessID()

~TProcessID()

TProcessID(const TProcessID &ref)
 TProcessID copy ctor.

TProcessID* AddProcessID()
 static function to add a new TProcessID to the list of PIDs

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

Int_t DecrementCount()

TProcessID* GetProcessID(UShort_t pid)
 static function returning a pointer to TProcessID number pid in fgPIDs

Int_t IncrementCount()

UInt_t GetObjectCount()
 Return the current referenced object count
 fgNumber is incremented everytime a new object is referenced

TObject* GetObjectWithID(UInt_t uid)
returns the TObject with unique identifier uid in the table of objects
if (!fObjects) fObjects = new TObjArray(100);

void PutObjectWithID(TObject *obj, UInt_t uid)

TProcessID* ReadProcessID(UShort_t pidf, TFile *file)
 static function

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 *pid, 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



Inline Functions


              Int_t GetCount() const
         TObjArray* GetObjects() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)


Author: Rene Brun 28/09/2001
Last update: root/cont:$Name: $:$Id: TProcessID.cxx,v 1.10 2001/12/18 18:25:55 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - 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.