Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TStatusBitsChecker Class Reference

TStatusBitsChecker::Check and TStatusBitsChecker::CheckAllClasses will determine if the set of "status bit" declared in the class and its base classes presents any overlap.

The status bit are declared in a given class by declaring an enum type named EStatusBits. If some of the duplication is intentional, those duplication can be registered in an enum type named EStatusBitsDupExceptions.

// TStreamerElement status bits
enum EStatusBits {
kHasRange = BIT(6),
kCache = BIT(9),
kRepeat = BIT(10),
kRead = BIT(11),
kWrite = BIT(12),
kDoNotDelete = BIT(13),
kWholeObject = BIT(14)
};
enum class EStatusBitsDupExceptions {
// This bit duplicates TObject::kInvalidObject. As the semantic of kDoNotDelete is a persistent,
// we can not change its value without breaking forward compatibility.
// Furthermore, TObject::kInvalidObject and its semantic is not (and should not be)
// used in TStreamerElement
// This bit duplicates TObject::kCannotPick. As the semantic of kHasRange is a persistent,
// we can not change its value without breaking forward compatibility.
// Furthermore, TObject::kCannotPick and its semantic is not (and should not be)
// used in TStreamerElement
};
#define BIT(n)
Definition Rtypes.h:85

{.cpp}

Without the EStatusBitsDupExceptions enum you would see

TStatusBitsChecker::Check("TStreamerElement");
Error in `<TStatusBitsChecker>`: In TStreamerElement class hierarchy, there are duplicates bits:
Error in `<TStatusBitsChecker>`: Bit 6 used in TStreamerElement as kHasRange
Error in `<TStatusBitsChecker>`: Bit 6 used in TObject as kCannotPick
Error in `<TStatusBitsChecker>`: Bit 13 used in TStreamerElement as kDoNotDelete
Error in `<TStatusBitsChecker>`: Bit 13 used in TObject as kInvalidObject
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:185
@ kCannotPick
Definition TObject.h:374
@ kInvalidObject
Definition TObject.h:376
Mother of all ROOT objects.
Definition TObject.h:41
TStatusBitsChecker::Check and TStatusBitsChecker::CheckAllClasses will determine if the set of "statu...

{.cpp}


The documentation for this class was generated from the following file: