12#ifndef ROOT_TCheckHashRecursiveRemoveConsistency
13#define ROOT_TCheckHashRecursiveRemoveConsistency
55 gROOT->GetListOfCleanups()->Add(
this);
66 if (!
gROOT->MustClean())
67 gROOT->GetListOfCleanups()->Remove(
this);
73 auto hashValue = obj->
Hash();
75 std::unique_lock<std::mutex> lock(
fMutex);
86 std::unique_lock<std::mutex> lock(
fMutex);
90 if (
p->fObjectPtr == obj) {
93 if (
p->fRecordedHash == obj->
Hash())
104 std::unique_lock<std::mutex> lock(
fMutex);
107 if (
p->fObjectPtr == obj) {
156 TClass *baseCl = base->GetClassPointer();
186 TClass *baseCl = base->GetClassPointer();
223 constexpr const char *funcName =
"ROOT::Internal::TCheckHashRecursiveRemoveConsistency::CheckRecursiveRemove";
226 "The class %s overrides TObject::Hash but does not call TROOT::RecursiveRemove in its destructor (seen while checking %s).",
229 ::Error(funcName,
"The class %s "
230 "or one of its base classes override TObject::Hash but does not call "
231 "TROOT::CallRecursiveRemoveIfNeeded in its destructor.\n",
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefInlineOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
EResult HasConsistentHashMember(TClass &classRef)
EResult CheckRecursiveRemove(TClass &classRef)
static bool Check(TClass &classRef)
void RecursiveRemove(TObject *obj) override
Recursively remove this object from a list.
TCheckHashRecursiveRemoveConsistency()
void SlowRemove(TObject *obj)
bool VerifyRecursiveRemove(TClass &classRef)
~TCheckHashRecursiveRemoveConsistency()
TClass * FindMissingRecursiveRemove(TClass &classRef)
bool VerifyRecursiveRemove(const char *classname)
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Bool_t HasLocalHashMember() const
Returns true if this class has an definition and/or overload of the member function Hash.
Bool_t HasConsistentHashMember()
Return 'true' if we can guarantee that if this class (or any class in this class inheritance hierarch...
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Bool_t HasDefaultConstructor(Bool_t testio=kFALSE) const
Return true if we have access to a constructor usable for I/O.
std::atomic< UChar_t > fRuntimeProperties
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual UInt_t GetUniqueID() const
Return the unique object id.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual ULong_t Hash() const
Return hash value for this object.
@ kIsReferenced
if object is referenced by a TRef or TRefArray
@ kMustCleanup
if object destructor must call RecursiveRemove()
void SetRequireCleanup(TObject &obj)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...