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

Basic fixes for 11_2_X, no validation yet #256

Closed
wants to merge 4 commits into from
Closed

Basic fixes for 11_2_X, no validation yet #256

wants to merge 4 commits into from

Conversation

ajgilbert
Copy link
Collaborator

No description provided.

@nsmith-
Copy link
Contributor

nsmith- commented Feb 23, 2022

I found a small issue with plot1DScan.py in 112x, here is a patch:

commit d763ab5a7f30d47f5d5cf52cd8761605b3fc50aa (HEAD -> 112x)
Author: Nick Smith <nick.smith@cern.ch>
Date:   Tue Feb 22 18:35:35 2022 -0600

    Fix 'callable was deleted' error in plot1DScan.py

diff --git a/CombineTools/scripts/plot1DScan.py b/CombineTools/scripts/plot1DScan.py
index 2d7dfac..66152aa 100755
--- a/CombineTools/scripts/plot1DScan.py
+++ b/CombineTools/scripts/plot1DScan.py
@@ -44,7 +44,9 @@ def BuildScan(scan, param, files, color, yvals, ycut):
     graph.SetMarkerColor(color)
     spline = ROOT.TSpline3("spline3", graph)
     global NAMECOUNTER
-    func = ROOT.TF1('splinefn'+str(NAMECOUNTER), partial(Eval, spline), graph.GetX()[0], graph.GetX()[graph.GetN() - 1], 1)
+    func_method = partial(Eval, spline)
+    func = ROOT.TF1('splinefn'+str(NAMECOUNTER), func_method, graph.GetX()[0], graph.GetX()[graph.GetN() - 1], 1)
+    func._method = func_method
     NAMECOUNTER += 1
     func.SetLineColor(color)
     func.SetLineWidth(3)

I'll leave it here in case it is useful later

@ajgilbert ajgilbert closed this Jan 25, 2023
@ajgilbert ajgilbert deleted the 112x branch January 25, 2023 12:02
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