Hi all,
I am trying to save a TF1 object to a ttree, but can’t get it to work. Im using Pyroot with python3.
Here is the relevant code, with a simplified TF1 and fitting. I’ve also tried various other examples using the arrays as laid out at thee top of the TTree reference page
tt = TTree("tt", "processed Static variables")
pulse1 = TF1()
tt.Branch("fitPulse1", "TF1", pulse1)
pulse1 = TF1("myFunc", "[0] + x*[2]")
# do stuff with pulse1, only set parameters and do a fit h.Fit(pulse1...)
tt.Fill()
I get a segmentation violation error:
...lib/libTree.so] TBranch::FillImpl(ROOT::Internal::TBranchIMTHelper*) (no debug info)
Any help would be greatly appreciated!
Cheers
Austin
ROOT Version: 6.23
Platform: macOS
Compiler: Not Provided