Hi Aron, ROOT has a very nice manual and you'll find the answer to your question (as well as to many others) in there. See http://root.cern.ch. In words, you need to fill a histogram and then to ask a histogram for its mean etc. -best, Pasha On Wed, 13 Mar 2002 13:19:55 -0800 "Aron, Navneet" <navneet@SLAC.stanford.edu> wrote: > > Hi, > Can any one tell me how do we get the mean , rms values of the various ntuple variables in the root file. > My try is as follows: > > { > gROOT->Reset(); > TFile *r = new TFile("g1onaxis.root"); > TTree *tree = (TTree*)r->Get("TKR_Hits_In_Lyr_0"); > Float_t mean = tree->GetMean(); > } >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET