Warning, file /include/root/TRefTable.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TRefTable
0013 #define ROOT_TRefTable
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "TObject.h"
0028
0029 #include <string>
0030 #include <vector>
0031
0032 class TObjArray;
0033 class TProcessID;
0034
0035 class TRefTable : public TObject {
0036
0037 protected:
0038 Int_t fNumPIDs;
0039 Int_t *fAllocSize;
0040 Int_t *fN;
0041 Int_t **fParentIDs;
0042 Int_t fParentID;
0043 Int_t fDefaultSize;
0044 UInt_t fUID;
0045 TProcessID *fUIDContext;
0046 Int_t fSize;
0047 TObjArray *fParents;
0048 TObject *fOwner;
0049 std::vector<std::string> fProcessGUIDs;
0050 std::vector<Int_t> fMapPIDtoInternal;
0051 static TRefTable *fgRefTable;
0052
0053 Int_t AddInternalIdxForPID(TProcessID* procid);
0054 virtual Int_t ExpandForIID(Int_t iid, Int_t newsize);
0055 void ExpandPIDs(Int_t numpids);
0056 Int_t FindPIDGUID(const char* guid) const;
0057 Int_t GetInternalIdxForPID(TProcessID* procid) const;
0058 Int_t GetInternalIdxForPID(Int_t pid) const;
0059
0060 public:
0061
0062 enum EStatusBits {
0063 kHaveWarnedReadingOld = BIT(14)
0064 };
0065
0066 TRefTable();
0067 TRefTable(TObject *owner, Int_t size);
0068 virtual ~TRefTable();
0069
0070 TRefTable(const TRefTable&) = delete;
0071 TRefTable &operator=(const TRefTable&) = delete;
0072
0073 virtual Int_t Add(Int_t uid, TProcessID* context = nullptr);
0074 void Clear(Option_t * ="") override;
0075 virtual Int_t Expand(Int_t pid, Int_t newsize);
0076 virtual void FillBuffer(TBuffer &b);
0077 static TRefTable *GetRefTable();
0078 Int_t GetNumPIDs() const {return fNumPIDs;}
0079 Int_t GetSize(Int_t pid) const {return fAllocSize[GetInternalIdxForPID(pid)];}
0080 Int_t GetN(Int_t pid) const {return fN[GetInternalIdxForPID(pid)];}
0081 TObject *GetOwner() const {return fOwner;}
0082 TObject *GetParent(Int_t uid, TProcessID *context = nullptr) const;
0083 TObjArray *GetParents() const {return fParents;}
0084 UInt_t GetUID() const {return fUID;}
0085 TProcessID *GetUIDContext() const {return fUIDContext;}
0086 Bool_t Notify() override;
0087 virtual void ReadBuffer(TBuffer &b);
0088 virtual void Reset(Option_t * ="");
0089 virtual Int_t SetParent(const TObject* parent, Int_t branchID);
0090 static void SetRefTable(TRefTable *table);
0091 virtual void SetUID(UInt_t uid, TProcessID *context = nullptr) { fUID = uid; fUIDContext = context; }
0092
0093 ClassDefOverride(TRefTable,3)
0094 };
0095
0096 #endif