root cheat sheet

Pasha Murat (murat@cdfsga.fnal.gov)
Fri, 10 Apr 1998 01:02:15 -0500 (CDT)


Steve Beach writes:
> I'm a (very) new user of root, and as an aid to learning, I'm putting
> together a 'root cheat sheet', a list of questions and answers about
> using root. Pretty basic questions, the things a new user would want to
> know. A preliminary copy is available at my home page (see below).
>
> I have a lot of questions, but right now, I'd appreciate some help on
> two basic ones:

Steve,

let me encourage you (and also all new users) to read ROOT howto's
(see http://root.cern.ch), you could find alot of answers there.
>
> 1: I've converted over a PAW hbook ntuple to a root tree. Now, how do
> I use that tree? I'd like to do histograms on it, but
> tree->Draw("event"); doesn't work, even though the variable "event"
> exists. Is there anything I'm missing?

See http://root.cern.ch/root/HowtoConvert.html
>
> 2: Is there a way to find out what variables are in an ntuple? (Could
> be very handy for transferring files!) PAW++ has such a feature.
>

provided `nt' is a pointer to your TTree (ntuple)

nt->Print()

does what you are asking for. You could also use ROOT browser
for this (see ROOT tutorials and .html above for more details)

Regards, Pasha.