fTotBytes error

Instead of “TFile fc2012(…);” try “TFile *fc2012 = new TFile(…);” and instead of “TTree tc2012(…);” try "TTree *tc2012 = new TTree(…);"
Note: the “for” loop should end after “tc2012->Fill();” and before "tc2012->Print();"
The last four lines should be:
tc2012->Write(); // write the tree to the output file
delete fc2012; // close the output file (DO NOT try to delete the tc2012 tree manually!!!)
fclose(file); // close the input file
See also: [url]GetEntry() crash in second using