-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SetStats for TGraph. #8498
Conversation
Starting build on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what is the default value (initialization) of the TGraph::kNoStats
bit? Is the behavior backward compatible?
@@ -67,6 +67,7 @@ class TGraph : public TNamed, public TAttLine, public TAttFill, public TAttMarke | |||
public: | |||
// TGraph status bits | |||
enum EStatusBits { | |||
kNoStats = BIT(9), ///< Don't draw stats box |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check that the BIT(9)
doesn't conflict in the parent class(es)? I.e. BIT(9)
could already be used by any of the TNamed
, TAttLine
, TAttFill
, TAttMarker
classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I checked it is used in TH1 for exactly the same thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked in TGraph.cxx the other bits are not initialised in the constructors. There is only two calls to ResetBit and that's not in the constructors.:
hist/src/TGraph.cxx: const_cast <TGraph*>(this)->ResetBit(kResetHisto);
hist/src/TGraph.cxx: if (editable) ResetBit(kNotEditable);
I guess the BIT are initialised elsewhere. The behaviour I get is correct.i It is backward compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks Olivier
As requested here: https://root-forum.cern.ch/t/remove-stats-box-from-fitted-tgraph/45490