Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TObject.h
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Rene Brun 26/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TObject
13#define ROOT_TObject
14
15
16// #include "RConfigure.h" // included via Rtypes.h
17#include "Rtypes.h"
18#include "TStorage.h"
19#include "TVersionCheck.h"
20
21#include <stdarg.h>
22#include <string>
23#include <iosfwd>
24
25#ifdef WIN32
26#undef RemoveDirectory
27#endif
28
29class TList;
30class TBrowser;
31class TBuffer;
32class TObjArray;
33class TMethod;
34class TTimer;
35
36namespace ROOT {
37namespace Internal {
39}}
40
41class TObject {
42
43private:
44 UInt_t fUniqueID; ///< object unique identifier
45 UInt_t fBits; ///< bit field status word
46
47 static Longptr_t fgDtorOnly; ///< object for which to call dtor only (i.e. no delete)
48 static Bool_t fgObjectStat; ///< if true keep track of objects in TObjectTable
49
50 static void AddToTObjectTable(TObject *);
51
52protected:
53 void MakeZombie() { fBits |= kZombie; }
54 virtual void DoError(int level, const char *location, const char *fmt, va_list va) const;
55
56public:
57 //----- Global bits (can be set for any object and should not be reused).
58 //----- Bits 0 - 13 are reserved as global bits. Bits 14 - 23 can be used
59 //----- in different class hierarchies (make sure there is no overlap in
60 //----- any given hierarchy).
62 kCanDelete = BIT(0), ///< if object in a list can be deleted
63 // 2 is taken by TDataMember
64 kMustCleanup = BIT(3), ///< if object destructor must call RecursiveRemove()
65 kIsReferenced = BIT(4), ///< if object is referenced by a TRef or TRefArray
66 kHasUUID = BIT(5), ///< if object has a TUUID (its fUniqueID=UUIDNumber)
67 kCannotPick = BIT(6), ///< if object in a pad cannot be picked
68 // 7 is taken by TAxis and TClass.
69 kNoContextMenu = BIT(8), ///< if object does not want context menu
70 // 9, 10 are taken by TH1, TF1, TAxis and a few others
71 // 12 is taken by TAxis
72 kInvalidObject = BIT(13) ///< if object ctor succeeded but object should not be used
73 };
74
76 kObjInCanvas = BIT(3) ///< for backward compatibility only, use kMustCleanup
77 };
78
79 //----- Private bits, clients can only test but not change them
80 enum {
81 kIsOnHeap = 0x01000000, ///< object is on heap
82 kNotDeleted = 0x02000000, ///< object has not been deleted
83 kZombie = 0x04000000, ///< object ctor failed
84 kInconsistent = 0x08000000, ///< class overload Hash but does call RecursiveRemove in destructor
85 // kCheckedHash = 0x10000000, ///< CheckedHash has check for the consistency of Hash/RecursiveRemove
86 kBitMask = 0x00ffffff
87 };
88
89 //----- Write() options
90 enum {
91 kSingleKey = BIT(0), ///< write collection with single key
92 kOverwrite = BIT(1), ///< overwrite existing object with same name
93 kWriteDelete = BIT(2), ///< write object, then delete previous key with same name
94 };
95
96protected:
97 enum { // DeprectatedWriteOptions
98 ///< Used to request that the class specific implementation of `TObject::Write`
99 ///< just prepare the objects to be ready to be written but do not actually write
100 ///< them into the TBuffer. This is just for example by TBufferMerger to request
101 ///< that the TTree inside the file calls `TTree::FlushBaskets` (outside of the merging lock)
102 ///< and TBufferMerger will later ask for the write (inside the merging lock).
103 ///< To take advantage of this feature the class needs to overload `TObject::Write`
104 ///< and use this enum value accordingly. (See `TTree::Write` and `TObject::Write`)
105 ///< Do not use, this feature will be migrate to the Merge function (See TClass and TTree::Merge)
106 kOnlyPrepStep = BIT(3)
107 };
108
109public:
110
111 TObject();
112 TObject(const TObject &object);
113 TObject &operator=(const TObject &rhs);
114 virtual ~TObject();
115
116 virtual void AppendPad(Option_t *option="");
117 virtual void Browse(TBrowser *b);
118 virtual const char *ClassName() const;
119 virtual void Clear(Option_t * /*option*/ ="") { }
120 ULong_t CheckedHash(); // Not virtual
121 virtual TObject *Clone(const char *newname="") const;
122 virtual Int_t Compare(const TObject *obj) const;
123 virtual void Copy(TObject &object) const;
124 virtual void Delete(Option_t *option=""); // *MENU*
125 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
126 virtual void Draw(Option_t *option="");
127 virtual void DrawClass() const; // *MENU*
128 virtual TObject *DrawClone(Option_t *option="") const; // *MENU*
129 virtual void Dump() const; // *MENU*
130 virtual void Execute(const char *method, const char *params, Int_t *error = nullptr);
131 virtual void Execute(TMethod *method, TObjArray *params, Int_t *error = nullptr);
132 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
133 virtual TObject *FindObject(const char *name) const;
134 virtual TObject *FindObject(const TObject *obj) const;
135 virtual Option_t *GetDrawOption() const;
136 virtual UInt_t GetUniqueID() const;
137 virtual const char *GetName() const;
138 virtual const char *GetIconName() const;
139 virtual Option_t *GetOption() const { return ""; }
140 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
141 virtual const char *GetTitle() const;
142 virtual Bool_t HandleTimer(TTimer *timer);
144 virtual ULong_t Hash() const;
145 virtual Bool_t InheritsFrom(const char *classname) const;
146 virtual Bool_t InheritsFrom(const TClass *cl) const;
147 virtual void Inspect() const; // *MENU*
148 virtual Bool_t IsFolder() const;
149 virtual Bool_t IsEqual(const TObject *obj) const;
150 virtual Bool_t IsSortable() const { return kFALSE; }
151
154
155 virtual Bool_t Notify();
156 virtual void ls(Option_t *option="") const;
157 virtual void Paint(Option_t *option="");
158 virtual void Pop();
159 virtual void Print(Option_t *option="") const;
160 virtual Int_t Read(const char *name);
161 virtual void RecursiveRemove(TObject *obj);
162 virtual void SaveAs(const char *filename="",Option_t *option="") const; // *MENU*
163 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
164 virtual void SetDrawOption(Option_t *option=""); // *MENU*
165 virtual void SetUniqueID(UInt_t uid);
166 virtual void UseCurrentStyle();
167 virtual Int_t Write(const char *name = nullptr, Int_t option = 0, Int_t bufsize = 0);
168 virtual Int_t Write(const char *name = nullptr, Int_t option = 0, Int_t bufsize = 0) const;
169
170 /// IsDestructed
171 ///
172 /// \note This function must be non-virtual as it can be used on destructed (but
173 /// not yet modified) memory. This is used for example in TClonesArray to record
174 /// the element that have been destructed but not deleted and thus are ready for
175 /// re-use (by operator new with placement).
176 ///
177 /// \return true if this object's destructor has been run.
179
180 //----- operators
181 void *operator new(size_t sz) { return TStorage::ObjectAlloc(sz); }
182 void *operator new[](size_t sz) { return TStorage::ObjectAllocArray(sz); }
183 void *operator new(size_t sz, void *vp) { return TStorage::ObjectAlloc(sz, vp); }
184 void *operator new[](size_t sz, void *vp) { return TStorage::ObjectAlloc(sz, vp); }
185 void operator delete(void *ptr);
186 void operator delete[](void *ptr);
187#ifdef R__SIZEDDELETE
188 // Sized deallocation.
189 void operator delete(void*, size_t);
190 void operator delete[](void*, size_t);
191#endif
192 void operator delete(void *ptr, void *vp);
193 void operator delete[](void *ptr, void *vp);
194
195 //----- bit manipulation
196 void SetBit(UInt_t f, Bool_t set);
197 void SetBit(UInt_t f) { fBits |= f & kBitMask; }
198 void ResetBit(UInt_t f) { fBits &= ~(f & kBitMask); }
199 R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((fBits & f) != 0); }
200 Int_t TestBits(UInt_t f) const { return (Int_t) (fBits & f); }
202
203 //---- error handling
204 virtual void Info(const char *method, const char *msgfmt, ...) const
205#if defined(__GNUC__) && !defined(__CINT__)
206 __attribute__((format(printf, 3, 4))) /* 1 is the this pointer */
207#endif
208 ;
209 virtual void Warning(const char *method, const char *msgfmt, ...) const
210#if defined(__GNUC__) && !defined(__CINT__)
211 __attribute__((format(printf, 3, 4))) /* 1 is the this pointer */
212#endif
213 ;
214 virtual void Error(const char *method, const char *msgfmt, ...) const
215#if defined(__GNUC__) && !defined(__CINT__)
216 __attribute__((format(printf, 3, 4))) /* 1 is the this pointer */
217#endif
218 ;
219 virtual void SysError(const char *method, const char *msgfmt, ...) const
220#if defined(__GNUC__) && !defined(__CINT__)
221 __attribute__((format(printf, 3, 4))) /* 1 is the this pointer */
222#endif
223 ;
224 virtual void Fatal(const char *method, const char *msgfmt, ...) const
225#if defined(__GNUC__) && !defined(__CINT__)
226 __attribute__((format(printf, 3, 4))) /* 1 is the this pointer */
227#endif
228 ;
229
230 void AbstractMethod(const char *method) const;
231 void MayNotUse(const char *method) const;
232 void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const;
233
234 //---- static functions
235 static Longptr_t GetDtorOnly();
236 static void SetDtorOnly(void *obj);
237 static Bool_t GetObjectStat();
238 static void SetObjectStat(Bool_t stat);
239
240 friend class TClonesArray; // needs to reset kNotDeleted in fBits
242
243 ClassDef(TObject,1) //Basic ROOT object
244};
245
246////////////////////////////////////////////////////////////////////////////////
247/// TObject constructor. It sets the two data words of TObject to their
248/// initial values. The unique ID is set to 0 and the status word is
249/// set depending if the object is created on the stack or allocated
250/// on the heap. Depending on the ROOT environment variable "Root.ObjStat"
251/// (see TEnv) the object is added to the global TObjectTable for
252/// bookkeeping.
253
254inline TObject::TObject() : fBits(kNotDeleted) // Need to leave fUniqueID unset
255{
256 // This will be reported by valgrind as uninitialized memory reads for
257 // object created on the stack, use $ROOTSYS/etc/valgrind-root.supp
259
260 fUniqueID = 0;
261
262#ifdef R__WIN32
264#else
266#endif
267}
268
269////////////////////////////////////////////////////////////////////////////////
270/// TObject copy ctor.
271
272inline TObject::TObject(const TObject &obj)
273{
274 fBits = obj.fBits;
275
276 // This will be reported by valgrind as uninitialized memory reads for
277 // object created on the stack, use $ROOTSYS/etc/valgrind-root.supp
279
280 fBits &= ~kIsReferenced;
281 fBits &= ~kCanDelete;
282
283 // Set only after used in above call
284 fUniqueID = obj.fUniqueID; // when really unique don't copy
285
286#ifdef R__WIN32
288#else
290#endif
291}
292
293////////////////////////////////////////////////////////////////////////////////
294/// TObject assignment operator.
295
297{
298 if (R__likely(this != &rhs)) {
299 fUniqueID = rhs.fUniqueID; // when really unique don't copy
300 if (IsOnHeap()) { // test uses fBits so don't move next line
301 fBits = rhs.fBits;
302 fBits |= kIsOnHeap;
303 } else {
304 fBits = rhs.fBits;
305 fBits &= ~kIsOnHeap;
306 }
307 fBits &= ~kIsReferenced;
308 fBits &= ~kCanDelete;
309 }
310 return *this;
311}
312
313
314////////////////////////////////////////////////////////////////////////////////
315/// @brief Check and record whether this class has a consistent
316/// Hash/RecursiveRemove setup (*) and then return the regular Hash value for
317/// this object. The intent is for this routine to be called instead of directly
318/// calling the function Hash during "insert" operations. See TObject::HasInconsistenTObjectHash();
319///
320/// (*) The setup is consistent when all classes in the class hierarchy that overload
321/// TObject::Hash do call ROOT::CallRecursiveRemoveIfNeeded in their destructor.
322/// i.e. it is safe to call the Hash virtual function during the RecursiveRemove operation.
323
325{
326 // Testing and recording whether we already called HasInconstistentTObjectHash
327 // for this object could save some cpu cycles in some circuntances (at the cost
328 // of reserving yet another bit).
329 // For each insert (CheckedHash is called only for insert in THashList/THashTable), it
330 // cost one memory fetch, one arithmetic operation and one branching.
331 // This save a virtual function call which itself contains a static variable memory
332 // fetch, a branching (of whether the static was already set or not).
333 // Given that a virtual function call is essentially 2 memory fetches (virtual table
334 // location and then content), one arithmetic operation and one function call/jump),
335 // we guess-estimate that the version recording-then-testing-prior-check would start
336 // saving cpu cycle when each object is inserted in average 1.5 times in a THashList/THashTable.
337
338 // if ( !fBits & kCheckedHash) {
339 if (!CheckTObjectHashConsistency())
341 // fBits &= kChecked;
342 //}
343 return Hash();
344}
345
346////////////////////////////////////////////////////////////////////////////////
347/// @brief Return true is the type of this object is *known* to have an
348/// inconsistent setup for Hash and RecursiveRemove (i.e. missing call to
349/// RecursiveRemove in destructor).
350///
351/// Note: Since the consistency is only tested for during inserts, this
352/// routine will return true for object that have never been inserted
353/// whether or not they have a consistent setup. This has no negative
354/// side-effect as searching for the object with the right or wrong
355/// Hash will always yield a not-found answer (Since anyway no hash
356/// can be guaranteed unique, there is always a check)
357
359{
360 return fBits & kInconsistent;
361}
362
363// Global bits (can be set for any object and should not be reused).
364// Only here for backward compatibility reasons.
365// For detailed description see TObject::EStatusBits above.
376
377namespace cling {
378 std::string printValue(TObject *val);
379}
380
381namespace ROOT {
382
383namespace Internal {
384 bool DeleteChangesMemory();
385} // Internal
386
387namespace Detail {
388
389
390/// @brief Check if the TObject's memory has been deleted.
391/// @warning This should be only used for error mitigation as the answer is only
392/// sometimes correct. It actually just checks whether the object has been
393/// deleted, so this will falsely return true for an object that has
394/// been destructed but its memory has not been deleted. This will return an
395/// undefined value if the memory is re-used between the deletion and the check.
396/// i.e. This is useful to prevent a segmentation fault in case where the problem
397/// can be detected when the deletion and the usage are 'close-by'
398/// @warning In enviroment where delete taints (changes) the memory, this function
399/// always returns false as the marker left by ~TObject will be overwritten.
400/// @param obj The memory to check
401/// @return true if the object has been destructed and it can be inferred that it has been deleted
404}
405
406}} // ROOT::Details
407
408#endif
#define R__ALWAYS_INLINE
Definition RConfig.hxx:552
#define R__likely(expr)
Definition RConfig.hxx:587
#define R__unlikely(expr)
Definition RConfig.hxx:586
#define b(i)
Definition RSha256.hxx:100
#define f(i)
Definition RSha256.hxx:104
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
unsigned long ULong_t
Definition RtypesCore.h:55
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
#define BIT(n)
Definition Rtypes.h:85
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
char name[80]
Definition TGX11.cxx:110
EObjBits
Definition TObject.h:366
@ kCanDelete
Definition TObject.h:367
@ kIsReferenced
Definition TObject.h:370
@ kCannotPick
Definition TObject.h:372
@ kInvalidObject
Definition TObject.h:374
@ kObjInCanvas
Definition TObject.h:369
@ kNoContextMenu
Definition TObject.h:373
@ kMustCleanup
Definition TObject.h:368
@ kHasUUID
Definition TObject.h:371
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Buffer base class used for serializing objects.
Definition TBuffer.h:43
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
An array of clone (identical) objects.
A doubly linked list.
Definition TList.h:38
Each ROOT class (see TClass) has a linked list of methods.
Definition TMethod.h:38
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:41
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract.
Definition TObject.cxx:1029
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition TObject.cxx:555
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
Definition TObject.cxx:546
virtual void Clear(Option_t *="")
Definition TObject.h:119
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
Definition TObject.cxx:265
Bool_t HasInconsistentHash() const
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveR...
Definition TObject.h:358
static void SetObjectStat(Bool_t stat)
Turn on/off tracking of objects in the TObjectTable.
Definition TObject.cxx:1068
virtual Bool_t Notify()
This method must be overridden to handle object notification (the base implementation is no-op).
Definition TObject.cxx:594
Bool_t IsDestructed() const
IsDestructed.
Definition TObject.h:178
ULong_t CheckedHash()
Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return t...
Definition TObject.h:324
virtual Bool_t IsEqual(const TObject *obj) const
Default equal comparison (objects are equal if they have the same address in memory).
Definition TObject.cxx:565
@ kOverwrite
overwrite existing object with same name
Definition TObject.h:92
@ kSingleKey
write collection with single key
Definition TObject.h:91
@ kWriteDelete
write object, then delete previous key with same name
Definition TObject.h:93
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:439
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition TObject.h:296
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
Definition TObject.cxx:198
void SetBit(UInt_t f)
Definition TObject.h:197
virtual void Dump() const
Dump contents of object on stdout.
Definition TObject.cxx:348
UInt_t fUniqueID
object unique identifier
Definition TObject.h:44
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:199
virtual const char * GetIconName() const
Returns mime type name of object.
Definition TObject.cxx:449
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
Definition TObject.cxx:659
virtual void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
Definition TObject.cxx:948
virtual Bool_t HandleTimer(TTimer *timer)
Execute action in response of a timer timing out.
Definition TObject.cxx:493
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Definition TObject.cxx:223
virtual UInt_t GetUniqueID() const
Return the unique object id.
Definition TObject.cxx:457
@ kIsOnHeap
object is on heap
Definition TObject.h:81
@ kNotDeleted
object has not been deleted
Definition TObject.h:82
@ kBitMask
Definition TObject.h:86
@ kZombie
object ctor failed
Definition TObject.h:83
@ kInconsistent
class overload Hash but does call RecursiveRemove in destructor
Definition TObject.h:84
UInt_t fBits
bit field status word
Definition TObject.h:45
virtual Bool_t IsSortable() const
Definition TObject.h:150
virtual Option_t * GetOption() const
Definition TObject.h:139
static Longptr_t fgDtorOnly
object for which to call dtor only (i.e. no delete)
Definition TObject.h:47
void InvertBit(UInt_t f)
Definition TObject.h:201
virtual void SysError(const char *method, const char *msgfmt,...) const
Issue system error message.
Definition TObject.cxx:1001
R__ALWAYS_INLINE Bool_t IsOnHeap() const
Definition TObject.h:152
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:207
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
Definition TObject.cxx:801
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Definition TObject.cxx:423
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:973
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 clas...
Definition TObject.cxx:1040
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
Definition TObject.cxx:299
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
Definition TObject.cxx:393
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition TObject.cxx:403
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.
Definition TObject.cxx:359
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition TObject.cxx:184
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
Definition TObject.cxx:468
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition TObject.cxx:751
R__ALWAYS_INLINE Bool_t IsZombie() const
Definition TObject.h:153
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition TObject.cxx:880
@ kOnlyPrepStep
Used to request that the class specific implementation of TObject::Write just prepare the objects to ...
Definition TObject.h:106
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save this object in the file specified by filename.
Definition TObject.cxx:686
virtual void Delete(Option_t *option="")
Delete this object.
Definition TObject.cxx:248
static Longptr_t GetDtorOnly()
Return destructor only flag.
Definition TObject.cxx:1076
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:780
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:525
static Bool_t GetObjectStat()
Get status of object stat flag.
Definition TObject.cxx:1061
virtual void Copy(TObject &object) const
Copy this to obj.
Definition TObject.cxx:140
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:987
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition TObject.cxx:764
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition TObject.cxx:1015
static void SetDtorOnly(void *obj)
Set destructor only flag.
Definition TObject.cxx:1084
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
Definition TObject.cxx:791
virtual const char * GetTitle() const
Returns title of object.
Definition TObject.cxx:483
EDeprecatedStatusBits
Definition TObject.h:75
@ kObjInCanvas
for backward compatibility only, use kMustCleanup
Definition TObject.h:76
virtual void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition TObject.cxx:289
Int_t TestBits(UInt_t f) const
Definition TObject.h:200
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
Definition TObject.cxx:238
void MakeZombie()
Definition TObject.h:53
virtual ~TObject()
TObject destructor.
Definition TObject.cxx:158
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
Definition TObject.cxx:607
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definition TObject.cxx:636
virtual void Pop()
Pop on object drawn in a pad to the top of the display list.
Definition TObject.cxx:616
TObject()
TObject constructor.
Definition TObject.h:254
virtual ULong_t Hash() const
Return hash value for this object.
Definition TObject.cxx:515
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Definition TObject.cxx:574
static Bool_t fgObjectStat
if true keep track of objects in TObjectTable
Definition TObject.h:48
void ResetBit(UInt_t f)
Definition TObject.h:198
EStatusBits
Definition TObject.h:61
@ kCannotPick
if object in a pad cannot be picked
Definition TObject.h:67
@ kNoContextMenu
if object does not want context menu
Definition TObject.h:69
@ kCanDelete
if object in a list can be deleted
Definition TObject.h:62
@ kHasUUID
if object has a TUUID (its fUniqueID=UUIDNumber)
Definition TObject.h:66
@ kInvalidObject
if object ctor succeeded but object should not be used
Definition TObject.h:72
@ kIsReferenced
if object is referenced by a TRef or TRefArray
Definition TObject.h:65
@ kMustCleanup
if object destructor must call RecursiveRemove()
Definition TObject.h:64
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
Definition TObject.cxx:648
static void AddToTObjectTable(TObject *)
Private helper function which will dispatch to TObjectTable::AddObj.
Definition TObject.cxx:175
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:961
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition TObject.cxx:1049
static void UpdateIsOnHeap(volatile const UInt_t &uniqueID, volatile UInt_t &bits)
Definition TStorage.h:123
static void * ObjectAllocArray(size_t size)
Used to allocate array of TObject on the heap (via TObject::operator new[]()).
Definition TStorage.cxx:303
static void * ObjectAlloc(size_t size)
Used to allocate a TObject on the heap (via TObject::operator new()).
Definition TStorage.cxx:291
Handles synchronous and a-synchronous timer events.
Definition TTimer.h:51
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
Definition TObject.h:402
bool DeleteChangesMemory()
Definition TObject.cxx:127
bool DeleteChangesMemoryImpl()
Definition TObject.cxx:76
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
th1 Draw()