to fill a 2d histogram with constants use h2->Fill(0.1,0.1,1.) where
1. is the weight. This is needed otherwise the right method is not found
(choice between Fill(Axis_t,Stat_t) or Fill(Axis_t,Axis_t)).
If x and y are of type Axis_t (i.e. float) then Fill(x,y) works fine.
Cheers, Fons.
>
> > You are using STAR_LEVEL : dev and ROOT_LEVEL : 2.22.06
> > root4star [0] TH2F testH("test","Test",100,0,1,100,0,1)
> > root4star [1] testH.Fill(0.1,0.1)
> > Error: TH2F::Fill is private or protected FILE:/var/tmp/caa0MzEe7_cint
> > LINE:1
> > (unknown)12
> > *** Interpreter error recovered ***
>
> I added two commands to yours and elicited a crash:
>
> root> TH2F testH("test","Test",100,0,1,100,0,1)
> root> testH.Fill(0.1,0.1)
> ...
> root> TH2F testH999("test","Test",100,0,1,100,0,1)
> root> testH999.Fill(0.1,0.1)
> Error: TH2F::Fill is private or protected FILE:/tmp/29451eaa_cint LINE:1
> *** Break *** segmentation violation
> ------------------------------------------
>
> ---------------------------------------------------------------------
> Jeffrey G Reid | jgreid@u.washington.edu | UW Nuclear Physics Lab
> =====================================================================
>
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910