B-tree class.
TBtree inherits from the TSeqCollection ABC.
This implements B-trees with several refinements. Most of them can be found in Knuth Vol 3, but some were developed to adapt to restrictions imposed by C++. First, a restatement of Knuth's properties that a B-tree must satisfy, assuming we make the enhancement he suggests in the paragraph at the bottom of page 476. Instead of storing null pointers to non-existent nodes (which Knuth calls the leaves) we utilize the space to store keys. Therefore, what Knuth calls level (l-1) is the bottom of our tree, and we call the nodes at this level LeafNodes. Other nodes are called InnerNodes. The other enhancement we have adopted is in the paragraph at the bottom of page 477: overflow control.
The following are modifications of Knuth's properties on page 478:
The values of InnerLowWaterMark and LeafLowWaterMark may actually be set by the user when the tree is initialized, but currently they are set automatically to:
If the tree is only filled, then all the nodes will be at least 2/3 full. They will almost all be exactly 2/3 full if the elements are added to the tree in order (either increasing or decreasing). [Knuth says McCreight's experiments showed almost 100% memory utilization. I don't see how that can be given the algorithms that Knuth gives. McCreight must have used a different scheme for balancing. [No, he used a different scheme for splitting: he did a two-way split instead of the three way split as we do here. Which means that McCreight does better on insertion of ordered data, but we should do better on insertion of random data.]]
It must also be noted that B-trees were designed for DISK access algorithms, not necessarily in-memory sorting, as we intend it to be used here. However, if the order is kept small (< 6?) any inefficiency is negligible for in-memory sorting. Knuth points out that balanced trees are actually preferable for memory sorting. I'm not sure that I believe this, but it's interesting. Also, deleting elements from balanced binary trees, being beyond the scope of Knuth's book (p. 465), is beyond my scope. B-trees are good enough.
A B-tree is declared to be of a certain ORDER (3 by default). This number determines the number of keys contained in any interior node of the tree. Each interior node will contain ORDER keys, and therefore ORDER+1 pointers to sub-trees. The keys are numbered and indexed 1 to ORDER while the pointers are numbered and indexed 0 to ORDER. The 0th ptr points to the sub-tree of all elements that are less than key[1]. Ptr[1] points to the sub-tree that contains all the elements greater than key[1] and less than key[2]. etc. The array of pointers and keys is allocated as ORDER+1 pairs of keys and nodes, meaning that one key field (key[0]) is not used and therefore wasted. Given that the number of interior nodes is small, that this waste allows fewer cases of special code, and that it is useful in certain of the methods, it was felt to be a worthwhile waste.
The size of the exterior nodes (leaf nodes) does not need to be related to the size of the interior nodes at all. Since leaf nodes contain only keys, they may be as large or small as we like independent of the size of the interior nodes. For no particular reason other than it seems like a good idea, we will allocate 2*(ORDER+1) keys in each leaf node, and they will be numbered and indexed from 0 to 2*ORDER+1. It does have the advantage of keeping the size of the leaf and interior arrays the same, so that if we find allocation and de-allocation of these arrays expensive, we can modify their allocation to use a garbage ring, or something.
Both of these numbers will be run-time constants associated with each tree (each tree at run-time can be of a different order). The variable "order" is the order of the tree, and the inclusive upper limit on the indices of the keys in the interior nodes. The variable "order2" is the inclusive upper limit on the indices of the leaf nodes, and is designed
Currently, order2 = 2*(order+1).
It is conceptually VERY convenient to think of the data as being the very first element of the sib node. Any primitive that tells sib to perform some action on n nodes should include this 'hidden' element. For InnerNodes, the hidden element has (physical) index 0 in the array, and in LeafNodes, the hidden element has (virtual) index -1 in the array. Therefore, there are two 'size' primitives for nodes:
Parent nodes are always InnerNodes.
These are the primitive operations on Nodes:
To allow this implementation of btrees to also be an implementation of sorted arrays/lists, the overhead is included to allow O(log n) access of elements by their rank (`give me the 5th largest element'). Therefore, each Item keeps track of the number of keys in and below it in the tree (remember, each item's tree is all keys to the RIGHT of the item's own key).
*/
////////////////////////////////////////////////////////////////////////////// / Create a B-tree of certain order (by default 3).
TBtree::TBtree(int order) { Init(order); }
////////////////////////////////////////////////////////////////////////////// / Delete B-tree. Objects are not deleted unless the TBtree is the / owner (set via SetOwner()).
TBtree::~TBtree() { if (fRoot) { Clear(); { delete fRoot; fRoot = nullptr; } ; } }
////////////////////////////////////////////////////////////////////////////// / Add object to B-tree.
void TBtree::Add(TObject *obj) { if (IsArgNull("Add", obj)) return; if (!obj->IsSortable()) { Error("Add", "object must be sortable"); return; } if (!fRoot) { fRoot = new TBtLeafNode(nullptr, obj, this); R__CHECK(fRoot != nullptr); IncrNofKeys(); } else { TBtNode *loc; Int_t idx; if (fRoot->Found(obj, &loc, &idx)) { loc and idx are set to either where the object was found, or where it should go in the Btree. Nothing is here now, but later we might give the user the ability to declare a B-tree as `unique elements only', // in which case we would handle an exception here. } loc->Add(obj, idx); } }
//////////////////////////////////////////////////////////////////////////////// /// Cannot use this method since B-tree decides order.
TObject *TBtree::After(const TObject *) const { MayNotUse("After"); return nullptr; }
//////////////////////////////////////////////////////////////////////////////// /// May not use this method since B-tree decides order.
TObject *TBtree::Before(const TObject *) const { MayNotUse("Before"); return nullptr; }
//////////////////////////////////////////////////////////////////////////////// /// Remove all objects from B-tree. Does NOT delete objects unless the TBtree /// is the owner (set via SetOwner()).
void TBtree::Clear(Option_t *) { if (IsOwner()) Delete(); else { { delete fRoot; fRoot = nullptr; } ; fSize = 0; } }
//////////////////////////////////////////////////////////////////////////////// /// Remove all objects from B-tree AND delete all heap based objects.
void TBtree::Delete(Option_t *) { for (Int_t i = 0; i < fSize; i++) { TObject *obj = At(i); if (obj && obj->IsOnHeap()) TCollection::GarbageCollect(obj); } { delete fRoot; fRoot = nullptr; } ; fSize = 0; }
//////////////////////////////////////////////////////////////////////////////// /// Find object using its name (see object's GetName()). Requires sequential /// search of complete tree till object is found.
TObject *TBtree::FindObject(const char *name) const { return TCollection::FindObject(name); }
//////////////////////////////////////////////////////////////////////////////// /// Find object using the objects Compare() member function.
TObject *TBtree::FindObject(const TObject *obj) const { if (!obj->IsSortable()) { Error("FindObject", "object must be sortable"); return nullptr; } if (!fRoot) return nullptr; else { TBtNode *loc; Int_t idx; return fRoot->Found(obj, &loc, &idx); } }
//////////////////////////////////////////////////////////////////////////////// /// Add object and return its index in the tree.
Int_t TBtree::IdxAdd(const TObject &obj) { Int_t r; if (!obj.IsSortable()) { Error("IdxAdd", "object must be sortable"); return -1; } if (!fRoot) { fRoot = new TBtLeafNode(nullptr, &obj, this); R__ASSERT(fRoot != nullptr); IncrNofKeys(); r = 0; } else { TBtNode *loc; int idx; if (fRoot->Found(&obj, &loc, &idx)) { // loc and idx are set to either where the object // was found, or where it should go in the Btree. // Nothing is here now, but later we might give the user // the ability to declare a B-tree as `unique elements only', in which case we would handle an exception here. std::cerr << "Multiple entry warning\n"; } else { R__CHECK(loc->fIsLeaf); } if (loc->fIsLeaf) { if (!loc->fParent) r = idx; else r = idx + loc->fParent->FindRankUp(loc); } else { TBtInnerNode iloc = (TBtInnerNode) loc; r = iloc->FindRankUp(iloc->GetTree(idx)); } loc->Add(&obj, idx); } R__CHECK(r == Rank(&obj) || &obj == (*this)[r]); return r; }
////////////////////////////////////////////////////////////////////////////// / Initialize a B-tree.
void TBtree::Init(Int_t order) { if (order < 3) { Warning("Init", "order must be at least 3"); order = 3; } fRoot = nullptr; fOrder = order; fOrder2 = 2 * (fOrder+1); fLeafMaxIndex = fOrder2 - 1; // fItem[0..fOrder2-1] fInnerMaxIndex = fOrder; // fItem[1..fOrder]
the low water marks trigger an exploration for balancing or merging nodes. When the size of a node falls below X, then it must be possible to either balance this node with another node, or it must be possible to merge this node with another node. This can be guaranteed only if (this->Size() < (MaxSize()-1)/2).
== MaxSize() satisfies the above because we compare lowwatermark with fLast fLeafLowWaterMark = ((fLeafMaxIndex+1)-1) / 2 - 1; fInnerLowWaterMark = (fOrder-1) / 2; }
void TBtree::PrintOn(std::ostream& out) const { // Print a B-tree.
if (!fRoot) out << "<empty>"; else fRoot->PrintOn(out); }
////////////////////////////////////////////////////////////////////////////// / Returns a B-tree iterator.
TIterator *TBtree::MakeIterator(Bool_t dir) const { return new TBtreeIter(this, dir); }
////////////////////////////////////////////////////////////////////////////// / Returns the rank of the object in the tree.
Int_t TBtree::Rank(const TObject *obj) const { if (!obj->IsSortable()) { Error("Rank", "object must be sortable"); return -1; } if (!fRoot) return -1; else return fRoot->FindRank(obj); }
////////////////////////////////////////////////////////////////////////////// / Remove an object from the tree.
TObject *TBtree::Remove(TObject *obj) { if (!obj->IsSortable()) { Error("Remove", "object must be sortable"); return nullptr; } if (!fRoot) return nullptr;
TBtNode *loc; Int_t idx; TObject *ob = fRoot->Found(obj, &loc, &idx); if (!ob) return nullptr; loc->Remove(idx); return ob; }
////////////////////////////////////////////////////////////////////////////// / The root of the tree is full. Create an InnerNode that / points to it, and then inform the InnerNode that it is full.
void TBtree::RootIsFull() { TBtNode *oldroot = fRoot; fRoot = new TBtInnerNode(nullptr, this, oldroot); R__ASSERT(fRoot != nullptr); oldroot->Split(); }
////////////////////////////////////////////////////////////////////////////// / If root is empty clean up its space.
void TBtree::RootIsEmpty() { if (fRoot->fIsLeaf) { TBtLeafNode lroot = (TBtLeafNode)fRoot; R__CHECK(lroot->Psize() == 0); delete lroot; fRoot = nullptr; } else { TBtInnerNode iroot = (TBtInnerNode)fRoot; R__CHECK(iroot->Psize() == 0); fRoot = iroot->GetTree(0); fRoot->fParent = nullptr; delete iroot; } }
////////////////////////////////////////////////////////////////////////////// / Stream all objects in the btree to or from the I/O buffer.
void TBtree::Streamer(TBuffer &b) { UInt_t R__s, R__c; if (b.IsReading()) { b.ReadVersion(&R__s, &R__c); //Version_t v = b.ReadVersion(); b >> fOrder; b >> fOrder2; b >> fInnerLowWaterMark; b >> fLeafLowWaterMark; b >> fInnerMaxIndex; b >> fLeafMaxIndex; TSeqCollection::Streamer(b); b.CheckByteCount(R__s, R__c,TBtree::IsA()); } else { R__c = b.WriteVersion(TBtree::IsA(), kTRUE); b << fOrder; b << fOrder2; b << fInnerLowWaterMark; b << fLeafLowWaterMark; b << fInnerMaxIndex; b << fLeafMaxIndex; TSeqCollection::Streamer(b); b.SetByteCount(R__c, kTRUE); } }
/**
Public Types | |
| enum | { kInitCapacity = 16 , kInitHashTableCapacity = 17 } |
| enum | { kSingleKey = (1ULL << (0)) , kOverwrite = (1ULL << (1)) , kWriteDelete = (1ULL << (2)) } |
| enum | { kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 , kBitMask = 0x00ffffff } |
| enum | EDeprecatedStatusBits { kObjInCanvas = (1ULL << (3)) } |
| typedef TBtreeIter | Iterator_t |
Public Member Functions | |
| TBtree (Int_t ordern=3) | |
| virtual | ~TBtree () |
| void | AbstractMethod (const char *method) const |
| Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it. | |
| void | Add (TObject *obj) override |
| void | Add (TObject *obj, Option_t *) override |
| void | AddAfter (const TObject *, TObject *obj) override |
| void | AddAfter (const TObject *, TObject *obj, Option_t *) override |
| virtual void | AddAll (const TCollection *col) |
| Add all objects from collection col to this collection. | |
| void | AddAt (TObject *obj, Int_t) override |
| void | AddAt (TObject *obj, Int_t, Option_t *) override |
| void | AddBefore (const TObject *, TObject *obj) override |
| void | AddBefore (const TObject *, TObject *obj, Option_t *) override |
| void | AddFirst (TObject *obj) override |
| void | AddFirst (TObject *obj, Option_t *) override |
| void | AddLast (TObject *obj) override |
| void | AddLast (TObject *obj, Option_t *) override |
| void | AddVector (TObject *obj1,...) |
| Add all arguments to the collection. | |
| TObject * | After (const TObject *obj) const override |
| virtual void | AppendPad (Option_t *option="") |
| Append graphics object to current pad. | |
| Bool_t | AssertClass (TClass *cl) const |
| Make sure all objects in this collection inherit from class cl. | |
| TObject * | At (Int_t idx) const override |
| TObject * | Before (const TObject *obj) const override |
| TIter | begin () const |
| void | Browse (TBrowser *b) override |
| Browse this collection (called by TBrowser). | |
| Int_t | Capacity () const |
| ULong_t | CheckedHash () |
| Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. | |
| virtual const char * | ClassName () const |
| Returns name of class to which the object belongs. | |
| void | Clear (Option_t *option="") override |
| TObject * | Clone (const char *newname="") const override |
| Make a clone of an collection using the Streamer facility. | |
| Int_t | Compare (const TObject *obj) const override |
| Compare two TCollection objects. | |
| Bool_t | Contains (const char *name) const |
| Bool_t | Contains (const TObject *obj) const |
| virtual void | Copy (TObject &object) const |
| Copy this to obj. | |
| void | Delete (Option_t *option="") override |
| Delete this object. | |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| Computes distance from point (px,py) to the object. | |
| void | Draw (Option_t *option="") override |
| Draw all objects in this collection. | |
| virtual void | DrawClass () const |
| Draw class inheritance tree of the class to which this object belongs. | |
| virtual TObject * | DrawClone (Option_t *option="") const |
| Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1). | |
| void | Dump () const override |
| Dump all objects in this collection. | |
| TIter | end () const |
| virtual void | Error (const char *method, const char *msgfmt,...) const |
| Issue error message. | |
| virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
| Execute method on this object with the given parameter string, e.g. | |
| virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
| Execute method on this object with parameters stored in the TObjArray. | |
| virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
| Execute action corresponding to an event at (px,py). | |
| virtual void | Fatal (const char *method, const char *msgfmt,...) const |
| Issue fatal error message. | |
| TObject * | FindObject (const char *name) const override |
| Must be redefined in derived classes. | |
| TObject * | FindObject (const TObject *obj) const override |
| Must be redefined in derived classes. | |
| TObject * | First () const override |
| virtual Option_t * | GetDrawOption () const |
| Get option used by the graphics system to draw this object. | |
| virtual Int_t | GetEntries () const |
| virtual const char * | GetIconName () const |
| Returns mime type name of object. | |
| virtual Int_t | GetLast () const |
| Returns index of last object in collection. | |
| const char * | GetName () const override |
| Return name of this collection. | |
| virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
| Returns string containing info about the object at position (px,py). | |
| TObject ** | GetObjectRef (const TObject *) const override |
| virtual Option_t * | GetOption () const |
| virtual Int_t | GetSize () const |
| Return the capacity of the collection, i.e. | |
| virtual const char * | GetTitle () const |
| Returns title of object. | |
| virtual UInt_t | GetUniqueID () const |
| Return the unique object id. | |
| virtual Int_t | GrowBy (Int_t delta) const |
| Increase the collection's capacity by delta slots. | |
| virtual Bool_t | HandleTimer (TTimer *timer) |
| Execute action in response of a timer timing out. | |
| ULong_t | Hash () const override |
| Return hash value for this object. | |
| Bool_t | HasInconsistentHash () const |
| Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. | |
| virtual Int_t | IndexOf (const TObject *obj) const |
| Return index of object in collection. | |
| virtual void | Info (const char *method, const char *msgfmt,...) const |
| Issue info message. | |
| virtual Bool_t | InheritsFrom (const char *classname) const |
| Returns kTRUE if object inherits from class "classname". | |
| virtual Bool_t | InheritsFrom (const TClass *cl) const |
| Returns kTRUE if object inherits from TClass cl. | |
| virtual void | Inspect () const |
| Dump contents of this object in a graphics canvas. | |
| void | InvertBit (UInt_t f) |
| TClass * | IsA () const override |
| Bool_t | IsArgNull (const char *where, const TObject *obj) const |
| Returns true if object is a null pointer. | |
| Bool_t | IsDestructed () const |
| IsDestructed. | |
| virtual Bool_t | IsEmpty () const |
| virtual Bool_t | IsEqual (const TObject *obj) const |
| Default equal comparison (objects are equal if they have the same address in memory). | |
| Bool_t | IsFolder () const override |
| Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). | |
| Bool_t | IsOnHeap () const |
| Bool_t | IsOwner () const |
| Bool_t | IsSortable () const override |
| virtual Bool_t | IsSorted () const |
| Bool_t | IsUsingRWLock () const |
| Bool_t | IsZombie () const |
| TObject * | Last () const override |
| Int_t | LastIndex () const |
| void | ls (Option_t *option="") const override |
| List (ls) all objects in this collection. | |
| TIterator * | MakeIterator (Bool_t dir=kIterForward) const override |
| virtual TIterator * | MakeReverseIterator () const |
| void | MayNotUse (const char *method) const |
| Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). | |
| Long64_t | Merge (TCollection *list) |
| Merge this collection with all collections coming in the input list. | |
| Bool_t | Notify () override |
| 'Notify' all objects in this collection. | |
| void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
| Use this method to declare a method obsolete. | |
| void | operator delete (void *, size_t) |
| Operator delete for sized deallocation. | |
| void | operator delete (void *ptr) |
| Operator delete. | |
| void | operator delete (void *ptr, void *vp) |
| Only called by placement new when throwing an exception. | |
| void | operator delete[] (void *, size_t) |
| Operator delete [] for sized deallocation. | |
| void | operator delete[] (void *ptr) |
| Operator delete []. | |
| void | operator delete[] (void *ptr, void *vp) |
| Only called by placement new[] when throwing an exception. | |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *vp) |
| void * | operator new[] (size_t sz) |
| void * | operator new[] (size_t sz, void *vp) |
| TObject * | operator() (const char *name) const |
| Find an object in this collection by name. | |
| TObject * | operator[] (Int_t i) const |
| Int_t | Order () |
| void | Paint (Option_t *option="") override |
| Paint all objects in this collection. | |
| virtual void | Pop () |
| Pop on object drawn in a pad to the top of the display list. | |
| virtual void | Print (Option_t *option, const char *wildcard, Int_t recurse=1) const |
| Print the collection header and its elements that match the wildcard. | |
| virtual void | Print (Option_t *option, Int_t recurse) const |
| Print the collection header and its elements. | |
| virtual void | Print (Option_t *option, TPRegexp ®exp, Int_t recurse=1) const |
| Print the collection header and its elements that match the regexp. | |
| void | Print (Option_t *option="") const override |
| Default print for collections, calls Print(option, 1). | |
| Int_t | Rank (const TObject *obj) const |
| virtual Int_t | Read (const char *name) |
| Read contents of object with specified name from the current directory. | |
| void | RecursiveRemove (TObject *obj) override |
| Remove object from this collection and recursively remove the object from all other objects (and collections). | |
| TObject * | Remove (TObject *obj) override |
| virtual void | RemoveAfter (TObject *after) |
| void | RemoveAll () |
| virtual void | RemoveAll (TCollection *col) |
| Remove all objects in collection col from this collection. | |
| virtual TObject * | RemoveAt (Int_t idx) |
| virtual void | RemoveBefore (TObject *before) |
| virtual void | RemoveFirst () |
| virtual void | RemoveLast () |
| void | ResetBit (UInt_t f) |
| virtual void | SaveAs (const char *filename="", Option_t *option="") const |
| Save this object in the file specified by filename. | |
| virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
| Save a primitive as a C++ statement(s) on output stream "out". | |
| void | SetBit (UInt_t f) |
| void | SetBit (UInt_t f, Bool_t set) |
| Set or unset the user status bits as specified in f. | |
| void | SetCurrentCollection () |
| Set this collection to be the globally accessible collection. | |
| virtual void | SetDrawOption (Option_t *option="") |
| Set drawing option for object. | |
| void | SetName (const char *name) |
| virtual void | SetOwner (Bool_t enable=kTRUE) |
| Set whether this collection is the owner (enable==true) of its content. | |
| virtual void | SetUniqueID (UInt_t uid) |
| Set the unique object id. | |
| std::size_t | size () const |
| void | Streamer (TBuffer &) override |
| Stream an object of class TObject. | |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| virtual void | SysError (const char *method, const char *msgfmt,...) const |
| Issue system error message. | |
| Bool_t | TestBit (UInt_t f) const |
| Int_t | TestBits (UInt_t f) const |
| void | UnSort () |
| virtual void | UseCurrentStyle () |
| Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. | |
| virtual bool | UseRWLock (Bool_t enable=true) |
| Set this collection to use a RW lock upon access, making it thread safe. | |
| virtual void | Warning (const char *method, const char *msgfmt,...) const |
| Issue warning message. | |
| Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const override |
| Write all objects in this collection. | |
| Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override |
| Write all objects in this collection. | |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
| static void | EmptyGarbageCollection () |
| Do the garbage collection. | |
| static void | GarbageCollect (TObject *obj) |
| Add to the list of things to be cleaned up. | |
| static TCollection * | GetCurrentCollection () |
| Return the globally accessible collection. | |
| static Longptr_t | GetDtorOnly () |
| Return destructor only flag. | |
| static Bool_t | GetObjectStat () |
| Get status of object stat flag. | |
| static Int_t | ObjCompare (TObject *a, TObject *b) |
| Compare to objects in the collection. Use member Compare() of object a. | |
| static void | QSort (TObject **a, Int_t first, Int_t last) |
| Sort array of TObject pointers using a quicksort algorithm. | |
| static void | QSort (TObject **a, Int_t nBs, TObject ***b, Int_t first, Int_t last) |
| Sort array a of TObject pointers using a quicksort algorithm. | |
| static void | QSort (TObject **a, TObject **b, Int_t first, Int_t last) |
| static void | SetDtorOnly (void *obj) |
| Set destructor only flag. | |
| static void | SetObjectStat (Bool_t stat) |
| Turn on/off tracking of objects in the TObjectTable. | |
| static void | StartGarbageCollection () |
| Set up for garbage collection. | |
Protected Types | |
| enum | { kOnlyPrepStep = (1ULL << (3)) } |
| enum | EStatusBits { kIsOwner = (1ULL << (14)) , kUseRWLock = (1ULL << (16)) } |
Protected Member Functions | |
| virtual void | Changed () |
| void | DecrNofKeys () |
| virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
| Interface to ErrorHandler (protected). | |
| virtual const char * | GetCollectionEntryName (TObject *entry) const |
| For given collection entry return the string that is used to identify the object and, potentially, perform wildcard/regexp filtering on. | |
| Int_t | IdxAdd (const TObject &obj) |
| void | IncrNofKeys () |
| void | MakeZombie () |
| virtual void | PrintCollectionEntry (TObject *entry, Option_t *option, Int_t recurse) const |
| Print the collection entry. | |
| virtual void | PrintCollectionHeader (Option_t *option) const |
| Print the collection header. | |
Static Protected Member Functions | |
| static void | SavePrimitiveConstructor (std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE) |
| Save object constructor in the output stream "out". | |
| static void | SavePrimitiveDraw (std::ostream &out, const char *variable_name, Option_t *option=nullptr) |
| Save invocation of primitive Draw() method Skipped if option contains "nodraw" string. | |
| static TString | SavePrimitiveVector (std::ostream &out, const char *prefix, Int_t len, Double_t *arr, Int_t flag=0) |
| Save array in the output stream "out" as vector. | |
Protected Attributes | |
| TString | fName |
| Int_t | fSize |
| Bool_t | fSorted |
Private Member Functions | |
| void | Init (Int_t i) |
| void | RootIsEmpty () |
| void | RootIsFull () |
Static Private Member Functions | |
| static void | AddToTObjectTable (TObject *) |
| Private helper function which will dispatch to TObjectTable::AddObj. | |
Private Attributes | |
| UInt_t | fBits |
| bit field status word | |
| Int_t | fInnerLowWaterMark |
| Int_t | fInnerMaxIndex |
| Int_t | fLeafLowWaterMark |
| Int_t | fLeafMaxIndex |
| Int_t | fOrder |
| Int_t | fOrder2 |
| TBtNode * | fRoot |
| UInt_t | fUniqueID |
| object unique identifier | |
Static Private Attributes | |
| static TCollection * | fgCurrentCollection = nullptr |
| static Longptr_t | fgDtorOnly = 0 |
| object for which to call dtor only (i.e. no delete) | |
| static Bool_t | fgEmptyingGarbage = kFALSE |
| static TObjectTable * | fgGarbageCollection = nullptr |
| static Int_t | fgGarbageStack = 0 |
| static Bool_t | fgObjectStat = kTRUE |
| if true keep track of objects in TObjectTable | |
Friends | |
| class | TBtInnerNode |
| class | TBtLeafNode |
| class | TBtNode |
#include <TBtree.h>
| typedef TBtreeIter TBtree::Iterator_t |
|
inherited |
| Enumerator | |
|---|---|
| kInitCapacity | |
| kInitHashTableCapacity | |
Definition at line 159 of file TCollection.h.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
| Enumerator | |
|---|---|
| kIsOwner | |
| kUseRWLock | |
Definition at line 143 of file TCollection.h.
| TBtree::TBtree | ( | Int_t | ordern = 3 | ) |
|
virtual |
|
inherited |
Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it.
In other word, this method acts as a "runtime purely virtual" warning instead of a "compiler purely virtual" error.
Definition at line 1149 of file TObject.cxx.
|
overridevirtual |
Implements TCollection.
Reimplemented from TCollection.
Implements TSeqCollection.
Reimplemented from TSeqCollection.
|
virtualinherited |
Add all objects from collection col to this collection.
Reimplemented in THashTable.
Definition at line 226 of file TCollection.cxx.
Implements TSeqCollection.
Reimplemented from TSeqCollection.
Implements TSeqCollection.
Reimplemented from TSeqCollection.
|
inlineoverridevirtual |
Implements TSeqCollection.
Reimplemented from TSeqCollection.
|
inlineoverridevirtual |
Implements TSeqCollection.
Reimplemented from TSeqCollection.
|
staticprivateinherited |
Private helper function which will dispatch to TObjectTable::AddObj.
Included here to avoid circular dependency between header files.
Definition at line 195 of file TObject.cxx.
|
inherited |
Add all arguments to the collection.
The list of objects must be terminated by 0, e.g.: l.AddVector(o1, o2, o3, o4, 0);
Definition at line 239 of file TCollection.cxx.
Implements TSeqCollection.
|
virtualinherited |
Append graphics object to current pad.
In case no current pad is set yet, create a default canvas with the name "c1".
Definition at line 204 of file TObject.cxx.
Make sure all objects in this collection inherit from class cl.
Definition at line 254 of file TCollection.cxx.
Implements TSeqCollection.
Implements TSeqCollection.
|
inlineinherited |
Definition at line 294 of file TCollection.h.
|
overridevirtualinherited |
Browse this collection (called by TBrowser).
If b=0, there is no Browse call TObject::Browse(0) instead. This means TObject::Inspect() will be invoked indirectly
Reimplemented from TObject.
Reimplemented in TRootIconList.
Definition at line 279 of file TCollection.cxx.
|
inlineinherited |
Definition at line 168 of file TCollection.h.
|
inlineprotectedvirtualinherited |
Definition at line 34 of file TSeqCollection.h.
|
inlineinherited |
Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
The intent is for this routine to be called instead of directly calling the function Hash during "insert" operations. See TObject::HasInconsistenTObjectHash();
(*) The setup is consistent when all classes in the class hierarchy that overload TObject::Hash do call ROOT::CallRecursiveRemoveIfNeeded in their destructor. i.e. it is safe to call the Hash virtual function during the RecursiveRemove operation.
|
static |
|
static |
|
inlinestaticconstexpr |
|
virtualinherited |
Returns name of class to which the object belongs.
Definition at line 227 of file TObject.cxx.
|
overridevirtual |
Implements TCollection.
|
overridevirtualinherited |
Make a clone of an collection using the Streamer facility.
If newname is specified, this will be the name of the new collection.
Reimplemented from TObject.
Definition at line 294 of file TCollection.cxx.
Compare two TCollection objects.
Returns 0 when equal, -1 when this is smaller and +1 when bigger (like strcmp()).
Reimplemented from TObject.
Definition at line 306 of file TCollection.cxx.
|
inlineinherited |
Definition at line 172 of file TCollection.h.
Definition at line 173 of file TCollection.h.
|
virtualinherited |
Copy this to obj.
Reimplemented in ROOT::v5::TFormula, TArc, TArrow, TAxis3D, TAxis, TBox, TColor, TCrown, TDirectory, TDirectoryFile, TEllipse, TF12, TF1, TF1AbsComposition, TF1Convolution, TF1NormSum, TF2, TF3, TFile, TFolder, TFormula, TFrame, TGTextEdit, TGTextView, TH1, TH1C, TH1D, TH1F, TH1I, TH1L, TH1S, TH2, TH2C, TH2D, TH2F, TH2I, TH2L, TH2Poly, TH2S, TH3, TH3C, TH3D, TH3F, TH3I, TH3L, TH3S, THelix, TLatex, TLegend, TLegendEntry, TLine, TMarker, TMathText, TNamed, TPaletteAxis, TPave, TPaveClass, TPaveLabel, TPieSlice, TPolyLine3D, TPolyLine, TPolyMarker3D, TPolyMarker, TProfile2D, TProfile3D, TProfile, TStyle, TSystemDirectory, TSystemFile, TText, TWbox, and TXTRU.
Definition at line 159 of file TObject.cxx.
|
inlinestatic |
|
overridevirtual |
Delete this object.
Typically called as a command via the interpreter. Normally use "delete" operator when object has been allocated on the heap.
Implements TCollection.
Computes distance from point (px,py) to the object.
This member function must be implemented for each graphics primitive. This default function returns a big number (999999).
Reimplemented in TASImage, TAxis3D, TAxis, TBox, TBRIK, TColorWheel, TCrown, TCurlyArc, TCurlyLine, TDiamond, TEfficiency, TEllipse, TF1, TF2, TF3, TFileDrawMap, TGenerator, TGeoBBox, TGeoCompositeShape, TGeoCone, TGeoConeSeg, TGeoEltu, TGeoHalfSpace, TGeoHype, TGeoNode, TGeoOverlap, TGeoParaboloid, TGeoPcon, TGeoPgon, TGeoScaledShape, TGeoShape, TGeoShapeAssembly, TGeoSphere, TGeoTessellated, TGeoTorus, TGeoTrack, TGeoTube, TGeoTubeSeg, TGeoVGShape, TGeoVolume, TGeoXtru, TGL5DDataSet, TGLHistPainter, TGLParametricEquation, TGLScenePad, TGLTH3Composition, TGLViewer, TGraph2D, TGraph, TGraphEdge, TGraphNode, TGraphPolargram, TH1, THistPainter, THStack, TLine, TMarker3DBox, TMarker, TMultiGraph, TNode, TPad, TPaletteAxis, TParallelCoord, TParallelCoordRange, TParallelCoordVar, TParticle, TPave, TPCON, TPie, TPieSlice, TPoints3DABC, TPolyLine3D, TPolyLine, TPolyMarker3D, TPolyMarker, TPrimary, TScatter2D, TScatter, TSPHE, TSpider, TSpline, TStyle, TText, TTreePerfStats, TTUBE, TTUBS, TVirtualHistPainter, and TXTRU.
Definition at line 284 of file TObject.cxx.
|
protectedvirtualinherited |
Interface to ErrorHandler (protected).
Reimplemented in TThread, and TTreeViewer.
Definition at line 1059 of file TObject.cxx.
|
overridevirtualinherited |
Draw all objects in this collection.
Reimplemented from TObject.
Definition at line 315 of file TCollection.cxx.
|
virtualinherited |
Draw class inheritance tree of the class to which this object belongs.
If a class B inherits from a class A, description of B is drawn on the right side of description of A. Member functions overridden by B are shown in class A with a blue line crossing-out the corresponding member function. The following picture is the class inheritance tree of class TPaveLabel:
Reimplemented in TGFrame, TSystemDirectory, and TSystemFile.
Definition at line 308 of file TObject.cxx.
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
If pad was not selected - gPad will be used.
Reimplemented in TAxis, TCanvas, TGFrame, TSystemDirectory, and TSystemFile.
Definition at line 319 of file TObject.cxx.
|
overridevirtualinherited |
Dump all objects in this collection.
Reimplemented from TObject.
Definition at line 328 of file TCollection.cxx.
|
staticinherited |
Do the garbage collection.
Definition at line 741 of file TCollection.cxx.
|
inlineinherited |
Definition at line 295 of file TCollection.h.
|
virtualinherited |
Issue error message.
Use "location" to specify the method where the error occurred. Accepts standard printf formatting arguments.
Reimplemented in TFitResult.
Definition at line 1098 of file TObject.cxx.
|
virtualinherited |
Execute method on this object with the given parameter string, e.g.
"3.14,1,\"text\"".
Reimplemented in ROOT::R::TRInterface, TCling, TContextMenu, TInterpreter, and TMethodCall.
Definition at line 378 of file TObject.cxx.
|
virtualinherited |
Execute method on this object with parameters stored in the TObjArray.
The TObjArray should contain an argv vector like:
Reimplemented in ROOT::R::TRInterface, TCling, TContextMenu, TInterpreter, and TMethodCall.
Definition at line 398 of file TObject.cxx.
Execute action corresponding to an event at (px,py).
This method must be overridden if an object can react to graphics events.
Reimplemented in TASImage, TASPaletteEditor::LimitLine, TAxis3D, TAxis, TBox, TButton, TCanvas, TCrown, TCurlyArc, TCurlyLine, TDiamond, TEfficiency, TEllipse, TF1, TF2, TF3, TFrame, TGenerator, TGeoManager, TGeoNode, TGeoOverlap, TGeoShape, TGeoTrack, TGeoVolume, TGL5DDataSet, TGLEventHandler, TGLHistPainter, TGLParametricEquation, TGLScenePad, TGLTH3Composition, TGLViewer, TGraph2D, TGraph, TGraphEdge, TGraphNode, TGraphPolargram, TGroupButton, TH1, THistPainter, TLine, TLink, TMarker3DBox, TMarker, TNode, TPad, TPaletteAxis, TParallelCoord, TParallelCoordRange, TParallelCoordVar, TParticle, TPave, TPie, TPolyLine3D, TPolyLine, TPolyMarker3D, TPolyMarker, TPrimary, TScatter2D, TScatter, TSliderBox, TSpider, TSpline, TText, TTreePerfStats, TView3D, TView, TVirtualHistPainter, and TWbox.
Definition at line 415 of file TObject.cxx.
|
virtualinherited |
Issue fatal error message.
Use "location" to specify the method where the fatal error occurred. Accepts standard printf formatting arguments.
Definition at line 1126 of file TObject.cxx.
|
overridevirtual |
Must be redefined in derived classes.
This function is typically used with TCollections, but can also be used to find an object by name inside this object.
Reimplemented from TObject.
Must be redefined in derived classes.
This function is typically used with TCollections, but can also be used to find an object inside this object.
Reimplemented from TObject.
|
inlineoverridevirtual |
Implements TSeqCollection.
|
staticinherited |
Add to the list of things to be cleaned up.
Definition at line 756 of file TCollection.cxx.
|
protectedvirtualinherited |
For given collection entry return the string that is used to identify the object and, potentially, perform wildcard/regexp filtering on.
Definition at line 468 of file TCollection.cxx.
|
staticinherited |
Return the globally accessible collection.
Definition at line 711 of file TCollection.cxx.
|
virtualinherited |
Get option used by the graphics system to draw this object.
Note that before calling object.GetDrawOption(), you must have called object.Draw(..) before in the current pad.
Reimplemented in TBrowser, TFitEditor, TGedFrame, TGFileBrowser, TRootBrowser, and TRootBrowserLite.
Definition at line 445 of file TObject.cxx.
|
staticinherited |
Return destructor only flag.
Definition at line 1196 of file TObject.cxx.
|
inlinevirtualinherited |
Reimplemented in TObjArray, and TRefArray.
Definition at line 180 of file TCollection.h.
|
virtualinherited |
Returns mime type name of object.
Used by the TBrowser (via TGMimeTypes class). Override for class of which you would like to have different icons for objects of the same class.
Reimplemented in ROOT::Experimental::XRooFit::xRooNode, TASImage, TBranch, TBranchElement, TGeoVolume, TGMainFrame, TKey, TMethodBrowsable, TSystemFile, and TVirtualBranchBrowsable.
Definition at line 472 of file TObject.cxx.
|
virtualinherited |
Returns index of last object in collection.
Returns -1 when no objects in collection.
Reimplemented in TListOfEnumsWithLock, TListOfFunctions, TObjArray, and TRefArray.
Definition at line 46 of file TSeqCollection.cxx.
|
overridevirtualinherited |
Return name of this collection.
if no name, return the collection class name.
Reimplemented from TObject.
Reimplemented in TQCommand, and TQConnection.
Definition at line 382 of file TCollection.cxx.
Returns string containing info about the object at position (px,py).
This method is typically overridden by classes of which the objects can report peculiarities for different positions. Returned string will be re-used (lock in MT environment).
Reimplemented in TASImage, TAxis3D, TColorWheel, TF1, TF2, TFileDrawMap, TGeoNode, TGeoTrack, TGeoVolume, TGL5DDataSet, TGLHistPainter, TGLParametricEquation, TGLTH3Composition, TGraph, TH1, THistPainter, TNode, TPaletteAxis, TParallelCoordVar, and TVirtualHistPainter.
Definition at line 491 of file TObject.cxx.
Implements TCollection.
|
staticinherited |
Get status of object stat flag.
Definition at line 1181 of file TObject.cxx.
|
inlinevirtualinherited |
Reimplemented in TArrow, TAxis3D, TFile, TGaxis, TGeoVolume, TH1, THelix, TLegendEntry, TMapFile, TNode, TPave, TPoints3DABC, TPolyLine3D, TPolyLine, TPolyMarker3D, TPolyMarker, TPSocket, TSelector, TSocket, and TUDPSocket.
|
inlinevirtualinherited |
Return the capacity of the collection, i.e.
the current total amount of space that has been allocated so far. Same as Capacity. Use GetEntries to get the number of elements currently in the collection.
Reimplemented in THashTable, TListOfEnumsWithLock, TListOfFunctions, TViewPubDataMembers, and TViewPubFunctions.
Definition at line 186 of file TCollection.h.
|
virtualinherited |
Returns title of object.
This default method returns the class title (i.e. description). Classes that give objects a title should override this method.
Reimplemented in Axis2, TASImage, TAxis, TBaseClass, TClassMenuItem, TEveGeoNode, TEvePointSet, TGaxis, TGGroupFrame, TGLabel, TGLVEntry, TGTextButton, TGTextEntry, TGTextLBEntry, TKey, TMapFile, TNamed, TPad, TPair, TParallelCoordSelect, TParticle, TPaveLabel, TPrimary, TQCommand, TRootIconList, and TVirtualPad.
Definition at line 507 of file TObject.cxx.
|
virtualinherited |
Return the unique object id.
Definition at line 480 of file TObject.cxx.
Increase the collection's capacity by delta slots.
Definition at line 391 of file TCollection.cxx.
Execute action in response of a timer timing out.
This method must be overridden if an object has to react to timers.
Reimplemented in TGCommandPlugin, TGDNDManager, TGFileContainer, TGHtml, TGLEventHandler, TGPopupMenu, TGraphTime, TGScrollBar, TGShutter, TGTextEdit, TGTextEditor, TGTextEntry, TGTextView, TGToolTip, TGuiBldDragManager, TGWindow, and TTreeViewer.
Definition at line 516 of file TObject.cxx.
|
inlineoverridevirtualinherited |
Return hash value for this object.
Note: If this routine is overloaded in a derived class, this derived class should also add
Otherwise, when RecursiveRemove is called (by ~TObject or example) for this type of object, the transversal of THashList and THashTable containers will will have to be done without call Hash (and hence be linear rather than logarithmic complexity). You will also see warnings like
Reimplemented from TObject.
Definition at line 188 of file TCollection.h.
|
inlineinherited |
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
missing call to RecursiveRemove in destructor).
Note: Since the consistency is only tested for during inserts, this routine will return true for object that have never been inserted whether or not they have a consistent setup. This has no negative side-effect as searching for the object with the right or wrong Hash will always yield a not-found answer (Since anyway no hash can be guaranteed unique, there is always a check)
Return index of object in collection.
Returns -1 when object not found. Uses member IsEqual() to find object.
Reimplemented in TListOfEnumsWithLock, TListOfFunctions, TObjArray, TOrdCollection, and TRefArray.
Definition at line 29 of file TSeqCollection.cxx.
|
virtualinherited |
Issue info message.
Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.
Definition at line 1072 of file TObject.cxx.
|
virtualinherited |
Returns kTRUE if object inherits from class "classname".
Reimplemented in TClass.
Definition at line 549 of file TObject.cxx.
Returns kTRUE if object inherits from TClass cl.
Reimplemented in TClass.
Definition at line 557 of file TObject.cxx.
|
private |
|
virtualinherited |
Dump contents of this object in a graphics canvas.
Same action as Dump but in a graphical form. In addition pointers to other objects can be followed.
The following picture is the Inspect of a histogram object:
Reimplemented in ROOT::Experimental::XRooFit::xRooNode, TGFrame, TInspectorObject, and TSystemFile.
Definition at line 570 of file TObject.cxx.
|
inlineoverridevirtual |
Returns true if object is a null pointer.
Definition at line 403 of file TCollection.cxx.
|
inlineinherited |
IsDestructed.
|
inlinevirtualinherited |
Reimplemented in TObjArray, and TRefArray.
Definition at line 190 of file TCollection.h.
Default equal comparison (objects are equal if they have the same address in memory).
More complicated classes might want to override this function.
Reimplemented in TGObject, TObjString, TPair, and TQCommand.
Definition at line 589 of file TObject.cxx.
|
inlineoverridevirtualinherited |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Reimplemented from TObject.
Reimplemented in TRootIconList.
Definition at line 191 of file TCollection.h.
|
inlineinherited |
Definition at line 192 of file TCollection.h.
|
inlineoverridevirtualinherited |
Reimplemented from TObject.
Definition at line 193 of file TCollection.h.
|
inlinevirtualinherited |
Reimplemented in TSortedList.
Definition at line 64 of file TSeqCollection.h.
|
inlineinherited |
Definition at line 214 of file TCollection.h.
|
inlineoverridevirtual |
Implements TSeqCollection.
|
inlineinherited |
Definition at line 61 of file TSeqCollection.h.
|
overridevirtualinherited |
List (ls) all objects in this collection.
Wildcarding supported, eg option="xxx*" lists only objects with names xxx*.
Reimplemented from TObject.
Reimplemented in TQCommand, TQConnection, TQConnectionList, and TQUndoManager.
Definition at line 413 of file TCollection.cxx.
|
overridevirtual |
Implements TCollection.
|
inlinevirtualinherited |
Definition at line 197 of file TCollection.h.
|
inherited |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
Definition at line 1160 of file TObject.cxx.
|
inherited |
Merge this collection with all collections coming in the input list.
The input list must contain other collections of objects compatible with the ones in this collection and ordered in the same manner. For example, if this collection contains a TH1 object and a tree, all collections in the input list have to contain a histogram and a tree. In case the list contains collections, the objects in the input lists must also be collections with the same structure and number of objects. If some objects inside the collection are instances of a class that do not have a Merge function (like TObjString), rather than merging, a copy of each instance (via a call to Clone) is appended to the output.
Definition at line 184 of file TSeqCollection.cxx.
|
overridevirtualinherited |
'Notify' all objects in this collection.
Reimplemented from TObject.
Reimplemented in TGTextEditHist.
Definition at line 438 of file TCollection.cxx.
Compare to objects in the collection. Use member Compare() of object a.
Definition at line 55 of file TSeqCollection.cxx.
|
inherited |
Use this method to declare a method obsolete.
Specify as of which version the method is obsolete and as from which version it will be removed.
Definition at line 1169 of file TObject.cxx.
|
inherited |
Operator delete for sized deallocation.
Definition at line 1234 of file TObject.cxx.
|
inherited |
Operator delete.
Definition at line 1212 of file TObject.cxx.
|
inherited |
Only called by placement new when throwing an exception.
Definition at line 1266 of file TObject.cxx.
|
inherited |
Operator delete [] for sized deallocation.
Definition at line 1245 of file TObject.cxx.
|
inherited |
Operator delete [].
Definition at line 1223 of file TObject.cxx.
|
inherited |
Only called by placement new[] when throwing an exception.
Definition at line 1274 of file TObject.cxx.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Find an object in this collection by name.
Definition at line 356 of file TCollection.cxx.
|
overridevirtualinherited |
Paint all objects in this collection.
Reimplemented from TObject.
Definition at line 448 of file TCollection.cxx.
|
virtualinherited |
Pop on object drawn in a pad to the top of the display list.
I.e. it will be drawn last and on top of all other primitives.
Reimplemented in TFrame, TPad, and TVirtualPad.
Definition at line 640 of file TObject.cxx.
|
virtualinherited |
Print the collection header and its elements that match the wildcard.
If recurse is non-zero, descend into printing of collection-entries with recurse - 1. This means, if recurse is negative, the recursion is infinite.
Option is passed recursively, but wildcard is only used on the first level.
Reimplemented in THashTable.
Definition at line 548 of file TCollection.cxx.
Print the collection header and its elements.
If recurse is non-zero, descend into printing of collection-entries with recurse - 1. This means, if recurse is negative, the recursion is infinite.
Option is passed recursively.
Reimplemented in THashTable.
Definition at line 521 of file TCollection.cxx.
|
virtualinherited |
Print the collection header and its elements that match the regexp.
If recurse is non-zero, descend into printing of collection-entries with recurse - 1. This means, if recurse is negative, the recursion is infinite.
Option is passed recursively, but regexp is only used on the first level.
Reimplemented in THashTable.
Definition at line 581 of file TCollection.cxx.
|
overridevirtualinherited |
Default print for collections, calls Print(option, 1).
This will print the collection header and Print() methods of all the collection entries.
If you want to override Print() for a collection class, first see if you can accomplish it by overriding the following protected methods:
Otherwise override the Print(Option_t *option, Int_t) variant. Remember to declare:
somewhere close to the method declaration.
Reimplemented from TObject.
Reimplemented in THashTable.
Definition at line 507 of file TCollection.cxx.
|
protectedvirtualinherited |
Print the collection entry.
Reimplemented in TMap, and TQUndoManager.
Definition at line 476 of file TCollection.cxx.
|
protectedvirtualinherited |
Print the collection header.
Reimplemented in TQCommand, and TQConnection.
Definition at line 456 of file TCollection.cxx.
Sort array of TObject pointers using a quicksort algorithm.
The algorithm used is a non stable sort (i.e. already sorted elements might switch/change places). Uses ObjCompare() to compare objects.
Definition at line 69 of file TSeqCollection.cxx.
|
staticinherited |
Sort array a of TObject pointers using a quicksort algorithm.
Arrays b will be sorted just like a (a determines the sort). Argument nBs is the number of TObject** arrays in b. The algorithm used is a non stable sort (i.e. already sorted elements might switch/change places). Uses ObjCompare() to compare objects.
Definition at line 117 of file TSeqCollection.cxx.
|
inlinestaticinherited |
Definition at line 70 of file TSeqCollection.h.
|
virtualinherited |
Read contents of object with specified name from the current directory.
First the key with the given name is searched in the current directory, next the key buffer is deserialized into the object. The object must have been created before via the default constructor. See TObject::Write().
Reimplemented in TBuffer, TKey, TKeySQL, and TKeyXML.
Definition at line 673 of file TObject.cxx.
|
overridevirtualinherited |
Remove object from this collection and recursively remove the object from all other objects (and collections).
Reimplemented from TObject.
Reimplemented in THashList, TList, TListOfDataMembers, TListOfEnums, TListOfEnumsWithLock, TListOfFunctions, TListOfFunctionTemplates, TObjArray, TRootBrowserHistory, TViewPubDataMembers, and TViewPubFunctions.
Definition at line 605 of file TCollection.cxx.
Implements TCollection.
|
inlinevirtualinherited |
Definition at line 53 of file TSeqCollection.h.
|
inlineinherited |
Definition at line 206 of file TCollection.h.
|
virtualinherited |
Remove all objects in collection col from this collection.
Definition at line 625 of file TCollection.cxx.
Reimplemented in TClonesArray, TObjArray, TOrdCollection, and TRefArray.
Definition at line 52 of file TSeqCollection.h.
|
inlinevirtualinherited |
Definition at line 54 of file TSeqCollection.h.
|
inlinevirtualinherited |
Definition at line 50 of file TSeqCollection.h.
|
inlinevirtualinherited |
Reimplemented in TList.
Definition at line 51 of file TSeqCollection.h.
|
private |
|
private |
|
virtualinherited |
Save this object in the file specified by filename.
otherwise the object is written to filename as a CINT/C++ script. The C++ code to rebuild this object is generated via SavePrimitive(). The "option" parameter is passed to SavePrimitive. By default it is an empty string. It can be used to specify the Draw option in the code generated by SavePrimitive.
The function is available via the object context menu.
Reimplemented in ROOT::Experimental::XRooFit::xRooNode, TClassTree, TFolder, TGeoVolume, TGObject, TGraph, TH1, TPad, TPaveClass, TSpline3, TSpline5, TSpline, TTreePerfStats, and TVirtualPad.
Definition at line 708 of file TObject.cxx.
|
virtualinherited |
Save a primitive as a C++ statement(s) on output stream "out".
Reimplemented in TAnnotation, TArc, TArrow, TASImage, TAxis3D, TBox, TButton, TCanvas, TChain, TCrown, TCurlyArc, TCurlyLine, TCutG, TDiamond, TEfficiency, TEllipse, TExec, TF12, TF1, TF2, TF3, TFrame, TGaxis, TGButton, TGButtonGroup, TGCanvas, TGCheckButton, TGColorSelect, TGColumnLayout, TGComboBox, TGCompositeFrame, TGContainer, TGDockableFrame, TGDoubleHSlider, TGDoubleVSlider, TGedMarkerSelect, TGedPatternSelect, TGeoArb8, TGeoBBox, TGeoBoolNode, TGeoCombiTrans, TGeoCompositeShape, TGeoCone, TGeoConeSeg, TGeoCtub, TGeoDecayChannel, TGeoElementRN, TGeoEltu, TGeoGtra, TGeoHalfSpace, TGeoHMatrix, TGeoHype, TGeoIdentity, TGeoIntersection, TGeoMaterial, TGeoMedium, TGeoMixture, TGeoPara, TGeoParaboloid, TGeoPatternCylPhi, TGeoPatternCylR, TGeoPatternParaX, TGeoPatternParaY, TGeoPatternParaZ, TGeoPatternSphPhi, TGeoPatternSphR, TGeoPatternSphTheta, TGeoPatternTrapZ, TGeoPatternX, TGeoPatternY, TGeoPatternZ, TGeoPcon, TGeoPgon, TGeoRotation, TGeoScaledShape, TGeoShapeAssembly, TGeoSphere, TGeoSubtraction, TGeoTessellated, TGeoTorus, TGeoTranslation, TGeoTrap, TGeoTrd1, TGeoTrd2, TGeoTube, TGeoTubeSeg, TGeoUnion, TGeoVolume, TGeoXtru, TGFileContainer, TGFont, TGFrame, TGFSComboBox, TGGC, TGGroupFrame, TGHButtonGroup, TGHorizontal3DLine, TGHorizontalFrame, TGHorizontalLayout, TGHProgressBar, TGHScrollBar, TGHSlider, TGHSplitter, TGHtml, TGIcon, TGLabel, TGLayoutHints, TGLineStyleComboBox, TGLineWidthComboBox, TGListBox, TGListDetailsLayout, TGListLayout, TGListTree, TGListView, TGLVContainer, TGMainFrame, TGMatrixLayout, TGMdiFrame, TGMdiMainFrame, TGMdiMenuBar, TGMenuBar, TGMenuTitle, TGNumberEntry, TGNumberEntryField, TGPictureButton, TGPopupMenu, TGProgressBar, TGRadioButton, TGraph2D, TGraph2DAsymmErrors, TGraph2DErrors, TGraph, TGraphAsymmErrors, TGraphBentErrors, TGraphEdge, TGraphErrors, TGraphMultiErrors, TGraphNode, TGraphPolar, TGraphPolargram, TGraphStruct, TGroupButton, TGRowLayout, TGShapedFrame, TGShutter, TGShutterItem, TGSplitFrame, TGStatusBar, TGTab, TGTabLayout, TGTableLayout, TGTableLayoutHints, TGTextButton, TGTextEdit, TGTextEntry, TGTextLBEntry, TGTextView, TGTileLayout, TGToolBar, TGTransientFrame, TGTripleHSlider, TGTripleVSlider, TGVButtonGroup, TGVertical3DLine, TGVerticalFrame, TGVerticalLayout, TGVFileSplitter, TGVProgressBar, TGVScrollBar, TGVSlider, TGVSplitter, TGXYLayout, TGXYLayoutHints, TH1, TH2Poly, THelix, THStack, TLatex, TLegend, TLine, TMacro, TMarker3DBox, TMarker, TMathText, TMultiGraph, TPad, TPaletteAxis, TParallelCoord, TParallelCoordVar, TPave, TPaveClass, TPaveLabel, TPaveStats, TPavesText, TPaveText, TPie, TPieSlice, TPolyLine3D, TPolyLine, TPolyMarker3D, TPolyMarker, TProfile2D, TProfile3D, TProfile, TRootContainer, TRootEmbeddedCanvas, TScatter2D, TScatter, TSlider, TSliderBox, TSpline3, TSpline5, TStyle, TText, TTreePerfStats, and TWbox.
Definition at line 858 of file TObject.cxx.
|
staticprotectedinherited |
Save object constructor in the output stream "out".
Can be used as first statement when implementing SavePrimitive() method for the object
Definition at line 777 of file TObject.cxx.
|
staticprotectedinherited |
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
Definition at line 845 of file TObject.cxx.
|
staticprotectedinherited |
Save array in the output stream "out" as vector.
Create unique variable name based on prefix value Returns name of vector which can be used in constructor or in other places of C++ code If flag === kTRUE, just add empty line If flag === 111, check if array is empty and return nullptr or <vectorname>.data()
Definition at line 796 of file TObject.cxx.
Set or unset the user status bits as specified in f.
Definition at line 888 of file TObject.cxx.
|
inherited |
Set this collection to be the globally accessible collection.
Definition at line 719 of file TCollection.cxx.
|
virtualinherited |
Set drawing option for object.
This option only affects the drawing style and is stored in the option field of the TObjOptLink supporting a TPad's primitive list (TList). Note that it does not make sense to call object.SetDrawOption(option) before having called object.Draw().
Reimplemented in RooPlot, TAxis, TBrowser, TGedFrame, TGFrame, TPad, TPaveStats, TRootBrowserLite, TSystemDirectory, and TSystemFile.
Definition at line 871 of file TObject.cxx.
|
staticinherited |
Set destructor only flag.
Definition at line 1204 of file TObject.cxx.
|
inlineinherited |
Definition at line 208 of file TCollection.h.
|
staticinherited |
Turn on/off tracking of objects in the TObjectTable.
Definition at line 1188 of file TObject.cxx.
Set whether this collection is the owner (enable==true) of its content.
If it is the owner of its contents, these objects will be deleted whenever the collection itself is deleted. The objects might also be deleted or destructed when Clear is called (depending on the collection).
Reimplemented in TClonesArray.
Definition at line 777 of file TCollection.cxx.
|
virtualinherited |
Set the unique object id.
Definition at line 899 of file TObject.cxx.
|
inlineinherited |
Definition at line 181 of file TCollection.h.
|
staticinherited |
Set up for garbage collection.
Definition at line 727 of file TCollection.cxx.
|
overridevirtual |
Stream an object of class TObject.
Reimplemented from TObject.
|
inline |
|
virtualinherited |
Issue system error message.
Use "location" to specify the method where the system error occurred. Accepts standard printf formatting arguments.
Definition at line 1112 of file TObject.cxx.
|
inlineinherited |
Definition at line 65 of file TSeqCollection.h.
|
virtualinherited |
Set this collection to use a RW lock upon access, making it thread safe.
Return the previous state.
Note: To test whether the usage is enabled do: collection->TestBit(TCollection::kUseRWLock);
Reimplemented in THashList.
Definition at line 792 of file TCollection.cxx.
|
virtualinherited |
Issue warning message.
Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.
Definition at line 1084 of file TObject.cxx.
|
overridevirtualinherited |
Write all objects in this collection.
By default all objects in the collection are written individually (each object gets its own key). Note, this is recursive, i.e. objects in collections in the collection are also written individually. To write all objects using a single key specify a name and set option to TObject::kSingleKey (i.e. 1).
Reimplemented from TObject.
Reimplemented in TMap.
Definition at line 679 of file TCollection.cxx.
|
overridevirtualinherited |
Write all objects in this collection.
By default all objects in the collection are written individually (each object gets its own key). Note, this is recursive, i.e. objects in collections in the collection are also written individually. To write all objects using a single key specify a name and set option to TObject::kSingleKey (i.e. 1).
Reimplemented from TObject.
Reimplemented in TMap.
Definition at line 703 of file TCollection.cxx.
|
friend |
|
friend |
|
privateinherited |
|
staticprivateinherited |
Definition at line 134 of file TCollection.h.
|
staticprivateinherited |
Definition at line 136 of file TCollection.h.
|
staticprivateinherited |
Definition at line 135 of file TCollection.h.
|
staticprivateinherited |
Definition at line 137 of file TCollection.h.
|
protectedinherited |
Definition at line 149 of file TCollection.h.
|
protectedinherited |
Definition at line 150 of file TCollection.h.
|
protectedinherited |
Definition at line 31 of file TSeqCollection.h.
|
privateinherited |