Re: TH1::SetBin(...)

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Aug 19 1998 - 09:52:43 MEST


Wouter Hulsbergen wrote:
> 
> Dear developers,
> 
> In TH1 there exist a SetBin(...) functions with which one can nicely
> change the number of bins in an existing histogram. However, as no attempt
> is made to extend the array which carries the bincontents, this
> obviously leads to segmentation violations if the new number of bins is
> greater than the old number. I think the SetBin function must be overruled
> in TH1F (and TH1S and ...)
> 

Wouter,
The TH1::SetBins function has the user interface to change
the number of bins and the histogram limits.
This function is currently used in TTree::Draw, for example,
to redefine the histogram limits.
Changing the number of bins is not implemented. I agree that this
should be protected and can only be implemented in redefining the
function in the derived classes TH1F,etc.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET