From ad5bd11e12604004447f7692168a8c76121fd34f Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 14 Apr 2020 05:35:55 +0200 Subject: [PATCH] PyAnalysisUtils: Work around cling issue with detached debug info When TH1::Draw is called, root tries to call a TCanvas method to create the default canvas. If that method has not been linked, then root will search all DSOs on the library path until it find that method. (This mechanism is separate from the rootmap mechanism.) However, root will also pick up detached debug files during this scan, but will crash trying to read them. Work around by ensuring thad TPad has been loaded before calling Draw. --- PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py | 1 + 1 file changed, 1 insertion(+) diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py index beda5748ef7..dee44fca7d3 100644 --- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py +++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py @@ -810,6 +810,7 @@ import ROOT ROOT.gROOT.SetBatch (True) h1=ROOT.TH1F('hx','hx', 10, 0, 10) +ROOT.TPad h1.Draw() p=ROOT.gPad p.SetPad('pad', 'pad', 0, 0.25, 0.5, 1) -- GitLab