Re: what has happened to TH2F::Fill

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Dec 17 1997 - 14:44:07 MET


Wouter Hulsbergen wrote:

> Dear root,
> Since this morning I have the following error when compiling:
>
> CC -O -w +a1 +Z -I/hp/lerad/disc3/s37/root/include -c
> ReconstructionAnalysisProgram3.C
> CC: "ReconstructionAnalysisProgram3.C", line 206: error: int main(int ,
> char **) cannot access void TH2F::Fill(Axis_t, Stat_t): private member
> (1655)
> CC: "ReconstructionAnalysisProgram3.C", line 207: error: int main(int ,
> char **) cannot access void TH2F::Fill(Axis_t, Stat_t): private member
> (1655)
> gmake: *** [ReconstructionAnalysisProgram3.o] Error 1
>
> This is new. What has happened to TH2F ?
>
> Wouter

  In the cleanup exercise for 1.03/09 we introduced a protection in
TH1,TH2 ,TH3 classes
 TH1F::Fill(Axis_t,Stat_t) is for 1-d histograms
 TH2F::Fill(Axis_t,Axis_t) is for 2-d histograms
  TH2F::Fill(Axis_t,Axis_t,Stat_t)  ""

  TH3F::Fill(Axis_t,Axis_t,Axis_t,Stat_t) is for 3-d histograms.

We have included a private function TH2F::Fill(Axis_t,Stat_t)  to prevent
calling the function
filling a 1-d histogram without you noticing the problem.
You should change your call from Fill(Axis_t,Stat_t) to
Fill(Axis_t,Axis_t)

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:23 MET