Loading and re-loading files

Chris Jillings (chris@loon.phy.queensu.ca)
Wed, 4 Feb 1998 08:50:36 -0500 (EST)


Hi,
I am running Root 1.03/07 19 November 1997 on Linux.
The problem I have occurs when I try to work with a user-defined
function. I type the following...

.L cjjFit.C
TF1* cjjFit = new TF1("cjjFit",cjjFit,-1,1,4);
cjjFit->SetParameters(0,1,1,1);
cjjFit->Draw();

This works. I then decide to edit cjjFit.C to change the function.
But when I type

delete cjjFit;
.U cjjFit.C

I get a message saying
Error: G__unloadfile() File "cjjFit.C" not loaded FILE: LINE:0

I now edit the file and save it. Then I type

.L cjjFit.C
TF1* cjjFit = new TF1("cjjFit",cjjFit,-1,1,4);
cjjFit->SetParameters(0,1,1,1);
cjjFit->Draw();

The draw fails. The function is simply a line at y=0. Note this occurs
even if I do not edit the file.

Any ideas? Thanks,

Chris

=================================================================
= =
= Chris Jillings =
= Department of Physics phone/voice mail: (613) 545-6000x4805 =
= Queen's University fax: (613) 545-6813 =
= Kingston, Ontario email: chris@mips2.phy.queensu.ca =
= Canada, K7L 3N6 web: http://snodaq.phy.queensu.ca =
= =
=================================================================