Root TSpectrum2 Peak Finding Macro Error

I am trying to make a simple program to plot a random 2D gaussian, find the peak, and make a fit. I am attaching my code, which I am running on SL5 CMSSW_5_3_16 root version 5.13. However, when it gets to line 60 it returns the error:

Error: Can’t call TSpectrum2::Search(h1,2,“col”) in current scope Owen2DFitExampleFunc.C:59:
Possible candidates are…
(in TSpectrum2)
/cvmfs/ -1:-1 0 public: virtual Int_t TSpectrum2::Search(const TH1* hist,Double_t sigma=2,Option_t* option="",Double_t threshold=0.05);
*** Interpreter error recovered ***[/quote]

It seems to me that this means there is a problem with one of the arguments, but I am not sure what. I am probably doing something very simple wrong, but I’ve looked through the documentation and compared with the tutorial for TSpectrum2 and can’t figure out what it is. I would greatly appreciate it if someone could take a look.

Owen Baron
Owen2DFitExampleFunc.C (2.17 KB)

int nfound = s->Search(&h1, 2, “col”);

Of course - thank you very much!