arrays of histograms

Peter (wittich@beier.hep.upenn.edu)
Fri, 15 Aug 1997 12:43:06 -0400


I'm new to this list, hope this hasn't been asked before but I could
not find out how to do this from the documentation.

I want to make an array of histograms. I will start with

TH1S *qll = new TH1S[16];

Now, I guess this calls the default constructor TH1S::TH1S(void) with
no information about setting up the histogram limits, titles,
etc. I've tried to do this by hand with something like

for (short it1 = 0; it1 < 16; it1++) {
qll[it1].SetBins(500, 300, 800);
}

but this does not seem to work (I get core dumps when I try to fill
the histograms.) What would the correct way of doing this be?

(From the documentation, I see that the other constructors call the
TH1S::Build() method to create the histogram data structure, but this
is a private method ??)

Thanks a lot in advance, and thanks for what looks to be a great
package.

-Peter

-- 
wittich@beier.hep.upenn.edu		
University of Pennsylvania High Energy Physics
-------------------------------------------------------------------