Re: Histogram bugs?

Rene Brun (Rene.Brun@cern.ch)
Mon, 16 Mar 1998 17:08:26 +0100


Stephen Eichblatt wrote:
>
> HI, I am running root 2.0 on linux.
>
> First, I would like the new look and feel of root 2.0.
>
> But I have observed that GetIntegral() (and the functions required to get
> it, like GetBinContent() ) don't work in the new version.
>
> eg:
>
I cannot reproduce your problem on any system.
Can you test that the following macro works as expected?

Rene Brun


{

h=new TH1F("h","h",100,0,100);
h->Fill(10);
h->Fill(20);
h->Fill(30);
Double_t res = h->GetIntegral();
printf("integral=%g\n",res);
}

0% root
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 2.00/00 9 March 1998 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
> CINT/ROOT C/C++ Interpreter version 5.13.42, Jan 23 1998
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] h=new TH1F("h","h",100,0,100)
> (class TH1F*)0x0
> root [1] h->Fill(10)
> root [2] h->Fill(20)
> root [3] h->Fill(30)
> root [4] h->GetIntegral()
>
> this just hangs right here, whereas is 1.03.09, i get
>
> 0% root
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 1.03/09 16 December 1997 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
> CINT/ROOT C/C++ Interpreter version 5.13.36, Nov 30 1997
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] h=new TH1F("h","h",100,0,100)
> (class TH1F*)0x0
> root [1] h->Fill(10)
> root [2] h->Fill(20)
> root [3] h->Fill(30)
> root [4] h->GetIntegral()
> (Stat_t)3.000000000000e+00
> root [5]
>
> as expected.
>
> I also notice that when i try to look at a histogram in a .root file
> that was created with v2.0 using v1.03/09, i get
>
> root [3] SingleRecoils3.Draw()
> Fatal in <operator new>: storage exhausted
> aborting
> Abort
>
> Thanks in advance for any help.
>
> Steve Eichblatt
> eichblatt@fnal.gov
> (630)840-4006