I am writing a script to open 16 files and recreate 16 files. I have passed a string but it gives me error (as in topic). Then I removed the string and runs only one file but again it gives me the same error. I donot know how to remove this. Kindly help me to resolve this issue. I am attaching my script and root file path.
Move: TFile *ff = new TFile("0jet.root","RECREATE");
Z_Inv_mass->Write();
// ...
tight_prof->Write(); to outside of the “for (Long64_t i = 0; i < nentries; i++)” loop (so, move it to below the closing “}” of this loop).
Also, replace: f->Close();
ff->Write();
ff->Close(); with: delete ff;
delete f;