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

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jul 16 2002 - 08:19:26 MEST


You can do
root > gDirectory->Print(); //will print one line for each object in
                            //the current directory in memory

To print the same for objects in a file, do:
root > TFile f("myfile.root")
root > f.ReadAll();
root > f.Print();

Rene Brun

On Mon, 15 Jul 2002, Jyothsna Rani wrote:

> 
> Would like to get the output inside root session?
> 
> Something like this:
> 
> root[]jet*->GetEntries();
>       jet1   100
>       jet2   300
> 	........
>       jet10  0
> 
> Yep..each histogram has different number of entries.
> 
> This option would help in determining the histograms/ntuple variables with
> zero entries. 
> 
> Thanks in advance,
> Jyothsna
> 
> On Mon, 15 Jul 2002, Rene Brun wrote:
> 
> > Could you precise your question?  Where do you want to get the output?
> > in an array? I assume that your histograms have each a different
> > number of entries.
> > 
> > Rene Brun
> > 
> > On Sun, 14 Jul 2002, Jyothsna Rani wrote:
> > 
> > > 
> > > I would like to know whether I can get the entries for all the histograms
> > > with only ONE command.
> > > 
> > > Let jet1, jet2 .....jet10 be 10 histograms.
> > > Is it possible to get the entries for all of them with only one command,
> > > viz, jet*->GetEntries() (using some wild card)???
> > > 
> > > Thanks,
> > > Jyothsna
> > > 
> 



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