ROOT
master
Reference Guide
Object.C
Go to the documentation of this file.
1
//script to test TRFunction
2
#include<
TRInterface.h
>
3
4
ROOT::R::TRInterface
&
r
=
ROOT::R::TRInterface::Instance
();
5
6
void
Object
()
7
{
8
// r.SetVerbose(kFALSE);
9
ROOT::R::TRFunctionImport
print(
"print"
);
10
11
ROOT::R::TRFunctionImport
c
(
"c"
);
12
ROOT::R::TRFunctionImport
cat(
"cat"
);
13
ROOT::R::TRFunctionImport
require(
"require"
);
14
ROOT::R::TRFunctionImport
head(
"head"
);
15
ROOT::R::TRFunctionImport
attributes(
"attributes"
);
16
17
ROOT::R::TRObject
vector=
c
(1,2,3,4);
18
ROOT::R::TRObject
v
=vector;
19
v
.SetAttribute(
"Size"
,4);
20
v
.SetAttribute(
"Name"
,
"TestVector"
);
21
// v.SetAttribute("NameNull",NULL);
22
23
int
s
=
v
.GetAttribute(
"Size"
);
24
TString
name
=
v
.GetAttribute(
"Name"
);
25
26
27
print(attributes(
v
));
28
print(cat(
"ROOT:"
,
s
));
29
print(cat(
"ROOT:"
,
name
));
30
}
c
#define c(i)
Definition:
RSha256.hxx:101
Object
void Object()
Definition:
Object.C:6
r
ROOT::R::TRInterface & r
Definition:
Object.C:4
ROOT::R::TRInterface
ROOT R was implemented using the R Project library and the modules Rcpp and RInside
Definition:
TRInterface.h:137
TGeant4Unit::s
static constexpr double s
Definition:
TGeant4SystemOfUnits.h:162
TString
Basic string class.
Definition:
TString.h:136
v
@ v
Definition:
rootcling_impl.cxx:3635
ROOT::R::TRObject
This is a class to get ROOT's objects from R's objects.
Definition:
TRObject.h:71
TRInterface.h
name
char name[80]
Definition:
TGX11.cxx:110
ROOT::R::TRInterface::Instance
static TRInterface & Instance()
static method to get an TRInterface instance reference
Definition:
TRInterface.cxx:185
ROOT::R::TRFunctionImport
This is a class to pass functions from ROOT to R.
Definition:
TRFunctionImport.h:120
bindings
r
tests
Object.C
ROOT master - Reference Guide Generated on Fri Jan 15 2021 13:00:22 (GVA Time) using Doxygen 1.9.0