Read TH2D from file

Dear all,
I try to get the bins’ content of a TH2D (48x48 bins) that I saved in a root file.
The histogram is read, since I can visualize it through the macro, but I get for every bin, a 0 content.
Attached is my macro.

Could you please give me any advice? Thanks!

Francesca

read_TH2D.C (472 Bytes)

Hi Francesca,

can you share the root file?

Danilo

Post your “TH2D.root” root file here.

Dear Danilo,
here is the root file.
Thanks!

Francesca

TH2D.root (17.9 KB)

.
read_TH2D.C (746 Bytes)

Thanks a lot, it worked!
Francesca