How to merge several TH1Ds to a TH2D?

how do we merge quantities of TH1D histograms to one TH2D histogram?

   thanks in advance!


You should loop on all the TH1D, get the bins contents and fill the TH2D accordingly

Thanks for reply~ :smiley:
I get it. Wonder if there’s any examples?
What if I fill the TH2D with root files,like in the attachment?

That’s just 2 a double loop… get bin content on the TH1Ds and set bin content on the TH2D… nothing really complex

I get it, really thank you
best regard!