Re: HRNDM

Rene Brun (Rene.Brun@cern.ch)
Wed, 10 Jun 1998 16:57:17 +0200


GENTIT wrote:
>
> It seams that there is no equivalent in root of the hbook function
> HRNDM. Am I wrong ?
>
> Francois-Xavier Gentit
> CEA DAPNIA/SPP
> tel 01 69 08 30 38

Yes, there is an equivalent and much better.
If you look in the TH1 class, you will see two functions:
void FillRandom(char *fname, Int_t ntimes=5000);
void FillRandom(TH1 *h, Int_t ntimes=5000);

The first function fills an histogram following a distribution
in a TF1 function with name fname.
The second function fills an histogram following the distribution
of another histogram h.

See the doc of TH1 for more details

Rene Brun