Compiling with 5.25.02, TH2

Dear Rooters,
I am trying to compile my app with 5.25.02 (g++ (Ubuntu 4.3.3-5ubuntu4))
which works with 5.24.00.
Now I get:

hpr/src/FitHist.cxx:880: error: no matching function for call to ‘TH1::Integral(Int_t&, Int_t&, Int_t&, Int_t&)’
/scratch/bizet/cernlib/root_v5.25.02/include/TH1.h:276: note: candidates are: virtual Double_t TH1::Integral(const Option_t*) const
/scratch/bizet/cernlib/root_v5.25.02/include/TH1.h:277: note:                 virtual Double_t TH1::Integral(Int_t, Int_t, const Option_t*) const

Yes I do #include “TH2.h” for sure.

In TH2.h I see now:

   using TH1::Integral;
   virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Option_t *option="") const;

Cheers
Otto

Hi,

Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Option_t *option="") is now a function for TH2. It does not make sense for a 1D histogram. If you are having a TH1 pointer, just do :

 ( (TH2 *) histo)->Integral (x1,x2,y1,y2); 

Best Regards

Lorenzo

Hi Lorenzo,
thank you, that helps
Otto