Hello,
I am reading RooDataSet out of a root tree.
I tried both
RooDataSet* data1 = new RooDataSet(“data”,“myanalysis.root”,“mumug”,RooArgSet(p_r9,p_eta,m3));
and
TFile *file_in = new TFile("myanalysis.root","update");
TTree *mumug = (TTree*) file_in->Get("mumug");
RooDataSet* data1 = new RooDataSet("data","data",mumug,RooArgSet(p_r9,p_eta,m3));
and every time I get these messages:
Error in TTree::Fill: Failed filling branch:mumug.scale, nbytes=-1
This error is symptomatic of a Tree created as a memory-resident Tree
Instead of doing:
TTree *T = new TTree(…)
TFile *f = new TFile(…)
you should do:
TFile *f = new TFile(…)
TTree *T = new TTree(…)
now perhaps even more interestingly, in former case the program runs, while in the latter case I get segmentation fault when I try to fit.
any ideas?
I’m using root 5.16 on Mac OS
thanks,
Yuri