[help] histograms with same name

I am fresh new to root.
And when I cloned histograms, I forgot to give it a specific name other than the original one. So I am stuck when trying to use the histograms again.
Here is what I have when do a .ls()

OBJ: TH1F h1 h1 : 0 at: 0xa4e24a0
OBJ: TH1F h2 h2 : 0 at: 0xa502ba8
KEY: TH1F h1;2 h1
KEY: TH1F h1;1 h1
KEY: TH1F h2;3 h2
KEY: TH1F h2;2 h2
KEY: TH1F h2;1 h2

Is there a way to rename these histograms?
Thanks! :slight_smile:

Hi,

You need to load the specific โ€˜versionโ€™ of the histogram, change the name and save it again.TH1F *h; myfile->GetObject("h2;2",h); h->SetName(newname); h->Write();
Cheers,
Philippe.