Dear experts,
I used [1] to clone a tree, but when I used the TBrowser t to see the variables, I got these error message [2]. If I used [3] like in the tutorial, it works fine, but here, I need to give the tree a different name then the original one. Do you know what is wrong?
Regards
[1]
TFile* ifile = new TFile(input.c_str(),“READ”);
TTree itree = (TTree) ifile->Get(treename.c_str());
TFile* ofile = new TFile(outputfile.c_str(),“RECREATE”);
TTree newtree = (TTree)itree->Clone(“tree”);
newtree->Write();
ofile->Write();
delete ofile;
delete ifile;
[2]
…
Error in TFile::ReadBuffer: error reading all requested bytes from file syncntuple/lip_mt_VBFHToTauTauM125.root, got 0 of 119
Error in TFile::ReadBuffer: error reading all requested bytes from file syncntuple/lip_mt_VBFHToTauTauM125.root, got 0 of 119
Error in TFile::ReadBuffer: error reading all requested bytes from file syncntuple/lip_mt_VBFHToTauTauM125.root, got 0 of 119
…
[3]
TTree *newtree = oldtree->CloneTree();
root.cern.ch/root/html/tutorial … ree.C.html