Re: [ROOT] nt/fill

From: Benjamin E. Norman (bnorman@kent.edu)
Date: Thu Nov 23 2000 - 02:34:16 MET


You can create your histogram as below, then "redirect" the tree's Draw
method to your histogram:

TH1F myhist("myhist","myhist",-3,13,16);
tree->Draw("x>>myhist");

This will fill the histogram named "myhist", or create it automatically.
Since you have created this histogram ahead of time and set the axis
characteristics, you should get the desired result.

----- Original Message -----
From: "Stephen Adler" <adler@bnl.gov>
>
> TH1F myhist("myhist","myhist",-3,13,16);
>
> and then get the tree->Draw() command to fill myhist.
>
> Can I do this without resorting to tree->MakeClass(); ?
>
> Cheers. Steve.



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET