Re: fixed bin width

From: John <idarraga_at_cern.ch>
Date: Tue, 8 Jul 2008 10:30:12 -0400


I don't think you want to hack TH1F::Fill(...) .... You can organize your data before you call the TH1F constructor and I would say that it is not Fill()'s business to do so.

regards,

John Idarraga
UMontreal

Adrian Sevcenco wrote:

> John wrote:

>> OK, get it ... what I have done in the past is to maintain the values
>> that I am going to use to fill my histogram in a data structure (a
>> simple array for example). Then I figure my limits and proper binning.
>> It is only at the very end that I define the histogram and procced to
>> fill it up from the array. I don't know if you like this idea. If you
>> need an example let me know.
>>
>> Did you noticed that TH1F::Fill(Double_t x) returns -1 when you enter a
>> value out of range ? That helps you out detecting when you are filling
>> out of the defined range.
> Yeah, i just seen this :) that would help me to hack an personal version
> of Fill .. but its already too much trouble, more than using a tree.
> Thanks,
> Best regards,
> Adrian
> 

>> cheers,
>>
>> John Idarraga
>> UMontreal

> Received on Tue Jul 08 2008 - 16:36:39 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 08 2008 - 17:50:02 CEST