Hi all, When checking the source code of the TF1 class, I found that there is a small difference between the constructor for a function which uses compiled code and the other constructors. The difference is that in the general case, if a fuction with the same name as the function to be constructed already exists, it is deleted and replaced by the new one. This is not done for functions which use a compiled function. Moreover, the reference in in the gROOT->GetListOfFunctions() is also not renewed in this case. Of course, one should take care not to construct a function with the same name twice, but if one does, I think the 'normal' behaviour is more convenient than the behaviour with a compiled funcion. Why does this difference exist?? Actually, I have made a class which derived from TF1 and overloaded the Eval() and EvalPar() methods, in oredr to be able to use a fitfunction, which a programmed myself. This is especially convenient since this function needs input from a certain histogram, which serves as a range of fixed parmeters. This seems to work fine, although, of course, if such a function is attached to a histogram after fitting, it doesn't work anymore, because it will be copied to a TF1... However, this possibility has never been suggested in earlier discussion about the use of user functions in a TF1 (notably also about using object member functions). Is anyone aware of any additional (or 'hidden') problem to be expected with this implementation?? Kind regards, Marco van Leeuwen.
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:29 MET