Skip to content
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

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Implement SetStats for TGraph. #8498

merged 1 commit into from
Jun 22, 2021

Conversation

couet
Copy link
Member

@couet couet commented Jun 21, 2021

@couet couet requested a review from lmoneta June 21, 2021 15:00
@couet couet self-assigned this Jun 21, 2021
@couet couet requested a review from Axel-Naumann as a code owner June 21, 2021 15:00
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

Copy link
Member

@bellenot bellenot left a 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
Copy link
Member

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

Copy link
Member Author

@couet couet Jun 22, 2021

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

Copy link
Member Author

@couet couet Jun 22, 2021

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.

@couet couet requested review from bellenot and removed request for Axel-Naumann and lmoneta June 22, 2021 11:50
Copy link
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

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

OK, thanks Olivier

@couet couet merged commit e1bdaf6 into root-project:master Jun 22, 2021
@couet couet deleted the setstats-for-tgraph branch June 22, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants