I am doing an analysis where I read a TTree from a TFile, and fill the processed quantities in a new TTree. My set-up code looks like:
f = ROOT.TFile("../rootfiles/Outputs/Run0504/standard_analysed.root")
t = f.Get("standard_analyzed")
tout = ROOT.TTree("tout","Output tree")
While running, I eventually get errors like this one every few thousand entries:
[quote]Error in TTree::Fill: Failed filling branch:tout.dedx2, nbytes=-1, entry=7981
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(…)[/quote]
In the end the code seems to work, and I can access the output tree. Should I be worried about this, is there a way to fix it/get rid of the error?