_ROOT Version: ROOT 6.17/01
_Platform: linuxx8664gcc
_Compiler:_gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)
Hello,
I am trying to delete histograms using the following method. But it is NOT working!
root [0] TFile *f = new TFile("test1.root", "UPDATE");
root [1] .ls
TFile** test1.root
TFile* test1.root
KEY: TH2F his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
KEY: TH1D pY_528_his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
KEY: TH1D pY_670_his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
root [2] delete his2D_clean;
root [3] delete pY_670_his2D_clean;
root [4] f->Write();
root [5] f->Close();
root [6] .ls
root [7] TFile *f1 = new TFile("test1.root", "UPDATE");
root [8] .ls
TFile** test1.root
TFile* test1.root
KEY: TH2F his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
KEY: TH1D pY_528_his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
KEY: TH1D pY_670_his2D_clean;1 2Dbg and 2Drand_GG subtracted his2D
root [9]
Am I doing any obvious mistake? Again, I don’t use ROOT often, and this may sound a naive question.
Regards,
Ajay