Re: [ROOT] HBOOK - HUNPAK, ROOT - ????

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jul 10 2000 - 21:42:48 MEST


Hi Slava,
Assuming a TH1 *h, you can get a pointer to the array of bin contents
directly via
h->GetArray()
For example if you use a TH1F, this class derives from TH1 and TArrayF.
In this case you can write
  float *bins = h->GetArray()
bins[0] = number of underflows
bins[1] = content of 1st bin
bins[n] = content of last bin n
bins[n+1]= number of overflows

You can also use a loop with TH1::GetBinContent

Rene Brun

On Mon, 10 Jul 2000, Vyacheslav E. Kouznetsov wrote:

> Hi, ROOTers!
> I want to find some analog HUNPAK functions in the HBOOK....
> I want to extract histograms into array. Any ideas?
> 
> Best regards,
> 	Slava.
> 
> 
> **************************************************************
> 
>             INSTITUTE FOR NUCLEAR RESEARCH
>               RUSSIAN ACADEMY OF SCIENCE
>                Viatcheslav E. Kouznetsov
> 
> phone: 7-(095)-1336585
> fax  : 7-(095)-1352268
> **************************************************************
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:29 MET