53 fDefaultSize(10), fUID(0), fUIDContext(0), fSize(0), fParents(0), fOwner(0)
97 newsize = uid + uid / 2;
103 Error(
"Add",
"Cannot allocate space to store uid=%d", uid);
107 Error(
"Add",
"SetParent must be called before adding uid=%d", uid);
111 if (uid >=
fN[iid])
fN[iid] = uid + 1;
150 memset(
fN, 0,
sizeof(
Int_t) * fNumPIDs);
160 if (iid < 0)
return -1;
169 if (newsize < 0)
return newsize;
210 if (temp) memcpy(
fN, temp, oldNumPIDs *
sizeof(
Int_t));
240 std::vector<std::string>::const_iterator posPID
257 uid = uid & 0xFFFFFF;
258 if (uid < 0 || uid >=
fN[iid])
return 0;
261 if (pnumber < 0 || pnumber >= nparents)
return 0;
315 if (firstInt < 0) numIids = -firstInt;
323 if (startIid == -1) {
331 for (
Int_t iid = startIid; iid < numIids; ++iid) {
333 if (firstInt < 0) b >> newN;
334 else newN = firstInt;
363 if (branchID != -1) {
391 void TRefTable::Streamer(
TBuffer &R__b)
403 for (
Int_t i = 0; i < npid2; i++) {
405 for (
Int_t ipid = 0;ipid<npids;ipid++) {
Int_t fParentID
[fNumPIDs][fAllocSize] array of Parent IDs
static TProcessID * GetProcessID(UShort_t pid)
static function returning a pointer to TProcessID number pid in fgPIDs
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void Clear(Option_t *option="")
Remove all objects from the array.
static UInt_t GetNProcessIDs()
Return the (static) number of process IDs.
Buffer base class used for serializing objects.
virtual Int_t Add(Int_t uid, TProcessID *context=0)
Add a new uid to the table.
TObject * At(Int_t idx) const
virtual void Clear(Option_t *="")
Clear all entries in the table.
static void SetRefTable(TRefTable *table)
Static function setting the current TRefTable.
Int_t GetInternalIdxForPID(TProcessID *procid) const
Get the index for fProcessIDs, fAllocSize, etc given a PID.
void ExpandPIDs(Int_t numpids)
Expand the arrays of managed PIDs.
static TObjArray * GetPIDs()
static: returns array of TProcessIDs
Int_t fSize
TProcessID the current uid is referring to.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
Int_t * fN
[fNumPIDs] allocated size of array fParentIDs for each ProcessID
A TProcessID identifies a ROOT job in a unique way in time and space.
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
virtual TProcessID * GetLastProcessID(TRefTable *reftable) const =0
Int_t AddInternalIdxForPID(TProcessID *procid)
Add the internal index for fProcessIDs, fAllocSize, etc given a PID.
static TRefTable * fgRefTable
cache of pid to index in fProcessGUIDs
virtual ~TRefTable()
Destructor.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
virtual void Reset(Option_t *="")
Clear all entries in the table.
virtual void ReadBuffer(TBuffer &b)
Fill buffer b with the fN elements in fParentdIDs.
std::vector< Int_t > fMapPIDtoInternal
Int_t GetEntriesFast() const
virtual Int_t ExpandForIID(Int_t iid, Int_t newsize)
Expand fParentIDs to newsize for internel ProcessID index iid.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
std::vector< std::string > fProcessGUIDs
Int_t * fAllocSize
number of known ProcessIDs
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
UInt_t fUID
default size for a new PID array
Int_t fDefaultSize
current parent ID in fParents (latest call to SetParent)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TObject * UncheckedAt(Int_t i) const
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
virtual Int_t Expand(Int_t pid, Int_t newsize)
Expand fParentIDs to newsize for ProcessID pid.
virtual Int_t SetParent(const TObject *parent, Int_t branchID)
– Set current parent object, typically a branch of a tree.
Int_t IndexOf(const TObject *obj) const
A TRefTable maintains the association between a referenced object and the parent object supporting th...
static TProcessID * GetSessionProcessID()
static function returning the pointer to the session TProcessID
virtual void FillBuffer(TBuffer &b)
Fill buffer b with the fN elements in fParentdIDs.
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Int_t GetEntries() const
Return the number of objects in array (i.e.
Int_t ** fParentIDs
[fNumPIDs] current maximum number of IDs in array fParentIDs for each ProcessID
TProcessID * fUIDContext
Current uid (set by TRef::GetObject)
Int_t FindPIDGUID(const char *guid) const
Get fProcessGUIDs' index of the TProcessID with GUID guid.
virtual const char * GetTitle() const
Returns title of object.
TRefTable()
Default constructor for I/O.
virtual Bool_t Notify()
This function is called by TRef::Streamer or TStreamerInfo::ReadBuffer when reading a reference...
TObject * GetParent(Int_t uid, TProcessID *context=0) const
Return object corresponding to uid.