53 fDefaultSize(10), fUID(0), fUIDContext(nullptr),
fSize(0), fParents(nullptr), fOwner(nullptr)
62 fNumPIDs(0), fAllocSize(nullptr), fN(nullptr), fParentIDs(nullptr), fParentID(-1),
63 fDefaultSize(
size<10 ? 10 :
size), fUID(0), fUIDContext(nullptr),
fSize(0), fParents(new
TObjArray(1)), fOwner(owner)
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;
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 nullptr;
261 if (pnumber < 0 || pnumber >= nparents)
return nullptr;
315 if (firstInt < 0) numIids = -firstInt;
320 TProcessID *fileProcessID =
b.GetLastProcessID(
this);
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) {
403 for (
Int_t i = 0; i < npid2; i++) {
405 for (
Int_t ipid = 0;ipid<npids;ipid++) {
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Buffer base class used for serializing objects.
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
const char * GetTitle() const override
Returns title of object.
Int_t GetEntriesFast() const
Int_t IndexOf(const TObject *obj) const override
void Clear(Option_t *option="") override
Remove all objects from the array.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
Mother of all ROOT objects.
virtual Bool_t Notify()
This method must be overridden to handle object notification (the base implementation is no-op).
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
A TProcessID identifies a ROOT job in a unique way in time and space.
static UInt_t GetNProcessIDs()
Return the (static) number of process IDs.
static TObjArray * GetPIDs()
static: returns array of TProcessIDs
static TProcessID * GetSessionProcessID()
static function returning the pointer to the session TProcessID
static TProcessID * GetProcessID(UShort_t pid)
static function returning a pointer to TProcessID number pid in fgPIDs
A TRefTable maintains the association between a referenced object and the parent object supporting th...
void Clear(Option_t *="") override
Clear all entries in the table.
Int_t * fN
[fNumPIDs] allocated size of array fParentIDs for each ProcessID
virtual Int_t SetParent(const TObject *parent, Int_t branchID)
– Set current parent object, typically a branch of a tree.
std::vector< Int_t > fMapPIDtoInternal
TRefTable()
Default constructor for I/O.
virtual Int_t ExpandForIID(Int_t iid, Int_t newsize)
Expand fParentIDs to newsize for internel ProcessID index iid.
Int_t GetInternalIdxForPID(TProcessID *procid) const
Get the index for fProcessIDs, fAllocSize, etc given a PID.
virtual void FillBuffer(TBuffer &b)
Fill buffer b with the fN elements in fParentdIDs.
Int_t FindPIDGUID(const char *guid) const
Get fProcessGUIDs' index of the TProcessID with GUID guid.
Int_t * fAllocSize
number of known ProcessIDs
TObject * GetParent(Int_t uid, TProcessID *context=nullptr) const
Return object corresponding to uid.
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
static void SetRefTable(TRefTable *table)
Static function setting the current TRefTable.
Int_t fDefaultSize
current parent ID in fParents (latest call to SetParent)
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
virtual void Reset(Option_t *="")
Clear all entries in the table.
void ExpandPIDs(Int_t numpids)
Expand the arrays of managed PIDs.
std::vector< std::string > fProcessGUIDs
void Streamer(TBuffer &) override
Stream an object of class TRefTable.
virtual Int_t Add(Int_t uid, TProcessID *context=nullptr)
Add a new uid to the table.
virtual Int_t Expand(Int_t pid, Int_t newsize)
Expand fParentIDs to newsize for ProcessID pid.
virtual ~TRefTable()
Destructor.
Int_t ** fParentIDs
[fNumPIDs] current maximum number of IDs in array fParentIDs for each ProcessID
Bool_t Notify() override
This function is called by TRef::Streamer or TStreamerInfo::ReadBuffer when reading a reference.
Int_t fParentID
[fNumPIDs][fAllocSize] array of Parent IDs
virtual void ReadBuffer(TBuffer &b)
Fill buffer b with the fN elements in fParentdIDs.