Hi
I am trying to delete a histo in a file - I ve read already Deleting a histogram within a root file but it does not help…
[code]root -l file.root
_file0->ls()
KEY: TH1F histo_example;1 example Histo
[/code]
then I try
[code]gDirectory->Delete(“histo_example;1”);
or
_file0->Delete(“histo_example;1”);
_file0->ls()
KEY: TH1F histo_example;1 example Histo[/code]
What I am doing wrong ?
thanks
Alex
Hi
An Update
This kind of recipe
was not working… Instead this works (my histos are are not located inside a dir rather thatn the top dir
TFile* file = new TFile("myfile.root", "update");
file->Delete("Histo;1");
file->Close();
Cheers
Alex