I want to create a Tree in a new file, but now I only can create the new file and there is no tree in this file,like this:
This is my main code:
TFile fout("nin.root","recreate");
TTree tree("tree","p");
tree.Branch("tof1",&tof1,"tof1/F");//and other branches
for(i=0;i<events;i++)
{
tree.Fill();
}
fout.Close();
I don’t know where’s the problem.