ROOT
git-r3/HEAD
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_code
8
///
9
/// \author Rene Brun
10
11
void
tree502_staff()
12
{
13
auto
f
=
TFile::Open
(
"cernstaff.root"
);
14
auto
T =
f
->Get<
TTree
>(
"T"
);
15
T->
Draw
(
"Grade:Age:Cost:Division:Nation"
,
""
,
"gl5d"
);
16
if
(
gPad
)
17
gPad
->Print(
"staff.C.png"
);
18
}
f
#define f(i)
Definition
RSha256.hxx:104
gPad
#define gPad
Definition
TVirtualPad.h:322
TFile::Open
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:3787
TTree
A TTree represents a columnar dataset.
Definition
TTree.h:89
TTree::Draw
void Draw(Option_t *opt) override
Default Draw method for all objects.
Definition
TTree.h:478
tutorials
io
tree
tree502_staff.C
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1