RE: [ROOT] How to know whether a histogram has ZERO entries?

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jul 17 2002 - 17:14:15 MEST


Hi Jyothsna,

For Trees you should look into using the TTree::Scan method or, for advanced
case only use the TTreeFormula class.

Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Jyothsna Rani
Sent: Tuesday, July 16, 2002 10:15 AM
To: Rene Brun
Cc: roottalk@pcroot.cern.ch
Subject: Re: [ROOT] How to know whether a histogram has ZERO entries?



On Tue, 16 Jul 2002, Rene Brun wrote:

> The recipee that I gave to you works for Trees. Did you try?
> If one element in the directory is a Tree,

Your recipee works fine for Histograms. Not for trees!!!

> TTree::Print is called, showing the number of entries per branch.
> By definition all leaves in one branch have the same number
> of entries

Nope. The number of entries for each leaf is different in a single branch.
For example, in a branch there is one leaf(variable) which stores the
number of vertices(say, nvtx). The other leafs can be x, y and z
co-ordinates of the vertices which are arrays of dimension nvtx,ie,
x[nvtx],y[nvtx],z[nvtx].

So the number of entries for each of these x,y and z are different from
that of nvtx.

Thanks,
Jyothsna



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:00 MET