ROOT
6.10/00
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tutorials
tree
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
}
ROOT::Math::Chebyshev::T
double T(double x)
Definition:
ChebyshevPol.h:34
TFile::Open
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Definition:
TFile.cxx:3909
f
double f(double x)
Definition:
testIntegration.cxx:12
TTree::Draw
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition:
TTree.h:355
gPad
#define gPad
Definition:
TVirtualPad.h:284
TTree
A TTree object has a header with a name and a title.
Definition:
TTree.h:78