There are two ways:
TH1F *histogram = new TH1F( some parameters); TH1F &bins = *histogram; for (int i=0; i< 100; i++) printf(" Bin %i contains the value %f\n", i, bins[i]); 2. One can use the methods like TH1::GetBin<XXX> , where XXX could be "Center", "Content", "Error" etc see doc please http://root.cern.ch/root/htmldoc/TH1.html#TH1:GetBinContent
Hope this helps.
Valeri
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch
[mailto:owner-roottalk_at_pcroot.cern.ch] On
> Behalf Of nasim
> Sent: Sunday, July 02, 2006 7:43 PM
> To: roottalk_at_pcroot.cern.ch
> Subject: [ROOT] geting the values stored in the histograms.
>
>
> Hi,
> If we have one dimensional histogram with 100 entries.
> Is it possible to extract the value of its x axis for each entry?
>
> Any help would be appreciated,
>
> Nasim
>
>
> --
Received on Mon Jul 03 2006 - 03:09:18 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET