CINT can't resolve variable types?

I’m trying to use the following function:

void SetUpFit(TGraphErrors * graph){ TGraphErrors * searchOutput = dynamic_cast<TGraphErrors*>(graph->Clone()); TransGraph(graph, "y/x"); TSpectrum * spectrum = new TSpectrum(4, 2); Int_t numPeaks = spectrum->SearchHighRes(graph->GetY(), searchOutput->GetY(), graph->GetN(), 0.1, 0.01, 1, 3,1,3); TCanvas * fitcanv = new TCanvas("canv", "canv", 800,800); fitcanv->SetLogx(); fitcanv->SetLogy(); graph->Draw("APEZ"); searchOutput->Draw("L same"); std::cout << numPeaks << " peaks found." << std::endl; }

as an interpreted function loaded into CINT with:

for some reason CINT won’t process the call to TSpectrum::SearchHighRes, and gives the following error:

[quote]Error: Can’t call TSpectrum::SearchHighRes(graph->GetY(),searchOutput->GetY(),graph->GetN(),0.1,0.01,1,3,1,3) in current scope FitPDS.C:17:
Possible candidates are…
(in TSpectrum)
/Applications/root/root/lib/ -1:-1 0 public: Int_t TSpectrum::SearchHighRes(float* source,float* destVector,Int_t ssize,float sigma,Double_t threshold,bool backgroundRemove,Int_t deconIterations,bool markov,Int_t averWindow);
*** Interpreter error recovered ***[/quote]

As far as I can see, the arguments passed to SearchHighRes() match the function signature, and explicitly casting all the variables with dynamic_cast doesn’t work either. This has happened before with other functions, and sometimes moving the call to earlier in the interpreted function makes it work miraculously. In this case however I can’t move it any earlier. Is this normal behaviour for CINT and is there a way around it or do I have to compile the function?

More than likely I’ve made a silly mistake. All help appreciated!




graph->GetY() return a double* which can not be converted to a float*. (I.e. both CINT and the compiler will complain).


Told you it would be something silly!