ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
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/tree/cernbuild.C`
6
///
7
/// \macro_image
8
/// \macro_code
9
///
10
/// \author Rene Brun
11
12
void
staff
() {
13
auto
f
=
TFile::Open
(
"cernstaff.root"
);
14
TTree
*
T
=
nullptr
;
15
f
->GetObject(
"T"
,T);
16
T
->Draw(
"Grade:Age:Cost:Division:Nation"
,
""
,
"gl5d"
);
17
if
(
gPad
)
gPad
->Print(
"staff.C.png"
);
18
}
f
#define f(i)
Definition
RSha256.hxx:104
gPad
#define gPad
Definition
TVirtualPad.h:287
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:3997
TTree
A TTree represents a columnar dataset.
Definition
TTree.h:79
ROOT::Math::Chebyshev::T
double T(double x)
Definition
ChebyshevPol.h:34
staff
Definition
staff.py:1
tutorials
tree
staff.C
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:07:00 (GVA Time) using Doxygen 1.9.8