diff --git a/README/ReleaseNotes/v610/index.md b/README/ReleaseNotes/v610/index.md index 6a27b9dd2f62d..8bb5a5b0d98a9 100644 --- a/README/ReleaseNotes/v610/index.md +++ b/README/ReleaseNotes/v610/index.md @@ -39,6 +39,11 @@ The following interfaces have been removed, after deprecation in v6.08. - `SetFCN(void*)` from TVirtualFitter, TFitter, TBackCompFitter, TMinuit - `TFoam::SetRhoInt(void*)` +### Core + +- The enum constant `TRef::kNotComputed`, `TLink::kObjIsParent` were never used and have been removed. +- The enum constant `TClonesArray::kNoSplit` has not been used since v2.26 and has been removed. + ## Interpreter - Automatic declaration of variables (`h = new TH1F(...)`) is *only* available at the prompt. The side-effects of relying on this in source files is simply too grave. Due to a bug (ROOT-8538), automatically declared variables must currently reside on the top-most scope, i.e. not inside an `if` block etc. diff --git a/core/base/inc/TApplication.h b/core/base/inc/TApplication.h index f6e52c7c8051b..456cfe6668b38 100644 --- a/core/base/inc/TApplication.h +++ b/core/base/inc/TApplication.h @@ -41,8 +41,8 @@ class TApplication : public TObject, public TQObject { public: // TApplication specific bits enum EStatusBits { - kProcessRemotely = BIT(15), // TRUE if this line has to be processed remotely - kDefaultApplication = BIT(16) // TRUE if created via CreateApplication() + kProcessRemotely = BIT(15), // TRUE if this line has to be processed remotely + kDefaultApplication = BIT(16) // TRUE if created via CreateApplication() }; // TApplication specific bits for fFiles enum EFileBits { diff --git a/core/base/inc/TBrowser.h b/core/base/inc/TBrowser.h index 2d00418b2fc10..5bca1680eeff4 100644 --- a/core/base/inc/TBrowser.h +++ b/core/base/inc/TBrowser.h @@ -49,7 +49,7 @@ class TBrowser : public TNamed { Bool_t fNeedRefresh; //True if the browser needs refresh public: - enum { + enum EStatusBits { kNoHidden = BIT(9) // don't show '.' files and directories }; diff --git a/core/base/inc/TBuffer.h b/core/base/inc/TBuffer.h index 9791d03835861..903bd9860131f 100644 --- a/core/base/inc/TBuffer.h +++ b/core/base/inc/TBuffer.h @@ -68,8 +68,10 @@ class TBuffer : public TObject { public: enum EMode { kRead = 0, kWrite = 1 }; - enum { kIsOwner = BIT(16) }; //if set TBuffer owns fBuffer - enum { kCannotHandleMemberWiseStreaming = BIT(17)}; //if set TClonesArray should not use member wise streaming + enum EStatusBits { + kIsOwner = BIT(16), //if set TBuffer owns fBuffer + kCannotHandleMemberWiseStreaming = BIT(17) //if set TClonesArray should not use member wise streaming + }; enum { kInitialSize = 1024, kMinimalSize = 128 }; TBuffer(EMode mode); diff --git a/core/base/inc/TObject.h b/core/base/inc/TObject.h index fdcbf76b299ce..d6a5440960e62 100644 --- a/core/base/inc/TObject.h +++ b/core/base/inc/TObject.h @@ -56,15 +56,22 @@ class TObject { //----- any given hierarchy). enum EStatusBits { kCanDelete = BIT(0), ///< if object in a list can be deleted + // 2 is taken by TDataMember kMustCleanup = BIT(3), ///< if object destructor must call RecursiveRemove() - kObjInCanvas = BIT(3), ///< for backward compatibility only, use kMustCleanup kIsReferenced = BIT(4), ///< if object is referenced by a TRef or TRefArray kHasUUID = BIT(5), ///< if object has a TUUID (its fUniqueID=UUIDNumber) kCannotPick = BIT(6), ///< if object in a pad cannot be picked + // 7 is taken by TAxis. kNoContextMenu = BIT(8), ///< if object does not want context menu + // 9, 10 are taken by TH1, TF1, TAxis and a few others + // 12 is taken by TAxis kInvalidObject = BIT(13) ///< if object ctor succeeded but object should not be used }; + enum EDeprecatedStatusBits { + kObjInCanvas = BIT(3) ///< for backward compatibility only, use kMustCleanup + }; + //----- Private bits, clients can only test but not change them enum { kIsOnHeap = 0x01000000, ///< object is on heap diff --git a/core/base/inc/TRef.h b/core/base/inc/TRef.h index bcb9d374e1766..42410fd7d7f12 100644 --- a/core/base/inc/TRef.h +++ b/core/base/inc/TRef.h @@ -38,8 +38,6 @@ class TRef : public TObject { static TObject *fgObject; //In: this, Out: pointer to object (used by Action on Demand) public: - //status bits - enum { kNotComputed = BIT(12)}; TRef(): fPID(0) { } TRef(TObject *obj); diff --git a/core/base/inc/TSystem.h b/core/base/inc/TSystem.h index 8cf43cf154da3..b357b652418ec 100644 --- a/core/base/inc/TSystem.h +++ b/core/base/inc/TSystem.h @@ -467,6 +467,7 @@ class TSystem : public TNamed { virtual Func_t DynFindSymbol(const char *module, const char *entry); virtual int Load(const char *module, const char *entry = "", Bool_t system = kFALSE); virtual void Unload(const char *module); + virtual UInt_t LoadAllLibraries(); virtual void ListSymbols(const char *module, const char *re = ""); virtual void ListLibraries(const char *regexp = ""); virtual const char *GetLibraries(const char *regexp = "", diff --git a/core/base/src/TSystem.cxx b/core/base/src/TSystem.cxx index 5117bccdcf625..b857fae048518 100644 --- a/core/base/src/TSystem.cxx +++ b/core/base/src/TSystem.cxx @@ -52,6 +52,7 @@ allows a simple partial implementation for new OS'es. #include "TVersionCheck.h" #include "compiledata.h" #include "RConfigure.h" +#include "THashList.h" const char *gRootDir; const char *gProgName; @@ -1945,6 +1946,55 @@ int TSystem::Load(const char *module, const char *entry, Bool_t system) return -1; } +/////////////////////////////////////////////////////////////////////////////// +/// Load all libraries known to ROOT via the rootmap system. +/// Returns the number of top level libraries successfully loaded. + +UInt_t TSystem::LoadAllLibraries() +{ + UInt_t nlibs = 0; + + TEnv* mapfile = gInterpreter->GetMapfile(); + if (!mapfile || !mapfile->GetTable()) return 0; + + std::set loadedlibs; + std::set failedlibs; + + TEnvRec* rec = 0; + TIter iEnvRec(mapfile->GetTable()); + while ((rec = (TEnvRec*) iEnvRec())) { + TString libs = rec->GetValue(); + TString lib; + Ssiz_t pos = 0; + while (libs.Tokenize(lib, pos)) { + // check that none of the libs failed to load + if (failedlibs.find(lib.Data()) != failedlibs.end()) { + // don't load it or any of its dependencies + libs = ""; + break; + } + } + pos = 0; + while (libs.Tokenize(lib, pos)) { + // ignore libCore - it's already loaded + if (lib.BeginsWith("libCore")) + continue; + + if (loadedlibs.find(lib.Data()) == loadedlibs.end()) { + // just load the first library - TSystem will do the rest. + auto res = gSystem->Load(lib); + if (res >=0) { + if (res == 0) ++nlibs; + loadedlibs.insert(lib.Data()); + } else { + failedlibs.insert(lib.Data()); + } + } + } + } + return nlibs; +} + //////////////////////////////////////////////////////////////////////////////// /// Find a dynamic library called lib using the system search paths. /// Appends known extensions if needed. Returned string must be deleted diff --git a/core/cont/inc/TClonesArray.h b/core/cont/inc/TClonesArray.h index 4296ebc6bc38c..50232683d18f2 100644 --- a/core/cont/inc/TClonesArray.h +++ b/core/cont/inc/TClonesArray.h @@ -36,10 +36,9 @@ class TClonesArray : public TObjArray { TObjArray *fKeep; //!Saved copies of pointers to objects public: - enum { - kForgetBits = BIT(0), // Do not create branches for fBits, fUniqueID - kNoSplit = BIT(1), // Array not split by TTree::Branch - kBypassStreamer = BIT(12) // Class Streamer not called (default) + enum EStatusBits { + kBypassStreamer = BIT(12), // Class Streamer not called (default) + kForgetBits = BIT(15) // Do not create branches for fBits, fUniqueID }; TClonesArray(); diff --git a/core/cont/inc/TCollection.h b/core/cont/inc/TCollection.h index 7201b78a67912..c76a7d9d3df69 100644 --- a/core/cont/inc/TCollection.h +++ b/core/cont/inc/TCollection.h @@ -135,7 +135,7 @@ class TCollection : public TObject { void operator=(const TCollection &); //are too complex to be automatically copied protected: - enum { kIsOwner = BIT(14) }; + enum EStatusBits { kIsOwner = BIT(14) }; TString fName; //name of the collection Int_t fSize; //number of elements in collection diff --git a/core/cont/inc/TMap.h b/core/cont/inc/TMap.h index 6ca73cb7f5d86..0e27e99c5f4bb 100644 --- a/core/cont/inc/TMap.h +++ b/core/cont/inc/TMap.h @@ -48,7 +48,7 @@ friend class TMapIter; TMap& operator=(const TMap& map); // not implemented protected: - enum { kIsOwnerValue = BIT(15) }; + enum EStatusBits { kIsOwnerValue = BIT(15) }; virtual void PrintCollectionEntry(TObject* entry, Option_t* option, Int_t recurse) const; diff --git a/core/cont/inc/TRefTable.h b/core/cont/inc/TRefTable.h index 052c43ae46f7f..947bec6db8f46 100644 --- a/core/cont/inc/TRefTable.h +++ b/core/cont/inc/TRefTable.h @@ -59,7 +59,7 @@ class TRefTable : public TObject { public: - enum { + enum EStatusBits { kHaveWarnedReadingOld = BIT(14) }; diff --git a/core/meta/CMakeLists.txt b/core/meta/CMakeLists.txt index 46aaa705f82fa..df84a83948043 100644 --- a/core/meta/CMakeLists.txt +++ b/core/meta/CMakeLists.txt @@ -12,3 +12,6 @@ ROOT_OBJECT_LIBRARY(Meta ${sources}) ROOT_INSTALL_HEADERS() +if(testing) + add_subdirectory(test) +endif() diff --git a/core/meta/inc/LinkDef.h b/core/meta/inc/LinkDef.h index bfebcad04075b..e36a6a09f1a0f 100644 --- a/core/meta/inc/LinkDef.h +++ b/core/meta/inc/LinkDef.h @@ -71,6 +71,7 @@ #pragma link C++ class TListOfEnums+; #pragma link C++ class TListOfEnumsWithLock+; #pragma link C++ class TListOfEnumsWithLockIter; +#pragma link C++ class ROOT::Detail::TStatusBitsChecker-; //for new protoclasses #pragma link C++ class std::vector+; #pragma link C++ class std::vector+; diff --git a/core/meta/inc/TClass.h b/core/meta/inc/TClass.h index 8e2f837124310..08b0b7dab2932 100644 --- a/core/meta/inc/TClass.h +++ b/core/meta/inc/TClass.h @@ -77,16 +77,18 @@ friend class TProtoClass; public: // TClass status bits - enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15), - kUnloaded = BIT(16), // The library containing the dictionary for this class was - // loaded and has been unloaded from memory. - kIsTObject = BIT(17), - kIsForeign = BIT(18), - kIsEmulation = BIT(19), // Deprecated - kStartWithTObject = BIT(20), // see comments for IsStartingWithTObject() - kWarned = BIT(21), - kHasNameMapNode = BIT(22), - kHasCustomStreamerMember = BIT(23) // The class has a Streamer method and it is implemented by the user or an older (not StreamerInfo based) automatic streamer. + enum EStatusBits { + kClassSaved = BIT(12), + kIgnoreTObjectStreamer = BIT(15), + kUnloaded = BIT(16), // The library containing the dictionary for this class was + // loaded and has been unloaded from memory. + kIsTObject = BIT(17), + kIsForeign = BIT(18), + kIsEmulation = BIT(19), // Deprecated + kStartWithTObject = BIT(20), // see comments for IsStartingWithTObject() + kWarned = BIT(21), + kHasNameMapNode = BIT(22), + kHasCustomStreamerMember = BIT(23) // The class has a Streamer method and it is implemented by the user or an older (not StreamerInfo based) automatic streamer. }; enum ENewType { kRealNew = 0, kClassNew, kDummyNew }; enum ECheckSum { diff --git a/core/meta/inc/TDataMember.h b/core/meta/inc/TDataMember.h index 071c7672fd7d1..220f3578d1090 100644 --- a/core/meta/inc/TDataMember.h +++ b/core/meta/inc/TDataMember.h @@ -31,7 +31,9 @@ class TMethodCall; class TDataMember : public TDictionary { private: - enum { kObjIsPersistent = BIT(2) }; + enum EStatusBits { + kObjIsPersistent = BIT(2) + }; DataMemberInfo_t *fInfo; //!pointer to CINT data member info TClass *fClass; //!pointer to the class diff --git a/core/meta/inc/TProtoClass.h b/core/meta/inc/TProtoClass.h index 3d435e0910e47..84c65b53d3e6b 100644 --- a/core/meta/inc/TProtoClass.h +++ b/core/meta/inc/TProtoClass.h @@ -41,7 +41,7 @@ class TProtoClass: public TNamed { Int_t fClassIndex; // index of class belonging to in list of dep classes char fStatusFlag; // status of the real data member (if bit 0 set is an object, if bit 1 set is transient if bit 2 set is a pointer) - enum { + enum EStatusFlags { kIsObject = BIT(0), // member is object kIsTransient = BIT(1), // data member is transient kIsPointer = BIT(2), // data member is a pointer diff --git a/core/meta/inc/TRealData.h b/core/meta/inc/TRealData.h index bd84870d3769f..b53c84bf84c5e 100644 --- a/core/meta/inc/TRealData.h +++ b/core/meta/inc/TRealData.h @@ -40,7 +40,7 @@ class TRealData : public TObject { TRealData& operator=(const TRealData& rhs); // Copying TRealData in not allowed. public: - enum { + enum EStatusBits { kTransient = BIT(14) // The member is transient. }; diff --git a/core/meta/inc/TStatusBitsChecker.h b/core/meta/inc/TStatusBitsChecker.h new file mode 100644 index 0000000000000..1d655216bac56 --- /dev/null +++ b/core/meta/inc/TStatusBitsChecker.h @@ -0,0 +1,55 @@ +// @(#)root/meta:$Id$ +// Author: Philippe Canal, 2017 + +/************************************************************************* + * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. * + * All rights reserved. * + * * + * For the licensing terms see $ROOTSYS/LICENSE. * + * For the list of contributors see $ROOTSYS/README/CREDITS. * + *************************************************************************/ + +#ifndef ROOT_TStatusBitsChecker +#define ROOT_TStatusBitsChecker + +#include +#include +#include + +#include "Rtypes.h" + +class TClass; + +namespace ROOT { +namespace Detail { + +class TStatusBitsChecker { +protected: + static UChar_t ConvertToBit(Long64_t constant, TClass &classRef, const char *constantName); + +public: + class Registry { + protected: + struct Info; + + std::map> fRegister; ///: In TStreamerElement class hierarchy, there are duplicates bits: +Error in : Bit 6 used in TStreamerElement as kHasRange +Error in : Bit 6 used in TObject as kCannotPick +Error in : Bit 13 used in TStreamerElement as kDoNotDelete +Error in : Bit 13 used in TObject as kInvalidObject + ~~~ {.cpp} + +*/ + +#include "TStatusBitsChecker.h" + +#include "TBaseClass.h" +#include "TClass.h" +#include "TClassTable.h" +#include "TEnum.h" +#include "TEnumConstant.h" +#include "TError.h" + +#include + +namespace ROOT { +namespace Detail { + +struct TStatusBitsChecker::Registry::Info { + Info() = default; + Info(const Info &) = default; + Info(Info &&) = default; + + Info(TClass &o, std::string &&n, bool intentionalDup) : fOwner(&o), fConstantName(n), fIntentionalDup(intentionalDup) + { + } + + ~Info() = default; + + TClass *fOwner; + std::string fConstantName; + bool fIntentionalDup = false; +}; + +/// Default constructor. Implemented in source file to allow hiding of the Info struct. +TStatusBitsChecker::Registry::Registry() = default; + +/// Default destructor. Implemented in source file to allow hiding of the Info struct. +TStatusBitsChecker::Registry::~Registry() = default; + +/// Figure out which bit the constant has been set from/to. +/// Return 255 if the constant is not an integer or out of range. +UChar_t TStatusBitsChecker::ConvertToBit(Long64_t constant, TClass &classRef, const char *constantName) +{ + + if (constant <= 0) { + Error("TStatusBitsChecker::ConvertBit", "In %s the value of %s is %lld which was not produced by BIT macro.", + classRef.GetName(), constantName, constant); + return 255; + } + + int backshift; + double fraction = std::frexp(constant, &backshift); + // frexp doc is: + // if no errors occur, + // returns the value x in the range (-1;-0.5], [0.5; 1) + // and stores an integer value in *exp such that x×2^(*exp) = arg + --backshift; // frexp is such that BIT(0) == 1 == 0.5*2^(*exp) with *exp == 1 + + if (backshift < 0 || std::abs(0.5 - fraction) > 0.00001f) { + Error("TStatusBitsChecker::ConvertBit", "In %s the value of %s is %lld which was not produced by BIT macro.", + classRef.GetName(), constantName, constant); + return 255; + } + + if (backshift > 24) { + Error("TStatusBitsChecker::ConvertBit", "In %s the value of %s is %lld (>23) which is ignored by SetBit.", + classRef.GetName(), constantName, constant); + + if (backshift > 255) // really we could snip it sooner. + backshift = 255; + } + + return backshift; +} + +/// @brief Add to fRegister the Info about the bits in this class and its base +/// classes. +void TStatusBitsChecker::Registry::RegisterBits(TClass &classRef /* = false */) +{ + TEnum *eStatusBits = (TEnum *)classRef.GetListOfEnums()->FindObject("EStatusBits"); + TEnum *exceptionBits = (TEnum *)classRef.GetListOfEnums()->FindObject("EStatusBitsDupExceptions"); + + if (eStatusBits) { + + for (auto c : *eStatusBits->GetConstants()) { + TEnumConstant *constant = static_cast(c); + + // Ignore the known/intentional duplication. + bool intentionalDup = exceptionBits && exceptionBits->GetConstant(constant->GetName()); + + auto value = constant->GetValue(); + auto bit = ConvertToBit(value, classRef, constant->GetName()); + + if (bit < 24) { + bool need = true; + for (auto reg : fRegister[bit]) { + if (reg.fOwner == &classRef) { + // We have a duplicate declared in the same class + // let's accept this as an alias. + need = false; + } + } + + if (need) + fRegister[bit].emplace_back(classRef, std::string(constant->GetName()), intentionalDup); + } + } + } + + TList *lb = classRef.GetListOfBases(); + if (lb) { + for (auto b : *lb) { + TBaseClass *base = static_cast(b); + + RegisterBits(*(base->GetClassPointer())); + } + } +} + +/// @brief Return false and print error messages if there is any unexpected +/// duplicates BIT constant in the class hierarchy or any of the bits +/// already registered. +/// If verbose is true, also print all the bit declare in this class +/// and all its bases. +bool TStatusBitsChecker::Registry::Check(TClass &classRef, bool verbose /* = false */) +{ + RegisterBits(classRef); + + if (verbose) { + for (auto cursor : fRegister) { + for (auto constant : cursor.second) { + Printf("Bit %3d declared in %s as %s", cursor.first, constant.fOwner->GetName(), + constant.fConstantName.c_str()); + } + } + } + + bool issuedHeader = false; + bool result = true; + for (auto cursor : fRegister) { + unsigned int nDuplicate = 0; + for (auto constant : cursor.second) { + if (!constant.fIntentionalDup) + ++nDuplicate; + } + if (nDuplicate > 1) { + if (!issuedHeader) { + Error("TStatusBitsChecker", "In %s class hierarchy, there are duplicates bits:", classRef.GetName()); + issuedHeader = true; + } + for (auto constant : cursor.second) { + if (!constant.fIntentionalDup) { + Error("TStatusBitsChecker", " Bit %3d used in %s as %s", cursor.first, constant.fOwner->GetName(), + constant.fConstantName.c_str()); + result = false; + } + } + } + } + + return result; +} + +/// Return false and print error messages if there is any unexpected +/// duplicates BIT constant in the class hierarchy. +/// If verbose is true, also print all the bit declare in this class +/// and all its bases. +bool TStatusBitsChecker::Check(TClass &classRef, bool verbose /* = false */) +{ + return Registry().Check(classRef, verbose); +} + +/// Return false and print error messages if there is any unexpected +/// duplicates BIT constant in the class hierarchy. +/// If verbose is true, also print all the bit declare in this class +/// and all its bases. +bool TStatusBitsChecker::Check(const char *classname, bool verbose) +{ + TClass *cl = TClass::GetClass(classname); + if (cl) + return Check(*cl, verbose); + else + return true; +} + +/// Return false and print error messages if there is any unexpected +/// duplicates BIT constant in any of the class hierarchy knows +/// to TClassTable. +/// If verbose is true, also print all the bit declare in eacho of the classes +/// and all their bases. +bool TStatusBitsChecker::CheckAllClasses(bool verbosity /* = false */) +{ + bool result = true; + + // Start from beginning + gClassTable->Init(); + + std::set rootLibs; + TList classesDeclFileNotFound; + TList classesImplFileNotFound; + + Int_t totalNumberOfClasses = gClassTable->Classes(); + for (Int_t i = 0; i < totalNumberOfClasses; i++) { + + // get class name + const char *cname = gClassTable->Next(); + if (!cname) + continue; + + // get class & filename - use TROOT::GetClass, as we also + // want those classes without decl file name! + TClass *classPtr = TClass::GetClass((const char *)cname, kTRUE); + if (!classPtr) + continue; + + result = Check(*classPtr, verbosity) && result; + } + + return result; +} + +} // namespace Details +} // namespace ROOT diff --git a/core/meta/test/CMakeLists.txt b/core/meta/test/CMakeLists.txt new file mode 100644 index 0000000000000..07724e30a4ecc --- /dev/null +++ b/core/meta/test/CMakeLists.txt @@ -0,0 +1 @@ +ROOT_ADD_GTEST(testStatusBitsChecker testStatusBitsChecker.cxx LIBRARIES Core) diff --git a/core/meta/test/testStatusBitsChecker.cxx b/core/meta/test/testStatusBitsChecker.cxx new file mode 100644 index 0000000000000..49934932b1233 --- /dev/null +++ b/core/meta/test/testStatusBitsChecker.cxx @@ -0,0 +1,32 @@ +#include "TStatusBitsChecker.h" + +#include "TClass.h" +#include "TInterpreter.h" + +#include "gtest/gtest.h" + +const char* gCode = R"CODE( + struct ClassWithOverlap : public TObject { + enum EStatusBits { + kOverlappingBit = BIT(13) + }; + }; +)CODE"; + +void MakeClassWithOverlap() { + gInterpreter->Declare(gCode); +} + +TEST(StatusBitsChecker,NoOverlap) +{ + EXPECT_TRUE(ROOT::Detail::TStatusBitsChecker::Check("TObject")); + EXPECT_TRUE(ROOT::Detail::TStatusBitsChecker::Check("TNamed")); + EXPECT_TRUE(ROOT::Detail::TStatusBitsChecker::Check("TStreamerElement")); +} + +TEST(StatusBitsChecker,Overlap) +{ + MakeClassWithOverlap(); + EXPECT_NE(nullptr,TClass::GetClass("ClassWithOverlap")); + EXPECT_FALSE(ROOT::Detail::TStatusBitsChecker::Check("ClassWithOverlap")); +} diff --git a/graf2d/graf/inc/TLink.h b/graf2d/graf/inc/TLink.h index e239ff01f9c71..6d3e04c1290e6 100644 --- a/graf2d/graf/inc/TLink.h +++ b/graf2d/graf/inc/TLink.h @@ -22,7 +22,7 @@ class TLink : public TText { void *fLink; ///< pointer to object public: - enum { kObjIsParent = BIT(1) , kIsStarStar = BIT(2)}; + enum EStatusBits { kIsStarStar = BIT(2) }; TLink(); TLink(Double_t x, Double_t y, void *pointer); virtual ~TLink(); diff --git a/hist/hist/inc/TAxis.h b/hist/hist/inc/TAxis.h index a9328bd469702..c65f864b19b4f 100644 --- a/hist/hist/inc/TAxis.h +++ b/hist/hist/inc/TAxis.h @@ -54,22 +54,22 @@ class TAxis : public TNamed, public TAttAxis { public: // TAxis status bits - enum { - kDecimals = BIT(7), - kTickPlus = BIT(9), - kTickMinus = BIT(10), - kAxisRange = BIT(11), - kCenterTitle = BIT(12), - kCenterLabels = BIT(14), //bit 13 is used by TObject - kRotateTitle = BIT(15), - kPalette = BIT(16), - kNoExponent = BIT(17), - kLabelsHori = BIT(18), - kLabelsVert = BIT(19), - kLabelsDown = BIT(20), - kLabelsUp = BIT(21), - kIsInteger = BIT(22), - kMoreLogLabels = BIT(23) + enum EStatusBits { + kDecimals = BIT(7), + kTickPlus = BIT(9), + kTickMinus = BIT(10), + kAxisRange = BIT(11), + kCenterTitle = BIT(12), + kCenterLabels = BIT(14), //bit 13 is used by TObject + kRotateTitle = BIT(15), + kPalette = BIT(16), + kNoExponent = BIT(17), + kLabelsHori = BIT(18), + kLabelsVert = BIT(19), + kLabelsDown = BIT(20), + kLabelsUp = BIT(21), + kIsInteger = BIT(22), + kMoreLogLabels = BIT(23) }; TAxis(); diff --git a/hist/hist/inc/TBackCompFitter.h b/hist/hist/inc/TBackCompFitter.h index 46244e25b5bb9..b3fb56cf0ab2e 100644 --- a/hist/hist/inc/TBackCompFitter.h +++ b/hist/hist/inc/TBackCompFitter.h @@ -49,7 +49,7 @@ class TBackCompFitter : public TVirtualFitter { public: - enum { + enum EStatusBits { kCanDeleteLast = BIT(9) // object can be deleted before creating a new one }; diff --git a/hist/hist/inc/TEfficiency.h b/hist/hist/inc/TEfficiency.h index 4511eea6f841e..3689141ce6e81 100644 --- a/hist/hist/inc/TEfficiency.h +++ b/hist/hist/inc/TEfficiency.h @@ -58,12 +58,12 @@ class TEfficiency: public TNamed, public TAttLine, public TAttFill, public TAttM TH1* fTotalHistogram; //histogram for total number of events Double_t fWeight; //weight for all events (default = 1) - enum{ - kIsBayesian = BIT(14), //bayesian statistics are used - kPosteriorMode = BIT(15), //use posterior mean for best estimate (Bayesian statistics) - kShortestInterval = BIT(16), // use shortest interval - kUseBinPrior = BIT(17), // use a different prior for each bin - kUseWeights = BIT(18) // use weights + enum EStatusBits { + kIsBayesian = BIT(14), //bayesian statistics are used + kPosteriorMode = BIT(15), //use posterior mean for best estimate (Bayesian statistics) + kShortestInterval = BIT(16), // use shortest interval + kUseBinPrior = BIT(17), // use a different prior for each bin + kUseWeights = BIT(18) // use weights }; void Build(const char* name,const char* title); diff --git a/hist/hist/inc/TF1.h b/hist/hist/inc/TF1.h index 426b8223f14fc..dac95f3375b5f 100644 --- a/hist/hist/inc/TF1.h +++ b/hist/hist/inc/TF1.h @@ -301,12 +301,9 @@ class TF1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker { virtual void GetRange(Double_t *xmin, Double_t *xmax) const; virtual TH1 *DoCreateHistogram(Double_t xmin, Double_t xmax, Bool_t recreate = kFALSE); - enum { - kNotGlobal = BIT(10), // don't register in global list of functions - }; - // TF1 status bits - enum { + enum EStatusBits { + kNotGlobal = BIT(10), // don't register in global list of functions kNotDraw = BIT(9) // don't draw the function when in a TH1 }; diff --git a/hist/hist/inc/TFormula.h b/hist/hist/inc/TFormula.h index 6b00c27e61056..7c866eeb24806 100644 --- a/hist/hist/inc/TFormula.h +++ b/hist/hist/inc/TFormula.h @@ -145,7 +145,7 @@ class TFormula : public TNamed public: - enum { + enum EStatusBits { kNotGlobal = BIT(10), // don't store in gROOT->GetListOfFunction (it should be protected) kNormalized = BIT(14), // set to true if the TFormula (ex gausn) is normalized kLinear = BIT(16), //set to true if the TFormula is for linear fitting diff --git a/hist/hist/inc/TGraph.h b/hist/hist/inc/TGraph.h index e24cc5466d9f6..30e250ecd7868 100644 --- a/hist/hist/inc/TGraph.h +++ b/hist/hist/inc/TGraph.h @@ -66,7 +66,7 @@ class TGraph : public TNamed, public TAttLine, public TAttFill, public TAttMarke public: // TGraph status bits - enum { + enum EStatusBits { kClipFrame = BIT(10), ///< clip to the frame boundary kResetHisto = BIT(17), ///< fHistogram must be reset in GetHistogram kNotEditable = BIT(18), ///< bit set if graph is non editable diff --git a/hist/hist/inc/TGraph2D.h b/hist/hist/inc/TGraph2D.h index 2b53f2c187e2a..123408750813f 100644 --- a/hist/hist/inc/TGraph2D.h +++ b/hist/hist/inc/TGraph2D.h @@ -65,7 +65,7 @@ class TGraph2D : public TNamed, public TAttLine, public TAttFill, public TAttMar Bool_t fUserHisto; // True when SetHistogram has been called - enum { + enum EStatusBits { kOldInterpolation = BIT(15) }; diff --git a/hist/hist/inc/TH1.h b/hist/hist/inc/TH1.h index 05437fec36d9d..8344210e1bd7b 100644 --- a/hist/hist/inc/TH1.h +++ b/hist/hist/inc/TH1.h @@ -144,7 +144,7 @@ class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker { public: // TH1 status bits - enum { + enum EStatusBits { kNoStats = BIT(9), ///< don't draw stats box kUserContour = BIT(10), ///< user specified contour levels //kCanRebin = BIT(11), ///< FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes diff --git a/hist/histpainter/inc/TPaletteAxis.h b/hist/histpainter/inc/TPaletteAxis.h index d0b6e32676803..709e68a7489f3 100644 --- a/hist/histpainter/inc/TPaletteAxis.h +++ b/hist/histpainter/inc/TPaletteAxis.h @@ -35,7 +35,7 @@ class TPaletteAxis : public TPave { public: // TPaletteAxis status bits - enum { kHasView = BIT(11)}; + enum EStatusBits { kHasView = BIT(11) }; TPaletteAxis(); TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, TH1 *h); diff --git a/html/src/THtml.cxx b/html/src/THtml.cxx index b9899a5d79e33..c62eacca5ec6c 100644 --- a/html/src/THtml.cxx +++ b/html/src/THtml.cxx @@ -1557,7 +1557,7 @@ void THtml::CreateListOfClasses(const char* filter) fDocEntityInfo.fClassFilter = filter; - // start from begining + // start from beginning gClassTable->Init(); if (filter && (!filter[0] || !strcmp(filter, "*"))) filter = ".*"; @@ -2202,39 +2202,7 @@ Bool_t THtml::IsNamespace(const TClass*cl) void THtml::LoadAllLibs() { - TEnv* mapfile = gInterpreter->GetMapfile(); - if (!mapfile || !mapfile->GetTable()) return; - - std::set loadedlibs; - std::set failedlibs; - - TEnvRec* rec = 0; - TIter iEnvRec(mapfile->GetTable()); - while ((rec = (TEnvRec*) iEnvRec())) { - TString libs = rec->GetValue(); - TString lib; - Ssiz_t pos = 0; - while (libs.Tokenize(lib, pos)) { - // check that none of the libs failed to load - if (failedlibs.find(lib.Data()) != failedlibs.end()) { - // don't load it or any of its dependencies - libs = ""; - break; - } - } - pos = 0; - while (libs.Tokenize(lib, pos)) { - // ignore libCore - it's already loaded - if (lib.BeginsWith("libCore")) - continue; - - if (loadedlibs.find(lib.Data()) == loadedlibs.end()) { - // just load the first library - TSystem will do the rest. - gSystem->Load(lib); - loadedlibs.insert(lib.Data()); - } - } - } + gSystem->LoadAllLibraries(); } diff --git a/io/io/inc/TBufferFile.h b/io/io/inc/TBufferFile.h index 5ac88d3e00c50..abf3824e5fd17 100644 --- a/io/io/inc/TBufferFile.h +++ b/io/io/inc/TBufferFile.h @@ -78,9 +78,14 @@ class TBufferFile : public TBuffer { public: enum { kMapSize = 503 }; enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise - enum { kNotDecompressed = BIT(15) }; //indicates a weird buffer, used by TBasket - enum { kTextBasedStreaming = BIT(18) }; //indicates if buffer used for XML/SQL object streaming - enum { kUser1 = BIT(21), kUser2 = BIT(22), kUser3 = BIT(23)}; //free for user + enum EStatusBits { + kNotDecompressed = BIT(15), //indicates a weird buffer, used by TBasket + kTextBasedStreaming = BIT(18), //indicates if buffer used for XML/SQL object streaming + + kUser1 = BIT(21), //free for user + kUser2 = BIT(22), //free for user + kUser3 = BIT(23) //free for user + }; TBufferFile(TBuffer::EMode mode); TBufferFile(TBuffer::EMode mode, Int_t bufsiz); diff --git a/io/io/inc/TStreamerInfo.h b/io/io/inc/TStreamerInfo.h index 14b144fdc7520..71548f0efbe99 100644 --- a/io/io/inc/TStreamerInfo.h +++ b/io/io/inc/TStreamerInfo.h @@ -136,36 +136,30 @@ class TStreamerInfo : public TVirtualStreamerInfo { public: /// Status bits - enum { kCannotOptimize = BIT(12), - kIgnoreTObjectStreamer = BIT(13), ///< Eventhough BIT(13) is taken up by TObject (to preserverse forward compatibility) - kRecovered = BIT(14), - kNeedCheck = BIT(15), - kIsCompiled = BIT(16), - kBuildOldUsed = BIT(17) - }; + /// See TVirtualStreamerInfo::EStatusBits for the values. -/// EReadWrite Enumerator -/// | Enum Constant | Description | -/// |----------|--------------------| -/// | kBase | Base class element | -/// | kOffsetL | Fixed size array | -/// | kOffsetP | Pointer to object | -/// | kCounter | Counter for array size | -/// | kCharStar| Pointer to array of char | -/// | kLegacyChar | Equal to TDataType's kchar | -/// | kBits | TObject::fBits in case of a referenced object | -/// | kObject | Class derived from TObject, or for TStreamerSTL::fCtype non-pointer elements | -/// | kObjectp | Class* derived from TObject and with comment field //->Class, or for TStreamerSTL::fCtype: pointer elements | -/// | kObjectP | Class* derived from TObject and with NO comment field //->Class | -/// | kAny | Class not derived from TObject | -/// | kAnyp | Class* not derived from TObject with comment field //->Class | -/// | kAnyP | Class* not derived from TObject with NO comment field //->Class | -/// | kAnyPnoVT | Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table | -/// | kSTLp | Pointer to STL container | -/// | kTString | TString, special case | -/// | kTObject | TObject, special case | -/// | kTNamed | TNamed , special case | -/// | kCache | Cache the value in memory than is not part of the object but is accessible via a SchemaRule | + /// EReadWrite Enumerator + /// | Enum Constant | Description | + /// |-------------|--------------------| + /// | kBase | Base class element | + /// | kOffsetL | Fixed size array | + /// | kOffsetP | Pointer to object | + /// | kCounter | Counter for array size | + /// | kCharStar | Pointer to array of char | + /// | kLegacyChar | Equal to TDataType's kchar | + /// | kBits | TObject::fBits in case of a referenced object | + /// | kObject | Class derived from TObject, or for TStreamerSTL::fCtype non-pointer elements | + /// | kObjectp | Class* derived from TObject and with comment field //->Class, or for TStreamerSTL::fCtype: pointer elements | + /// | kObjectP | Class* derived from TObject and with NO comment field //->Class | + /// | kAny | Class not derived from TObject | + /// | kAnyp | Class* not derived from TObject with comment field //->Class | + /// | kAnyP | Class* not derived from TObject with NO comment field //->Class | + /// | kAnyPnoVT | Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table | + /// | kSTLp | Pointer to STL container | + /// | kTString | TString, special case | + /// | kTObject | TObject, special case | + /// | kTNamed | TNamed , special case | + /// | kCache | Cache the value in memory than is not part of the object but is accessible via a SchemaRule | enum EReadWrite { kBase = 0, kOffsetL = 20, kOffsetP = 40, kCounter = 6, kCharStar = 7, kChar = 1, kShort = 2, kInt = 3, kLong = 4, kFloat = 5, diff --git a/net/net/inc/TApplicationRemote.h b/net/net/inc/TApplicationRemote.h index 328357d216aec..37598c804495d 100644 --- a/net/net/inc/TApplicationRemote.h +++ b/net/net/inc/TApplicationRemote.h @@ -43,13 +43,13 @@ class TApplicationRemote : public TApplication { public: enum ESendFileOpt { - kAscii = 0x0, - kBinary = 0x1, - kForce = 0x2 + kAscii = 0x0, + kBinary = 0x1, + kForce = 0x2 }; // TApplication specific bits enum EStatusBits { - kCollecting = BIT(16) // TRUE while collecting from server + kCollecting = BIT(17) // TRUE while collecting from server }; private: diff --git a/proof/proof/inc/TProofServ.h b/proof/proof/inc/TProofServ.h index be7f75663876a..85fcd773623d4 100644 --- a/proof/proof/inc/TProofServ.h +++ b/proof/proof/inc/TProofServ.h @@ -69,7 +69,7 @@ friend class TProofServLite; friend class TXProofServ; public: - enum EStatusBits { kHighMemory = BIT(16) }; + enum EStatusBits { kHighMemory = BIT(17) }; enum EQueryAction { kQueryOK, kQueryModify, kQueryStop, kQueryEnqueued }; private: diff --git a/proof/proof/inc/TVirtualProofPlayer.h b/proof/proof/inc/TVirtualProofPlayer.h index 7a987db690874..bd3fab51513fd 100644 --- a/proof/proof/inc/TVirtualProofPlayer.h +++ b/proof/proof/inc/TVirtualProofPlayer.h @@ -43,7 +43,7 @@ class TSelector; class TVirtualProofPlayer : public TObject, public TQObject { public: - enum EStatusBits { kIsSubmerger = BIT(16) }; + enum EStatusBits { kIsSubmerger = BIT(14) }; // TDSet status bits enum EExitStatus { kFinished, kStopped, kAborted }; diff --git a/tree/tree/inc/TBranch.h b/tree/tree/inc/TBranch.h index 1e7eb32e1e541..d5d6356ba6de9 100644 --- a/tree/tree/inc/TBranch.h +++ b/tree/tree/inc/TBranch.h @@ -62,7 +62,13 @@ class TBranch : public TNamed , public TAttFill { // TBranch status bits enum EStatusBits { - kAutoDelete = BIT(15), + kDoNotProcess = ::kDoNotProcess, // Active bit for branches + kIsClone = ::kIsClone, // to indicate a TBranchClones + kBranchObject = ::kBranchObject, // branch is a TObject* + kBranchAny = ::kBranchAny, // branch is an object* + // kMapObject = kBranchObject | kBranchAny; + kAutoDelete = BIT(15), + kDoNotUseBufferMap = BIT(22) // If set, at least one of the entry in the branch will use the buffer's map of classname and objects. }; diff --git a/tree/tree/inc/TBranchElement.h b/tree/tree/inc/TBranchElement.h index 6b1f13bd4d07d..83a06ab8e8e62 100644 --- a/tree/tree/inc/TBranchElement.h +++ b/tree/tree/inc/TBranchElement.h @@ -48,14 +48,14 @@ class TBranchElement : public TBranch { // Types protected: - enum { - kBranchFolder = BIT(14), - kDeleteObject = BIT(16), ///< We are the owner of fObject. - kCache = BIT(18), ///< Need to pushd/pop fOnfileObject. - kOwnOnfileObj = BIT(19), ///< We are the owner of fOnfileObject. - kAddressSet = BIT(20), ///< The addressing set have been called for this branch - kMakeClass = BIT(21), ///< This branch has been switched to using the MakeClass Mode - kDecomposedObj= BIT(21) ///< More explicit alias for kMakeClass. + enum EStatusBits { + kBranchFolder = BIT(14), + kDeleteObject = BIT(16), ///< We are the owner of fObject. + kCache = BIT(18), ///< Need to pushd/pop fOnfileObject. + kOwnOnfileObj = BIT(19), ///< We are the owner of fOnfileObject. + kAddressSet = BIT(20), ///< The addressing set have been called for this branch + kMakeClass = BIT(21), ///< This branch has been switched to using the MakeClass Mode + kDecomposedObj = BIT(21) ///< More explicit alias for kMakeClass. }; // Note on fType values: diff --git a/tree/tree/inc/TBranchObject.h b/tree/tree/inc/TBranchObject.h index f30cc043788a2..dd08f79c1965b 100644 --- a/tree/tree/inc/TBranchObject.h +++ b/tree/tree/inc/TBranchObject.h @@ -26,7 +26,18 @@ class TBranchObject : public TBranch { protected: - enum { kWarn = BIT(12) }; + enum EStatusBits { + kWarn = BIT(14) + }; + + // In version of ROOT older then v6.12, kWarn was set to BIT(12) + // which overlaps with TBranch::kBranchObject. Since it stored + // in ROOT files as part of the TBranchObject and that we want + // to reset in TBranchObject::Streamer, we need to keep track + // of the old value. + enum EStatusBitsOldValues { + kOldWarn = BIT(12) + }; TString fClassName; ///< Class name of referenced object TObject *fOldObject; ///< !Pointer to old object diff --git a/tree/tree/inc/TChain.h b/tree/tree/inc/TChain.h index 34fc4d72bf481..20865e3a1c58a 100644 --- a/tree/tree/inc/TChain.h +++ b/tree/tree/inc/TChain.h @@ -55,7 +55,7 @@ class TChain : public TTree { public: // TChain constants - enum { + enum EStatusBits { kGlobalWeight = BIT(15), kAutoDelete = BIT(16), kProofUptodate = BIT(17), diff --git a/tree/tree/inc/TFriendElement.h b/tree/tree/inc/TFriendElement.h index c856a2b9f12cf..03c26f9878d7f 100644 --- a/tree/tree/inc/TFriendElement.h +++ b/tree/tree/inc/TFriendElement.h @@ -45,7 +45,7 @@ class TFriendElement : public TNamed { friend void TFriendElement__SetTree(TTree *tree, TList *frlist); public: - enum { kFromChain = BIT(11) }; + enum EStatusBits { kFromChain = BIT(11) }; TFriendElement(); TFriendElement(TTree *tree, const char *treename, const char *filename); TFriendElement(TTree *tree, const char *treename, TFile *file); diff --git a/tree/tree/inc/TLeaf.h b/tree/tree/inc/TLeaf.h index 5fcc27a5b3419..d4fe0aba7027a 100644 --- a/tree/tree/inc/TLeaf.h +++ b/tree/tree/inc/TLeaf.h @@ -50,7 +50,7 @@ class TLeaf : public TNamed { }; public: - enum { + enum EStatusBits { kIndirectAddress = BIT(11), ///< Data member is a pointer to an array of basic types. kNewValue = BIT(12) ///< Set if we own the value buffer and so must delete it ourselves. }; diff --git a/tree/tree/inc/TLeafObject.h b/tree/tree/inc/TLeafObject.h index b112915d65ef3..f1fe9af682e6d 100644 --- a/tree/tree/inc/TLeafObject.h +++ b/tree/tree/inc/TLeafObject.h @@ -36,7 +36,18 @@ class TLeafObject : public TLeaf { Bool_t fVirtual; ///< Support for polymorphism, when set classname is written with object. public: - enum { kWarn = BIT(12) }; + enum EStatusBits { + kWarn = BIT(14) + }; + + // In version of ROOT older then v6.12, kWarn was set to BIT(12) + // which overlaps with TBranch::kBranchObject. Since it stored + // in ROOT files as part of the TBranchObject and that we want + // to reset in TBranchObject::Streamer, we need to keep track + // of the old value. + enum EStatusBitsOldValues { + kOldWarn = BIT(12) + }; TLeafObject(); TLeafObject(TBranch *parent, const char *name, const char *type); diff --git a/tree/tree/inc/TTree.h b/tree/tree/inc/TTree.h index 6ebfe23749599..8fbcb1ccd5a04 100644 --- a/tree/tree/inc/TTree.h +++ b/tree/tree/inc/TTree.h @@ -215,7 +215,7 @@ class TTree : public TNamed, public TAttLine, public TAttFill, public TAttMarker }; // TTree status bits - enum { + enum EStatusBits { kForceRead = BIT(11), kCircular = BIT(12) }; diff --git a/tree/tree/src/TBranchObject.cxx b/tree/tree/src/TBranchObject.cxx index da4732bea0c02..941ffbea16678 100644 --- a/tree/tree/src/TBranchObject.cxx +++ b/tree/tree/src/TBranchObject.cxx @@ -548,6 +548,9 @@ void TBranchObject::Streamer(TBuffer& R__b) { if (R__b.IsReading()) { R__b.ReadClassBuffer(TBranchObject::Class(), this); + // We should rewarn in this process. + ResetBit(kWarn); + ResetBit(kOldWarn); } else { TDirectory* dirsav = fDirectory; fDirectory = 0; // to avoid recursive calls diff --git a/tree/tree/src/TLeafObject.cxx b/tree/tree/src/TLeafObject.cxx index 337e42be7b0df..cb76bc42ce2da 100644 --- a/tree/tree/src/TLeafObject.cxx +++ b/tree/tree/src/TLeafObject.cxx @@ -200,6 +200,11 @@ void TLeafObject::Streamer(TBuffer &b) fObjAddress = 0; fClass = TClass::GetClass(fTitle.Data()); if (!fClass) Warning("Streamer","Cannot find class:%s",fTitle.Data()); + + // We should rewarn in this process. + ResetBit(kWarn); + ResetBit(kOldWarn); + return; } //====process old versions before automatic schema evolution @@ -210,6 +215,8 @@ void TLeafObject::Streamer(TBuffer &b) if (R__v < 1) fVirtual = kFALSE; if (R__v == 1) fVirtual = kTRUE; if (R__v == 3) b >> fVirtual; + // We should rewarn in this process. + ResetBit(kOldWarn); //====end of old versions } else { diff --git a/tree/treeplayer/inc/TSelectorDraw.h b/tree/treeplayer/inc/TSelectorDraw.h index 17623cfbbf130..bef2cbc9914f2 100644 --- a/tree/treeplayer/inc/TSelectorDraw.h +++ b/tree/treeplayer/inc/TSelectorDraw.h @@ -31,7 +31,7 @@ class TEntryListArray; class TSelectorDraw : public TSelector { protected: - enum { kWarn = BIT(12) }; + enum EStatusBits { kWarn = BIT(12) }; TTree *fTree; // Pointer to current Tree TTreeFormula **fVar; //![fDimension] Array of pointers to variables formula diff --git a/tree/treeplayer/inc/TTreeFormula.h b/tree/treeplayer/inc/TTreeFormula.h index 017571d148676..139b8bb5c02e8 100644 --- a/tree/treeplayer/inc/TTreeFormula.h +++ b/tree/treeplayer/inc/TTreeFormula.h @@ -60,7 +60,7 @@ class TTreeFormula : public ROOT::v5::TFormula { friend class TTreeFormulaManager; protected: - enum { + enum EStatusBits { kIsCharacter = BIT(12), kMissingLeaf = BIT(15), // true if some of the needed leaves are missing in the current TTree kIsInteger = BIT(17), // true if the branch contains an integer variable diff --git a/tree/treeplayer/inc/TTreeReader.h b/tree/treeplayer/inc/TTreeReader.h index aa4a32be500fe..ca2b75822d072 100644 --- a/tree/treeplayer/inc/TTreeReader.h +++ b/tree/treeplayer/inc/TTreeReader.h @@ -223,7 +223,7 @@ class TTreeReader: public TObject { private: - enum EPropertyBits { + enum EStatusBits { kBitIsChain = BIT(14), ///< our tree is a chain kBitHaveWarnedAboutEntryListAttachedToTTree = BIT(15) ///< the tree had a TEntryList and we have warned about that }; diff --git a/tree/treeviewer/inc/TParallelCoord.h b/tree/treeviewer/inc/TParallelCoord.h index 379bb3da51165..136d9a2a1c426 100644 --- a/tree/treeviewer/inc/TParallelCoord.h +++ b/tree/treeviewer/inc/TParallelCoord.h @@ -27,14 +27,14 @@ class TSelectorDraw; class TParallelCoord : public TNamed { public: - enum { - kVertDisplay =BIT(14), // If the axes are drawn vertically, false if horizontally. - kCurveDisplay =BIT(15), // If the polylines are replaced by interpolated curves. - kPaintEntries =BIT(16), // To prentry the TParallelCoord to paint all the entries. - kLiveUpdate =BIT(17), // To paint the entries when being modified. - kGlobalScale =BIT(19), // Every variable is on the same scale. - kCandleChart =BIT(20), // To produce a candle chart. - kGlobalLogScale =BIT(21) // Every variable in log scale. + enum EStatusBits { + kVertDisplay = BIT(14), // If the axes are drawn vertically, false if horizontally. + kCurveDisplay = BIT(15), // If the polylines are replaced by interpolated curves. + kPaintEntries = BIT(16), // To prentry the TParallelCoord to paint all the entries. + kLiveUpdate = BIT(17), // To paint the entries when being modified. + kGlobalScale = BIT(19), // Every variable is on the same scale. + kCandleChart = BIT(20), // To produce a candle chart. + kGlobalLogScale = BIT(21) // Every variable in log scale. }; private: diff --git a/tree/treeviewer/inc/TParallelCoordRange.h b/tree/treeviewer/inc/TParallelCoordRange.h index c1c4722e7a7b0..11b51d3352994 100644 --- a/tree/treeviewer/inc/TParallelCoordRange.h +++ b/tree/treeviewer/inc/TParallelCoordRange.h @@ -24,7 +24,7 @@ class TString; class TParallelCoordRange : public TNamed, public TAttLine { public: - enum { + enum EStatusBits { kShowOnPad = BIT(15), kLiveUpdate = BIT(16) }; diff --git a/tree/treeviewer/inc/TParallelCoordVar.h b/tree/treeviewer/inc/TParallelCoordVar.h index 5bd1fc2975f7d..8e29383d1d956 100644 --- a/tree/treeviewer/inc/TParallelCoordVar.h +++ b/tree/treeviewer/inc/TParallelCoordVar.h @@ -23,10 +23,10 @@ class TH1F; class TParallelCoordVar : public TNamed, public TAttLine, public TAttFill { public: - enum { - kLogScale =BIT(14), - kShowBox =BIT(15), - kShowBarHisto =BIT(16) + enum EStatusBits { + kLogScale = BIT(14), + kShowBox = BIT(15), + kShowBarHisto = BIT(16) }; private: Int_t fNbins; // Number of bins in fHistogram.