Thank you Wile for your reply, I think I posted an old part of the code, this is the right part were I do’nt recreate
if (!Skip) {
f_cut = new TFile(“cutg_hello.root”);
cutg = (TCutG*) gPad->WaitPrimitive(“CUTG”, “CUTG”); // making cut, store to CUTG
cout << “\n … finished graphical cut … rereading the ntuple using that g-cut \n”;
f_cut->cd();
cutg->Write();
cutg->SaveAs(“hoho.c”); // just testing
f_cut->Close();
cout << "Area is … " << cutg->Area() << endl;
And I only get the saved hoho.c file saved when I open the “cutg_hello.root” I get thie following error: Error in TFile::ReadBuffer: error reading all requested bytes from file cutg_hello.root, got 226 of 300
Error in TFile::Init: cutg_hello.root failed to read the file type data.