Dear all,
I encountered a rather peculiar behaviour in a Python I am currently writing and in which I use PyROOT. I first fit a TH2D using FitSlicesX. Later in my program I use Roostats to compute and draw a LikelihoodIntervalPlot. These two actions are executed within a for loop running of several files. At the first iteration everything is fine. However, at the second iteration the code crashes with the following Traceback Error :
***** Break *** segmentation violation**
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
/Users/mougeot_maxime/ownCloud/Documents/Argon/analysis/test_profile_draw.py in ()
34 tobj = ROOT.TObjArray()
35 f1 = ROOT.TF1(‘f1’,‘gaus(0)’,roilow,roimax)
—> 36 th2.FitSlicesX(f1,0,-1,0,‘QNR’,tobj)
37 data = ROOT.RooDataHist(“data”,“data”,
38 ROOT.RooArgList(t),\
SystemError: problem in C++; program state has been reset
I tracked the problem down as being due to the call of the Draw() function on my LikelihoodIntervalPlot object. When I comment out the call to draw the code terminates fine . My original code is rather long but I put together a small code which seems to show the same behaviour. I put the latter in attachment.
I would greatly appreciate some insights from more experienced people concerning this issue.
Thank you all in advance.
test_profile_draw.py (2.3 KB)
test_data.txt (69.9 KB)