Re: [ROOT] bug in TH1::Scale + ...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jul 09 2003 - 09:33:21 MEST


Hi Colin,

Thanks for sending the file. I have found the problem.
Your histogram was very likely generated via TTree::Draw and had still
the automatic rebinning bit set (TH1::kCanRebin).
The TH1 functions Add, Divide, Multiply, Scale process the overflow bin.
When calling TH1::SetBinContent on the overflow bin, the axis limits
were automatically recomputed.

I have fixed the problem in CVS. Thanks for reporting this problem.

Concerning the SetTitle, I meant the ROOT CVS head, not your CVS version.

Rene Brun

Colin Bernet wrote:
> 
> Hi Rene,
> 
> with :
> setenv ROOTSYS /afs/cern.ch/compass/delivery/tools/root-cvs/root
> 
> I don't have the SetTitle in the menu, and TH1::Scale does not work
> properly.
> 
> You can take the histogram in ~cbernet/public/test.root to test it.
> 
> cheers,
> Colin
> 
> On Tue, 8 Jul 2003, Rene Brun wrote:
> 
> > Hi Colin,
> >
> > Colin Bernet wrote:
> > >
> > > Hi all,
> > >
> > > I'm using the cvs version of root on lxplus (updated today), and I noticed something
> > > strange with TH1::Scale : when doing h->Scale(scalefactor), the number of xbins is
> > > mutliplied by 2, and the x range increases (whatever is chosen for
> > > scalefactor). besides this the behaviour of the function is normal.
> >
> >
> > I cannot reproduce this problem. Could you send a script showing the problem?
> >
> > >
> > > Btw I miss a lot a feature from the previous versions : being able to
> > > set the title of an histogram by right-clicking on it on the canvas.
> > > TH1::SetTitle has disappeared from the menu. Is there another way to do
> > > that ?
> >
> > If you use the CVS head, you can use the SetTitle item in the histogram
> > pop-up menu
> >
> > Rene Brun
> >
> > >
> > > Of course I could use a release, but if I remember correctly the last one
> > > has no tab completion on filenames, which is a feature I definitely want
> > > to have.
> > >
> > > Despite these few things, thanks a lot for everything !
> > >
> > > cheers,
> > > Colin
> >



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