How to divide 2 histograms with same name in diferent files?

Hi experts,
I have 2 files and each file contain a histogram with exactly same, but in one case the histogram was filled with trigger request.

I want divide one histogram by another.

Someone can give me a tip to solve my question?

M. Pacheco

TFile *f1 = TFile::Open("file1.root"); TH1 * h1 = (TH1*)f1->Get"histname"); TFile *f2 = TFile::Open("file2.root"); TH1 * h12= (TH1*)f2->Get"histname"); h1->Divide(h2);