How to delete TGraph /TH1/... objects in a file

Good morning,

I’d like to know how I can delete TGraph, Thistograms, … contained in a .root file.

Thank you in advance.

Tina

TFile *f = TFile::Open("myfile.root","update"); f.delete("myobject;1");
see root.cern.ch/root/html/TDirector … ile:Delete

Rene

It works!! :slight_smile:

Thanks a lot!!

Tina