Histogram Array in pyroot

Hi

I want to define array of histograms in pyroot. Could you please help me ?

Hi,

are you after an “array” in the C++ sense of the word or just a collection?
If the latter, you can proceed as follow

import ROOT
l=[]
l.append(ROOT.TH1F("myHisto","myHisto",64,-4,4))
print l
# prints [<ROOT.TH1F object ("myHisto") at 0x46db5b0>]

Cheers,
D

Hi

I got it. Thank you for help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.