Define a combined function of two functions

Hello,
I am trying to combine two functions to get like:

fun = fun1 * fun2

Attached is a simple example. Inside, I defined fun1 and fun2, and define fun = fun1 * fun2. However, the funny thing is if I set a title of fun1/fun2, I will be returned error like:

Error in TFormula::Compile: Bad numerical expression : “TitleHere”
Error in TF1::TF1: function: gaus_erf/fgaus*erf has 0 parameters instead of 1

Please look into the attached code, if just commenting the line

fgaus->SetTitle(“I am not working”);

we won’t have the error above. This is a potential bug?

Thanks,
Zhiyi.
test_fun.C (450 Bytes)

You cannot call TF1::SetTitle. TF1 being a TNamed, the fTitle is used
to store the function definition.

Rene