Similar to http://root.cern.ch/phpBB2/viewtopic.php?t=7212, I have a problem where I get the error
However, this is the only error I get.
The offending function is in a class implementation file, which is as follows
double max = 10.0*this->lifetime;
TF1 *fdecay = new TF1("decay","exp(-1.0*x/)",0.0,max,1);
time = fdecay->GetRandom();
time = time*(1/(6.582E-25));
It’s not the most difficult code, and it compiles outside of the class, so I am unsure why the function breaks when instanstiated inside a class.
your signature for creating the TF1 is not correct, when you use a formula string you don;t have to pass the parameters and you must just do:
TF1 *fdecay = new TF1("decay","exp(-1.0*x/)",0.0,max);