Changing the way the style is forced in the cmsStyle to allow changing parameters #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)