_ROOT Version:6.20/02
_Platform:CentOS-7-x86_64
_Compiler:gcc 9.2 (I’m not sure but I install root from epel)
When I run a macro, I get the following error
Error in <TBranch::TBranch::WriteBasketImpl>: basket's WriteBuffer failed.
Error in <TBranch::TBranch::Fill>: Failed to write out basket.
Error in <TTree::Fill>: Failed filling branch:Gaussian.Gaussian, nbytes=-1, entry=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(...)
However , I has write
TTree *Gau=new TTree("Gaussian","Gaussian");
TFile* GS=new TFile("GS.ROOT","RECREATE");
So what can I do to solve this error