From d8d57580ce26ad992ff81e7948ba8278237d1e56 Mon Sep 17 00:00:00 2001
From: Philippe Canal <pcanal@fnal.gov>
Date: Tue, 29 Aug 2017 13:08:39 -0500
Subject: [PATCH] Mark status bits as 'enum EStatusBits' in core, i/o, tree and
 hist.

This allows for automatic checking overlaps in a given class hierarchy.
---
 core/base/inc/TBrowser.h                  |  2 +-
 core/base/inc/TBuffer.h                   |  6 ++++--
 core/cont/inc/TClonesArray.h              |  2 +-
 core/cont/inc/TCollection.h               |  2 +-
 core/cont/inc/TMap.h                      |  2 +-
 core/cont/inc/TRefTable.h                 |  2 +-
 core/meta/inc/TClass.h                    | 22 ++++++++++++----------
 core/meta/inc/TDataMember.h               |  4 +++-
 core/meta/inc/TProtoClass.h               |  2 +-
 core/meta/inc/TRealData.h                 |  2 +-
 core/meta/inc/TStreamerElement.h          |  4 ++--
 core/meta/inc/TVirtualStreamerInfo.h      |  3 ++-
 graf2d/graf/inc/TLink.h                   |  2 +-
 hist/hist/inc/TAxis.h                     |  2 +-
 hist/hist/inc/TBackCompFitter.h           |  2 +-
 hist/hist/inc/TEfficiency.h               |  2 +-
 hist/hist/inc/TF1.h                       |  7 ++-----
 hist/hist/inc/TFormula.h                  |  2 +-
 hist/hist/inc/TGraph.h                    |  2 +-
 hist/hist/inc/TGraph2D.h                  |  2 +-
 hist/hist/inc/TH1.h                       |  2 +-
 hist/histpainter/inc/TPaletteAxis.h       |  2 +-
 io/io/inc/TBufferFile.h                   |  8 +++++---
 io/io/inc/TStreamerInfo.h                 | 13 +++++++------
 tree/tree/inc/TBranch.h                   |  6 ++++++
 tree/tree/inc/TBranchElement.h            |  2 +-
 tree/tree/inc/TBranchObject.h             |  2 +-
 tree/tree/inc/TChain.h                    |  2 +-
 tree/tree/inc/TFriendElement.h            |  2 +-
 tree/tree/inc/TLeaf.h                     |  2 +-
 tree/tree/inc/TLeafObject.h               |  2 +-
 tree/tree/inc/TTree.h                     |  2 +-
 tree/treeplayer/inc/TSelectorDraw.h       |  2 +-
 tree/treeplayer/inc/TTreeFormula.h        |  2 +-
 tree/treeplayer/inc/TTreeReader.h         |  2 +-
 tree/treeviewer/inc/TParallelCoord.h      |  2 +-
 tree/treeviewer/inc/TParallelCoordRange.h |  2 +-
 tree/treeviewer/inc/TParallelCoordVar.h   |  2 +-
 38 files changed, 72 insertions(+), 59 deletions(-)

diff --git a/core/base/inc/TBrowser.h b/core/base/inc/TBrowser.h
index 2d00418b2fc..5bca1680eef 100644
--- a/core/base/inc/TBrowser.h
+++ b/core/base/inc/TBrowser.h
@@ -49,7 +49,7 @@ protected:
    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 9791d038358..903bd986013 100644
--- a/core/base/inc/TBuffer.h
+++ b/core/base/inc/TBuffer.h
@@ -68,8 +68,10 @@ protected:
 
 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/cont/inc/TClonesArray.h b/core/cont/inc/TClonesArray.h
index d9fc289fa7a..1b73e17a9a7 100644
--- a/core/cont/inc/TClonesArray.h
+++ b/core/cont/inc/TClonesArray.h
@@ -36,7 +36,7 @@ protected:
    TObjArray    *fKeep;        //!Saved copies of pointers to objects
 
 public:
-   enum {
+   enum EStatusBits {
       kForgetBits     = BIT(0),   // Do not create branches for fBits, fUniqueID
       kBypassStreamer = BIT(12)   // Class Streamer not called (default)
    };
diff --git a/core/cont/inc/TCollection.h b/core/cont/inc/TCollection.h
index 7201b78a679..c76a7d9d3df 100644
--- a/core/cont/inc/TCollection.h
+++ b/core/cont/inc/TCollection.h
@@ -135,7 +135,7 @@ private:
    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 6ca73cb7f5d..0e27e99c5f4 100644
--- a/core/cont/inc/TMap.h
+++ b/core/cont/inc/TMap.h
@@ -48,7 +48,7 @@ private:
    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 052c43ae46f..947bec6db8f 100644
--- a/core/cont/inc/TRefTable.h
+++ b/core/cont/inc/TRefTable.h
@@ -59,7 +59,7 @@ protected:
 
 public:
 
-   enum {
+   enum EStatusBits {
       kHaveWarnedReadingOld = BIT(14)
    };
 
diff --git a/core/meta/inc/TClass.h b/core/meta/inc/TClass.h
index 8e2f8371243..08b0b7dab29 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 071c7672fd7..220f3578d10 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 3d435e0910e..84c65b53d3e 100644
--- a/core/meta/inc/TProtoClass.h
+++ b/core/meta/inc/TProtoClass.h
@@ -41,7 +41,7 @@ public:
       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 bd84870d376..b53c84bf84c 100644
--- a/core/meta/inc/TRealData.h
+++ b/core/meta/inc/TRealData.h
@@ -40,7 +40,7 @@ private:
    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/TStreamerElement.h b/core/meta/inc/TStreamerElement.h
index 97b2fbfc7e6..87fac7b9308 100644
--- a/core/meta/inc/TStreamerElement.h
+++ b/core/meta/inc/TStreamerElement.h
@@ -73,7 +73,7 @@ public:
       kSTLbitset            = ROOT::kSTLbitset
    };
    // TStreamerElement status bits
-   enum {
+   enum EStatusBits {
       kHasRange     = BIT(6),
       kCache        = BIT(9),
       kRepeat       = BIT(10),
@@ -374,7 +374,7 @@ public:
 //________________________________________________________________________
 class TStreamerSTL : public TStreamerElement {
 
-   enum {
+   enum EStatusBits {
       kWarned       = BIT(21)
    };
 
diff --git a/core/meta/inc/TVirtualStreamerInfo.h b/core/meta/inc/TVirtualStreamerInfo.h
index 2a9ae8803b1..bd9a4658ee6 100644
--- a/core/meta/inc/TVirtualStreamerInfo.h
+++ b/core/meta/inc/TVirtualStreamerInfo.h
@@ -62,7 +62,8 @@ protected:
 public:
 
    //status bits
-   enum { kCannotOptimize        = BIT(12),
+   enum EStatusBits {
+          kCannotOptimize        = BIT(12),
           kIgnoreTObjectStreamer = BIT(13),  // eventhough BIT(13) is taken up by TObject (to preserve forward compatibility)
           kRecovered             = BIT(14),
           kNeedCheck             = BIT(15),
diff --git a/graf2d/graf/inc/TLink.h b/graf2d/graf/inc/TLink.h
index e239ff01f9c..cf2bbf2cb13 100644
--- a/graf2d/graf/inc/TLink.h
+++ b/graf2d/graf/inc/TLink.h
@@ -22,7 +22,7 @@ protected:
    void   *fLink;           ///< pointer to object
 
 public:
-   enum { kObjIsParent = BIT(1) , kIsStarStar = BIT(2)};
+   enum EStatusBits { kObjIsParent = BIT(1) , 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 a9328bd4697..5564f9a7166 100644
--- a/hist/hist/inc/TAxis.h
+++ b/hist/hist/inc/TAxis.h
@@ -54,7 +54,7 @@ private:
 
 public:
    // TAxis status bits
-   enum {
+   enum EStatusBits {
           kDecimals      = BIT(7),
           kTickPlus      = BIT(9),
           kTickMinus     = BIT(10),
diff --git a/hist/hist/inc/TBackCompFitter.h b/hist/hist/inc/TBackCompFitter.h
index 46244e25b5b..b3fb56cf0ab 100644
--- a/hist/hist/inc/TBackCompFitter.h
+++ b/hist/hist/inc/TBackCompFitter.h
@@ -49,7 +49,7 @@ public:
 
 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 4511eea6f84..b6a388013bb 100644
--- a/hist/hist/inc/TEfficiency.h
+++ b/hist/hist/inc/TEfficiency.h
@@ -58,7 +58,7 @@ protected:
       TH1*          fTotalHistogram;         //histogram for total number of events
       Double_t      fWeight;                 //weight for all events (default = 1)
 
-      enum{
+      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
diff --git a/hist/hist/inc/TF1.h b/hist/hist/inc/TF1.h
index 426b8223f14..dac95f3375b 100644
--- a/hist/hist/inc/TF1.h
+++ b/hist/hist/inc/TF1.h
@@ -301,12 +301,9 @@ public:
    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 6b00c27e610..7c866eeb248 100644
--- a/hist/hist/inc/TFormula.h
+++ b/hist/hist/inc/TFormula.h
@@ -145,7 +145,7 @@ protected:
 
 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 e24cc5466d9..30e250ecd78 100644
--- a/hist/hist/inc/TGraph.h
+++ b/hist/hist/inc/TGraph.h
@@ -66,7 +66,7 @@ protected:
 
 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 2b53f2c187e..12340875081 100644
--- a/hist/hist/inc/TGraph2D.h
+++ b/hist/hist/inc/TGraph2D.h
@@ -65,7 +65,7 @@ private:
 
    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 05437fec36d..8344210e1bd 100644
--- a/hist/hist/inc/TH1.h
+++ b/hist/hist/inc/TH1.h
@@ -144,7 +144,7 @@ protected:
 
 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 d0b6e326768..499f8598ff1 100644
--- a/hist/histpainter/inc/TPaletteAxis.h
+++ b/hist/histpainter/inc/TPaletteAxis.h
@@ -35,7 +35,7 @@ protected:
 
 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/io/io/inc/TBufferFile.h b/io/io/inc/TBufferFile.h
index 5ac88d3e00c..c0650473d1f 100644
--- a/io/io/inc/TBufferFile.h
+++ b/io/io/inc/TBufferFile.h
@@ -78,9 +78,11 @@ protected:
 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), kUser2 = BIT(22), 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 14b144fdc75..48d345bcc3d 100644
--- a/io/io/inc/TStreamerInfo.h
+++ b/io/io/inc/TStreamerInfo.h
@@ -136,12 +136,13 @@ private:
 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)
+   enum EStatusBits {
+      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)
    };
 
 /// EReadWrite Enumerator
diff --git a/tree/tree/inc/TBranch.h b/tree/tree/inc/TBranch.h
index 1e7eb32e1e5..0139d671605 100644
--- a/tree/tree/inc/TBranch.h
+++ b/tree/tree/inc/TBranch.h
@@ -62,6 +62,12 @@ protected:
 
    // TBranch status bits
    enum EStatusBits {
+      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 6b1f13bd4d0..530670957af 100644
--- a/tree/tree/inc/TBranchElement.h
+++ b/tree/tree/inc/TBranchElement.h
@@ -48,7 +48,7 @@ class TBranchElement : public TBranch {
 
 // Types
 protected:
-   enum {
+   enum EStatusBits {
       kBranchFolder = BIT(14),
       kDeleteObject = BIT(16),  ///<  We are the owner of fObject.
       kCache        = BIT(18),  ///<  Need to pushd/pop fOnfileObject.
diff --git a/tree/tree/inc/TBranchObject.h b/tree/tree/inc/TBranchObject.h
index f30cc043788..f5ef252e3d4 100644
--- a/tree/tree/inc/TBranchObject.h
+++ b/tree/tree/inc/TBranchObject.h
@@ -26,7 +26,7 @@
 class TBranchObject : public TBranch {
 
 protected:
-   enum { kWarn = BIT(12) };
+   enum EStatusBits { kWarn = 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 34fc4d72bf4..20865e3a1c5 100644
--- a/tree/tree/inc/TChain.h
+++ b/tree/tree/inc/TChain.h
@@ -55,7 +55,7 @@ protected:
 
 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 c856a2b9f12..03c26f9878d 100644
--- a/tree/tree/inc/TFriendElement.h
+++ b/tree/tree/inc/TFriendElement.h
@@ -45,7 +45,7 @@ protected:
    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 5fcc27a5b34..d4fe0aba702 100644
--- a/tree/tree/inc/TLeaf.h
+++ b/tree/tree/inc/TLeaf.h
@@ -50,7 +50,7 @@ protected:
   };
 
 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 b112915d65e..e256c9bb448 100644
--- a/tree/tree/inc/TLeafObject.h
+++ b/tree/tree/inc/TLeafObject.h
@@ -36,7 +36,7 @@ protected:
    Bool_t       fVirtual;        ///<  Support for polymorphism, when set classname is written with object.
 
 public:
-   enum { kWarn = BIT(12) };
+   enum EStatusBits { kWarn = 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 6ebfe237495..8fbcb1ccd5a 100644
--- a/tree/tree/inc/TTree.h
+++ b/tree/tree/inc/TTree.h
@@ -215,7 +215,7 @@ public:
    };
 
    // TTree status bits
-   enum {
+   enum EStatusBits {
       kForceRead   = BIT(11),
       kCircular    = BIT(12)
    };
diff --git a/tree/treeplayer/inc/TSelectorDraw.h b/tree/treeplayer/inc/TSelectorDraw.h
index 17623cfbbf1..bef2cbc9914 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 017571d1486..139b8bb5c02 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 aa4a32be500..ca2b75822d0 100644
--- a/tree/treeplayer/inc/TTreeReader.h
+++ b/tree/treeplayer/inc/TTreeReader.h
@@ -223,7 +223,7 @@ protected:
 
 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 379bb3da511..98568bc6438 100644
--- a/tree/treeviewer/inc/TParallelCoord.h
+++ b/tree/treeviewer/inc/TParallelCoord.h
@@ -27,7 +27,7 @@ class TSelectorDraw;
 
 class TParallelCoord : public TNamed {
 public:
-   enum {
+   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.
diff --git a/tree/treeviewer/inc/TParallelCoordRange.h b/tree/treeviewer/inc/TParallelCoordRange.h
index c1c4722e7a7..11b51d33529 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 5bd1fc2975f..c5702a03334 100644
--- a/tree/treeviewer/inc/TParallelCoordVar.h
+++ b/tree/treeviewer/inc/TParallelCoordVar.h
@@ -23,7 +23,7 @@ class TH1F;
 
 class TParallelCoordVar : public TNamed, public TAttLine, public TAttFill {
 public:
-   enum {
+   enum EStatusBits {
       kLogScale      =BIT(14),
       kShowBox       =BIT(15),
       kShowBarHisto  =BIT(16)
-- 
GitLab