Why is it "not defined in current scope"?

I’ve written a function which draws the convolution of 2 histograms, (attached). The function takes in the names of 2 histograms as its arguement:

Convolution(“name”, “title”, hist_1, hist_2);

Last week this function worked perfectly, drawing the convolution every time.
This week, however, it won’t work. It returns the message:

Error: Symbol hist_2 is not defined in current scope FILE:(tmpfile) LINE:1
*** Interpreter error recovered ***

The problem is that, as far as I can see, hist_2 is defined. I’m able to draw it and use other functions on it.
I don’t understand why hist_2 is now always out of scope as far as my function is concerned.
Any ideas?
I’m using version 4.01/02 and I’ve attached my function.
Thanks, Kim
ConvolutionFn.C (4.04 KB)

The problem is not in your function Convolution, but in the way you call it.
Just in case you have a file f with 2 histograms named “hist_1” and “hist_2”,

TH1 *hist_1 = (TH1*)f.Get("hist_1"); TH1 *hist_2 = (TH1*)f.Get("hist_2"); Convolution("name","title",hist_1,hist_2);