The declaration of a TRandom instance as “rand” causes redefinition error when running interactively:
TCanvas *c1 = new TCanvas("c1","Candle Decay",800,600);
TRandom *rand = new TRandom();
This also causes the notebook (ROOTBook) to fail in the examples shown here
rand is definitely already defined, it’s the usual C random number generator function,
and it’s always in scope in the ROOT prompt (same as
cos and many others).
You will have to choose a more descriptive name for your variable, but this is not necessary a bad thing
Yup. Then we should definitely have a more descriptive name of the TRandom object in
$ROOTSYS/tutorials/hist/ as it causes the ROOTbook to fail as I pointed out before.
This is now ROOT-9030, you can follow up there
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.