Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
tree502_staff.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_tree
3/// \notebook -nodraw
4/// Create a plot of the data in `cernstaff.root`
5/// To create `cernstaff.root`, execute tutorial `$ROOTSYS/tutorials/io/tree/tree500_cernbuild.C`
6///
7/// \macro_image
8/// \macro_code
9///
10/// \author Rene Brun
11
12void tree502_staff()
13{
14 auto f = TFile::Open("cernstaff.root");
15 auto T = f->Get<TTree>("T");
16 T->Draw("Grade:Age:Cost:Division:Nation", "", "gl5d");
17 if (gPad)
18 gPad->Print("staff.C.png");
19}
#define f(i)
Definition RSha256.hxx:104
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define gPad
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4131
A TTree represents a columnar dataset.
Definition TTree.h:84
void Draw(Option_t *opt) override
Default Draw method for all objects.
Definition TTree.h:446