Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
67d2d49
Remove never used enum (TRef::kNotComputed)
pcanal Aug 29, 2017
f7b63a2
Remove enum TClonesArray::kNoSplit not used since 2.26 (circa 2001)
pcanal Aug 29, 2017
e9c82a3
Update release notes
pcanal Aug 29, 2017
9a9d54f
Mark status bits as 'enum EStatusBits' in core, i/o, tree and hist.
pcanal Aug 29, 2017
4b8053e
Remove never used enum constant TLink::kObjIsParent
pcanal Aug 29, 2017
18c9cb5
Change value of TBranchObject::kWarn. Reset it upon reading.
pcanal Aug 29, 2017
8084146
Change value of TLeafObject::kWarn. Reset it upon reading.
pcanal Aug 29, 2017
20d96bb
Change value of TApplicationRemote::kCollecting.
pcanal Aug 29, 2017
1bc4ff7
Remove information duplication
pcanal Aug 29, 2017
87a10fc
Mark TObject::kObjInCanvas as deprecated
pcanal Aug 29, 2017
71f2c55
Add comments on status bits that are not available to TObject (even-t…
pcanal Aug 29, 2017
e2bf336
Update value of TClonesArray::kForgetBits.
pcanal Aug 30, 2017
67609c6
Introduce EStatusBitsDupExceptions in TStreamerElement and TVirtualSt…
pcanal Aug 30, 2017
f2ebec4
Introduce TStatusBitsChecker to avoid Status Bits overlap.
pcanal Aug 31, 2017
127c729
In ConvertToBit replace log2,nearbyint with std::frexp.
pcanal Aug 31, 2017
ae8a0ce
White spaces [NFC]
pcanal Aug 31, 2017
f2da26f
Typo [NFC]
pcanal Sep 1, 2017
3f043a6
Add TSystem::LoadAllLibs
pcanal Sep 1, 2017
28b43f6
Change value of TProofServ::kHighMemory and TVirtualProofPlayer::kIsS…
pcanal Sep 1, 2017
3fa653f
Add TStatusBitsChecker.cxx gtest
pcanal Sep 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mark status bits as 'enum EStatusBits' in core, i/o, tree and hist.
This allows for automatic checking overlaps in a given class hierarchy.
  • Loading branch information
pcanal committed Sep 1, 2017
commit 9a9d54f1ce69a733e542ae4eba9dd28bcf2162aa
2 changes: 1 addition & 1 deletion core/base/inc/TBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
6 changes: 4 additions & 2 deletions core/base/inc/TBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/cont/inc/TClonesArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TClonesArray : public TObjArray {
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)
};
Expand Down
2 changes: 1 addition & 1 deletion core/cont/inc/TCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/cont/inc/TMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion core/cont/inc/TRefTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TRefTable : public TObject {

public:

enum {
enum EStatusBits {
kHaveWarnedReadingOld = BIT(14)
};

Expand Down
22 changes: 12 additions & 10 deletions core/meta/inc/TClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you're touching this anyway, can you use pre-member doxygen doc like so:

/// The library containing the dictionary for this class was
/// loaded and has been unloaded from memory.
kUnloaded    = BIT(16),

This makes it easier to read and write precise documentation and enables doxygen to actually pick it up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annoying part is that (visually at the very least), unless there is a empy line above the comment, I never 'know' whether the comment applies to the one before or after.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we're paid by lines of code, so adding empty lines is a wonderful thing! ;-)

// 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

};
enum ENewType { kRealNew = 0, kClassNew, kDummyNew };
enum ECheckSum {
Expand Down
4 changes: 3 additions & 1 deletion core/meta/inc/TDataMember.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/meta/inc/TProtoClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/meta/inc/TRealData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
};

Expand Down
4 changes: 2 additions & 2 deletions core/meta/inc/TStreamerElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TStreamerElement : public TNamed {
kSTLbitset = ROOT::kSTLbitset
};
// TStreamerElement status bits
enum {
enum EStatusBits {
kHasRange = BIT(6),
kCache = BIT(9),
kRepeat = BIT(10),
Expand Down Expand Up @@ -374,7 +374,7 @@ class TStreamerString : public TStreamerElement {
//________________________________________________________________________
class TStreamerSTL : public TStreamerElement {

enum {
enum EStatusBits {
kWarned = BIT(21)
};

Expand Down
3 changes: 2 additions & 1 deletion core/meta/inc/TVirtualStreamerInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class TVirtualStreamerInfo : public TNamed {
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),
Expand Down
2 changes: 1 addition & 1 deletion graf2d/graf/inc/TLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TLink : public TText {
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();
Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TAxis.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TAxis : public TNamed, public TAttAxis {

public:
// TAxis status bits
enum {
enum EStatusBits {
kDecimals = BIT(7),
kTickPlus = BIT(9),
kTickMinus = BIT(10),
Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TBackCompFitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TBackCompFitter : public TVirtualFitter {

public:

enum {
enum EStatusBits {
kCanDeleteLast = BIT(9) // object can be deleted before creating a new one
};

Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TEfficiency.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ 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{
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
Expand Down
7 changes: 2 additions & 5 deletions hist/hist/inc/TF1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TFormula.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TGraph2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};

Expand Down
2 changes: 1 addition & 1 deletion hist/hist/inc/TH1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hist/histpainter/inc/TPaletteAxis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 5 additions & 3 deletions io/io/inc/TBufferFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ 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), kUser2 = BIT(22), kUser3 = BIT(23) //free for user
};

TBufferFile(TBuffer::EMode mode);
TBufferFile(TBuffer::EMode mode, Int_t bufsiz);
Expand Down
13 changes: 7 additions & 6 deletions io/io/inc/TStreamerInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ 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)
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
Expand Down
6 changes: 6 additions & 0 deletions tree/tree/inc/TBranch.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ class TBranch : public TNamed , public TAttFill {

// 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.
};
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TBranchElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TBranchObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TChain : public TTree {

public:
// TChain constants
enum {
enum EStatusBits {
kGlobalWeight = BIT(15),
kAutoDelete = BIT(16),
kProofUptodate = BIT(17),
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TFriendElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TLeaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
};
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TLeafObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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(12) };

TLeafObject();
TLeafObject(TBranch *parent, const char *name, const char *type);
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/inc/TTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
Expand Down
2 changes: 1 addition & 1 deletion tree/treeplayer/inc/TSelectorDraw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tree/treeplayer/inc/TTreeFormula.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tree/treeplayer/inc/TTreeReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
2 changes: 1 addition & 1 deletion tree/treeviewer/inc/TParallelCoord.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tree/treeviewer/inc/TParallelCoordRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TString;

class TParallelCoordRange : public TNamed, public TAttLine {
public:
enum {
enum EStatusBits {
kShowOnPad = BIT(15),
kLiveUpdate = BIT(16)
};
Expand Down
Loading