Re: ntuple->Draw()

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Fri, 8 Jul 2005 16:25:45 +0200 (MEST)


Hi Nicolas,

See documentation of TTree::Draw
http://root.cern.ch/root/htmldoc/TTreePlayer.html#TTreePlayer:DrawSelect

   Entry$: A TTree::Draw formula can use the special variable Entry$    to access the entry number being read. For example to draw every    other entry use:
     tree.Draw("myvar","Entry$%2==0");

   Entry$ : return the current entry number (== TTree::GetReadEntry())    Entries$ : return the total number of entries (== TTree::GetEntries())

   Length$ : return the total number of element of this formula for this

                      entry (==TTreeFormula::GetNdata())    Iteration$: return the current iteration over this formula for this

                  entry (i.e. varies from 0 to Length$).


Rene Brun

On
Fri, 8 Jul 2005, PRODUIT Nicolas wrote:

> Hi,
>
> I want to plot a variable in a ntuple versus its
> entry number.
> Is there an easy way to do that on the command line?
>
> nt->Draw("x:??entry??")
> where ??entry?? return me the sequence number in the ntuple
>
>
>
> Thanks
>
>
Received on Fri Jul 08 2005 - 16:25:49 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET