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

Changing the way the style is forced in the cmsStyle to allow changing parameters #49

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

oglez
Copy link
Contributor

@oglez oglez commented Sep 28, 2024

This commit contains (aside from some typo corrections and white space removal) two changes.

  • First allows to call cmsStyle with an argument that indicates whether the style should be enforced to any object in the session. It keeps the default kTRUE that keeps the previous bahaviour, but allows to use kFALSE that could be useful for people e.g. storing some format values in the input ROOT files.

  • Second, it prevents overwriting the style whenever once create the canvas using cmsstyle.cmsCanvas as it was done in the code. the change is motivated to allow changing some parameters between the creation of the style and the creation of the Canvas, e.g.

cmsstyle.setCMSStyle(ROOT.kFALSE)
ROOT.gStyle.SetNdivisions(505, "X")
canv = cmsstyle.cmsCanvas(...)

This code does not work in the implementation before this commit. With this commit the X axis would show the proper behaviour.

First change is 100% backward compatible and no change in any existing code should appear.
Second change may change results for codes not using the tool properly, likely to actually overcome the problem that this change should fix. No actual impact is expected at all except people mixing styles (what should not be desired)

@lenzip lenzip requested a review from ttedeschi October 4, 2024 12:52
@ttedeschi ttedeschi merged commit 687a4f0 into cms-cat:master Oct 8, 2024
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.

2 participants