12 #ifndef ROOT_TCheckHashRecursiveRemoveConsistency 13 #define ROOT_TCheckHashRecursiveRemoveConsistency 54 gROOT->GetListOfCleanups()->Add(
this);
65 if (!
gROOT->MustClean())
66 gROOT->GetListOfCleanups()->Remove(
this);
78 for (
auto p = fCont.begin(); p != fCont.end(); ++p) {
79 if (p->fObjectPtr == obj) {
82 if (p->fRecordedHash == obj->
Hash())
93 for (
auto p = fCont.begin(); p != fCont.end(); ++p) {
94 if (p->fObjectPtr == obj) {
112 auto size = fCont.size();
123 if (fCont.size() != size) {
143 TClass *baseCl = base->GetClassPointer();
173 TClass *baseCl = base->GetClassPointer();
210 constexpr
const char *funcName =
"ROOT::Internal::TCheckHashRecursiveRemoveConsistency::CheckRecursiveRemove";
213 "The class %s overrides TObject::Hash but does not call TROOT::RecursiveRemove in its destructor (seen while checking %s).",
216 ::Error(funcName,
"The class %s " 217 "or one of its base classes override TObject::Hash but does not call " 218 "TROOT::CallRecursiveRemoveIfNeeded in its destructor.\n",
238 #endif // ROOT__TCheckHashRecursiveRemoveConsistency virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetUniqueID() const
Return the unique object id.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
bool VerifyRecursiveRemove(const char *classname)
virtual ULong_t Hash() const
Return hash value for this object.
Namespace for new ROOT classes and functions.
EResult CheckRecursiveRemove(TClass &classRef)
TCheckHashRecursiveRemoveConsistency()
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
EResult HasConsistentHashMember(TClass &classRef)
TRangeStaticCast is an adaptater class that allows the typed iteration through a TCollection.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void SlowRemove(TObject *obj)
Bool_t HasLocalHashMember() const
Bool_t HasDefaultConstructor() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
The ROOT global object gROOT contains a list of all defined classes.
std::atomic< UChar_t > fRuntimeProperties
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
if object destructor must call RecursiveRemove()
Bool_t HasConsistentHashMember()
Return 'true' if we can guarantee that if this class (or any class in this class inheritance hierarch...
ClassDefInline(TCheckHashRecursiveRemoveConsistency, 0)
~TCheckHashRecursiveRemoveConsistency()
static bool Check(TClass &classRef)
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.
Mother of all ROOT objects.
bool VerifyRecursiveRemove(TClass &classRef)
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
TClass * FindMissingRecursiveRemove(TClass &classRef)
if object is referenced by a TRef or TRefArray
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.
void SetRequireCleanup(TObject &obj)
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.