12 #ifndef ROOT_TRefArray 13 #define ROOT_TRefArray 30 #if (__GNUC__ >= 3) && !defined(__INTEL_COMPILER) 33 #pragma GCC system_header 109 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600 110 #pragma GCC diagnostic push 111 #pragma GCC diagnostic ignored "-Weffc++" 123 public std::iterator<std::bidirectional_iterator_tag,
124 TObject*, std::ptrdiff_t,
125 const TObject**, const TObject*&> {
152 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600 153 #pragma GCC diagnostic pop 161 return (at < fLowerBound || at-fLowerBound >=
fSize)
169 if (j >= 0 && j <
fSize) {
184 if (j >= 0 && j <
fSize) {
virtual Int_t AddAtFree(TObject *obj)
Return the position of the new object.
void Init(Int_t s, Int_t lowerBound)
Initialize a TRefArray.
TObject * GetFromTable(Int_t idx) const
the reference may be in the TRefTable
TObject ** GetObjectRef(const TObject *obj) const
Return address of pointer obj.
virtual void Sort(Int_t upto=kMaxInt)
If objects in array are sortable (i.e.
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
Int_t GetLast() const
Return index of last object in array.
TObject * After(const TObject *obj) const
Return the object after obj. Returns 0 if obj is last object.
An array of references to TObjects.
void SetLast(Int_t last)
Set index of last object in array, effectively truncating the array.
virtual Int_t BinarySearch(TObject *obj, Int_t upto=kMaxInt)
Find object using a binary search.
virtual void AddLast(TObject *obj)
Add object in the next empty slot in the array.
Iterator abstract base class.
virtual ~TRefArray()
Usual destructor (The object pointed to by the array are never deleted).
Sequenceable collection abstract base class.
#define ClassDef(name, id)
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const
Bool_t OutOfBoundsError(const char *where, Int_t i) const
Generate an out-of-bounds error. Always returns false.
Int_t GetEntriesFast() const
virtual void AddFirst(TObject *obj)
Add object in the first slot of the array.
const Bool_t kIterForward
A TProcessID identifies a ROOT job in a unique way in time and space.
Bool_t GetObjectUID(Int_t &uid, TObject *obj, const char *methodname)
Private/static function, check for validity of pid.
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
TProcessID * GetPID() const
Iterator of object array.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
virtual void Compress()
Remove empty slots from array.
TTime operator*(const TTime &t1, const TTime &t2)
Collection abstract base class.
Int_t GetAbsLast() const
Return absolute index to last object in array.
const TCollection * GetCollection() const
void Reset(Detail::TBranchProxy *x)
UInt_t GetUID(Int_t at) const
Return UID of element at.
TObject * Before(const TObject *obj) const
Return the object before obj. Returns 0 if obj is first object.
TObject * GetObjectWithID(UInt_t uid)
returns the TObject with unique identifier uid in the table of objects
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
virtual void Delete(Option_t *option="")
Remove all objects from the array and free the internal memory.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
TRefArray(TProcessID *pid=0)
default constructor
virtual void AddAfter(const TObject *after, TObject *obj)
Add object in the slot after object after.
static constexpr double s
friend class TRefArrayIter
Bool_t BoundsOk(const char *where, Int_t at) const
virtual TObject * operator[](Int_t i) const
Mother of all ROOT objects.
Int_t IndexOf(const TObject *obj) const
TObject * First() const
Return the object in the first slot.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Returns an array iterator.
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
static Bool_t IsValid(TProcessID *pid)
static function. return kTRUE if pid is a valid TProcessID
Abstract base class defining a generic interface to the underlying Operating System.
virtual TObject * Remove(TObject *obj)
Remove object from array.
TRefArray & operator=(const TRefArray &a)
Assignment operator.
virtual void AddBefore(const TObject *before, TObject *obj)
Add object in the slot before object before.