Error in <TFormula::Compile>: Bad numerical expression : "CSpectrum::Subspec(x,[0],[1])" Error in <TF1::TF1>: function: f1/CSpectrum::Subspec(x,[0],[1]) has 0 parameters instead of

ROOT 5.34
gcc version 4.9.2 (Debian 4.9.2-10)

I wrote a function Subspec() and try to use it to draw a picture. However , I am confused with the error below.
<Error in TFormula::Compile: Bad numerical expression : “CSpectrum::Subspec(x,[0],[1])”>
And my program is like this:
spc.C (1.8 KB)


First, could you post code instead of a screenshot? Then maybe @moneta could take a look at it…

Cheers, Bertrand.

Thanks!Already changed it.:sweat_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.