Add legend in roofit

Sorry, I know. I do not have roofit installed in my ROOT…
I think the answer of you problem is here:

Try to fine the name of the real object as I did in that example.