Hi Rene, the problem is well reproducable here at DESY, on my account I am using: * Version 3.01/06 13 September 2001 * FreeType Engine v1.x used to render TrueType fonts. CINT/ROOT C/C++ Interpreter version 5.15.06, June 30 2001 and on a different account someone ran * Version 2.23/10 17 December 1999 * CINT/ROOT C/C++ Interpreter version 5.14.25, Nov 25 1999 giving the same result! Maybe you run a different version or there is a problem with the installation here at DESY. Pershap others at DESY could try this out. Cheers, Birger On Wed, 17 Apr 2002, Rene Brun wrote: > Hi Birger, > > I am sorry, but I cannot reproduce your problem. Here is my session > as you suggest: > > root [0] .L testit.C > root [1] testit() > root [2] float sum=0. > root [3] float s=0. > root [4] for(int ll=1; ll<101; ll++){s=h02->GetBinContent(ll);sum=sum+s;}; > root [5] sum > (float)1.00000095367431641e+00 > root [6] sum=0. > (const double)0.00000000000000000e+00 > root [7] for(int ll=1; ll<101; ll++){sum+=h02->GetBinContent(ll);}; > root [8] sum > (float)1.00000095367431641e+00 > > Rene Brun > > Birger Koblitz wrote: > > > > Hi, > > > > use the following script: > > test.C: > > // Test of CINT > > { > > testit(){ > > float sum; > > > > TH1F *h=new TH1F("h02","H02",100,0,1); > > for (int i=1;i<101;i++) h->SetBinContent(i,sin(i)); > > h->Scale(1./h->Integral()); > > } > > } > > > > Then start root and type: > > .L test.C > > testit() > > float sum=0. > > float s=0. > > for(int ll=1; ll<101; ll++){s=h02->GetBinContent(ll);sum=sum+s;}; > > sum > > (gives 1.0) > > sum=0. > > for(int ll=1; ll<101; ll++){sum+=h02->GetBinContent(ll);}; > > (seems to crash now!) > > > > Cheers, > > Birger > > > > On Wed, 17 Apr 2002, Rene Brun wrote: > > > > > Hi Birger, > > > > > > I cannot reproduce this problem. Could you send me a script > > > that i could use to investigate? > > > > > > Rene Brun > > > > ------------------------------------------------------------ > > Birger Koblitz koblitz@mail.desy.de ("-/")_.-'"-._ > > MPI für Physik . . ; -._ )-;-,_) > > c/o DESY-FH1 Tel. (40) 8998-3971 (v_,)' _ )-.\ -' > > Notkestr. 85 _.- _..-_/ / ((.' > > D-22603 HAMBURG ((,.-' ((,/ > ------------------------------------------------------------ Birger Koblitz koblitz@mail.desy.de ("-/")_.-'"-._ MPI für Physik . . ; -._ )-;-,_) c/o DESY-FH1 Tel. (40) 8998-3971 (v_,)' _ )-.\ -' Notkestr. 85 _.- _..-_/ / ((.' D-22603 HAMBURG ((,.-' ((,/
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET