Hi All, I am a beginner and am learning ROOT. I was trying to make a ROOT file using these commands :
TFile *outfile = new TFile(“ht.root”,“RECREATE”);
TTree *newtree= new TTree(“newtree”,“test”);
TH1F *rc = new TH1F(“rc”,“rc”,500,10,4000);
Where, rc will be added as a branch in the tree ‘newtree’.
But the branch is not added to the tree rather it is separately added as a branch. What should I do to get a branch in the tree?