ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
df021_createTGraph.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_dataframe
3
/// \notebook -draw
4
/// Fill a TGraph using RDataFrame.
5
///
6
/// \macro_code
7
/// \macro_image
8
///
9
/// \date July 2018
10
/// \authors Enrico Guiraud, Danilo Piparo (CERN), Massimo Tumolo (Politecnico di Torino)
11
12
13
14
void
df021_createTGraph
()
15
{
16
ROOT::EnableImplicitMT
(2);
17
18
ROOT::RDataFrame
d
(160);
19
20
// Create a trivial parabola
21
auto
dd =
d
.Alias(
"x"
,
"rdfentry_"
).Define(
"y"
,
"x*x"
);
22
23
auto
graph
= dd.Graph(
"x"
,
"y"
);
24
25
// This tutorial is ran with multithreading enabled. The order in which points are inserted is not known, so to have a meaningful representation points are sorted.
26
graph
->Sort();
27
auto
c
=
new
TCanvas
();
28
graph
->DrawClone(
"APL"
);
29
}
d
#define d(i)
Definition
RSha256.hxx:102
c
#define c(i)
Definition
RSha256.hxx:101
ROOT::RDataFrame
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Definition
RDataFrame.hxx:41
TCanvas
The Canvas class.
Definition
TCanvas.h:23
ROOT::EnableImplicitMT
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
Definition
TROOT.cxx:539
df021_createTGraph
Definition
df021_createTGraph.py:1
graph
Definition
graph.py:1
tutorials
dataframe
df021_createTGraph.C
ROOT v6-32 - Reference Guide Generated on Fri Nov 1 2024 15:09:38 (GVA Time) using Doxygen 1.9.8