Re: [ROOT] TH1F::Add problem? in 3.05/04

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 10 2003 - 09:18:57 MEST


Hi Muge,

This problem has been fixed in the CVS version.

Rene Brun

Muge Karagoz Unel wrote:
> 
> Dear All,
> 
> I have this  problem in root 3.05/04. When I add two histograms
> the number of entries is not reported correctly. There is always an
> extra 81 added to the actual sum!! (See the example below)
> However, when the Event Status is displayed, the Sum is correctly
> reported.
> Also the problem goes away when the histograms are added one by one.
> ( root [25] a->Add(t_x1); )
> 
> This problem did not exist in 3.03/07.
> 
> Any insight would be appreciated.
> Thank you!
> Muge
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> root [41] q1=t_x1->GetEntries();
> Warning: Automatic variable q1 is allocated FILE:(tmpfile) LINE:1
> root [42] q1
> (double)7.80000000000000000e+01
> root [43] q2=t_x2->GetEntries();
> Warning: Automatic variable q2 is allocated FILE:(tmpfile) LINE:1
> root [44] q2
> (double)2.96000000000000000e+02
> root [45] a->Reset();
> root [46] a->Add(t_x1,t_x2);
> root [47] q3=a->GetEntries();
> Warning: Automatic variable q3 is allocated FILE:(tmpfile) LINE:1
> root [48] q3
> (double)4.55000000000000000e+02
> 
> q1+q2=374
> 374+81=q3=455 (!!!???)
> 
> **********************************************************
> Muge Karagoz UNEL
> Dept. of Phys & Astro                    karagozm@nwu.edu
> Northwestern Univ                        847 491 2811 NWU
> Evanston, IL 60208                       630 840 3054 FNL
> **********************************************************
> "So let us then try to climb the mountain, not by stepping
> on what is below us, but pulling us up at what is above us,
> for my part at the stars"                      M.C. ESCHER



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET