How to retrieve histogram saved in a C macro

Hello, I saved a TH1I in a C macro using the SaveAs method.
Now, I would like to compare this histogram to another one in another macro.
To do that, I write something like

TCanvas *c = new TCanvas("c","c"); c->Divide(2,1); c->cd(1); TH1I *h = new TH1I("h","h",500,-,3,3); h->FillRandom("gaus"); h->Draw(); c->cd(2) gROOT->ProcessLine(".x firstHisto.C");
where firstHisto.C is the name of the macro where my first histogram was saved. Doing this, it draw two histograms (the new one and the first one)
Than, I would like to get the histogram in firstHisto.C in order to manipulate it (for example to divide it by the histo “h”)
I guess something like “gROOT->Get(“hfirst”)” could work but it does not.
Thank you in advance.

Are you sure the other histogram is named “hfirst”?
If yes, try:

Indeed, I was loooking for the FindObject method.