You must do the following Int_t nentries = tree->GetEntries(); tree->SetEstimate(nentries); One statement should normally work. I have reported the problem to Masa. Rene Brun On Fri, 30 Apr 1999, Stephen Markacs wrote: > > Fons, > > I went to this page and tried t->SetEstimate(t->GetEntries()) and it won't > let me call GetEntries in the argument: > > nevis1:emcal/calib> root -l > ******************************************* > * * > * W E L C O M E to R O O T * > * * > * Version 2.20/06 17 December 1998 * > * * > * You are welcome to visit our Web site * > * http://root.cern.ch * > * * > ******************************************* > > CINT/ROOT C/C++ Interpreter version 5.13.83, Dec 2 1998 > Type ? for help. Commands must be C++ statements. > Enclose multiple statements between { }. > root [0] f = new TFile("emcBeam.root") > (class TFile*)0x0 > root [1] f->ls() > TFile** emcBeam.root > TFile* emcBeam.root > KEY: TTree t;1 test beam data for timing studies > root [2] t->SetEstimate(t->GetEntries()) > Error: No symbol t->GetEntries() in current scope FILE:/var/tmp/daaa006P_ > LINE:1 > *** Interpreter error recovered *** > root [3] int N = t->GetEntries() > root [4] t->SetEstimate(N) > root [5] .q > > Is this something wierd that has been fixed in the newer versions of root? > > > > Hi Seng, > > > > your question is answered here: > > > > http://root.cern.ch/root/roottalk/roottalk99/0566.html > > > > Cheers, Fons. > > > > > > > > Woon-Seng Choong wrote: > > > > > > Hi, > > > I encountered a peculiar problem when using TTree::Draw. I have a tree > > > which has a variable, say var, which range from 2172 to 2179. There are > > > about 10 million events. I used the following command to plot the var: > > > > > > root [1] tree->Draw("var") > > > > > > What I got was a plot which range from 2171 to 2173 and has an overflow > > > over 8 million events. Why didn't it draw the whole range? > > > I am using ROOT v2.21/08. > > > > > > Seng > > > > -- > > 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 > > > > > S t e p h e n M a r k a c s > stephen@phys.columbia.edu > http://phys.columbia.edu/~stephen/ >
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET