ROOT
Version v6.30
master
v6.34
v6.32
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
spider.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_tree
3
/// \notebook
4
/// TSpider example.
5
///
6
/// \macro_code
7
///
8
/// \author Bastien Dallapiazza
9
10
#include "
TFile.h
"
11
#include "
TCanvas.h
"
12
#include "
TNtuple.h
"
13
#include "
TSpider.h
"
14
15
void
spider() {
16
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"TSpider example"
,200,10,700,700);
17
TFile
*
f
=
new
TFile
(
"hsimple.root"
);
18
if
(!
f
||
f
->IsZombie()) {
19
printf(
"Please run <ROOT location>/tutorials/hsimple.C before."
);
20
return
;
21
}
22
TNtuple
* ntuple = (
TNtuple
*)
f
->Get(
"ntuple"
);
23
TString
varexp =
"px:py:pz:random:sin(px):log(px/py):log(pz)"
;
24
TString
selection =
"px>0 && py>0 && pz>0"
;
25
TString
options =
"average"
;
26
TSpider
*spider =
new
TSpider
(ntuple,varexp.
Data
(),selection.
Data
(),options.
Data
());
27
spider->
Draw
();
28
c1
->ToggleEditor();
29
c1
->Selected(
c1
,spider,1);
30
}
f
#define f(i)
Definition
RSha256.hxx:104
TCanvas.h
TFile.h
TNtuple.h
TSpider.h
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TFile
A ROOT file is composed of a header, followed by consecutive data records (TKey instances) with a wel...
Definition
TFile.h:53
TNtuple
A simple TTree restricted to a list of float variables only.
Definition
TNtuple.h:28
TSpider
Spider class.
Definition
TSpider.h:40
TSpider::Draw
void Draw(Option_t *options="") override
Draw the spider.
Definition
TSpider.cxx:454
TString
Basic string class.
Definition
TString.h:139
TString::Data
const char * Data() const
Definition
TString.h:380
c1
return c1
Definition
legend1.C:41
tutorials
tree
spider.C
ROOT v6-30 - Reference Guide Generated on Thu Dec 12 2024 06:12:41 (GVA Time) using Doxygen 1.9.8