Re: TMath

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 11 Jan 2005 17:11:30 +0100


Hi Federico,

All TMath functions are static functions. You should not create a TMath object to call these functions. You can directly call   TMath::Prob(xx);
or with version 4.0 or newer, do
  using namespace TMath;
  Prob(xx);

Rene Brun

Federico Roncarolo wrote:
>
> Hello,
>
> I just upgraded my linux to SLC3 and installed the proper ROOT version. I've a problem compiling a code which was previously working fine and don't understand the error message:
>
> TAnal.h: In member function `void TAnal::GoFitTresh()':
> TAnal.h:1897: use of namespace `TMath' as expression
> TAnal.h:1897: `mat' undeclared (first use this function)
> TAnal.h:1897: (Each undeclared identifier is reported only once for each
> function it appears in.)
> TAnal.h:1897: syntax error before `)' token
>
> In the code I just have:
>
> TMath *mat=new TMath();
> conf=mat->Prob(chisquare_tresh*ndf_tresh,(Int_t)(ndf_tresh)-1);
>
> the error is on the first line, at the declaration.
> TMath.h is of course included.
>
> Any help?
>
> Thanks a lot,
> Federico
Received on Tue Jan 11 2005 - 17:10:35 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET