Logo ROOT   6.14/05
Reference Guide
Object.C
Go to the documentation of this file.
1 //script to test TRFunction
2 #include<TRInterface.h>
3 
5 
6 void Object()
7 {
8 // r.SetVerbose(kFALSE);
9  ROOT::R::TRFunctionImport print("print");
10 
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 }
Basic string class.
Definition: TString.h:131
void Object()
Definition: Object.C:6
TRObject GetAttribute(const TString name)
The R objects can to have associate attributes with this method you can added attribute to TRObject g...
Definition: TRObject.h:128
This is a class to get ROOT&#39;s objects from R&#39;s objects
Definition: TRObject.h:71
ROOT::R::TRInterface & r
Definition: Object.C:4
This is a class to pass functions from ROOT to R.
SVector< double, 2 > v
Definition: Dict.h:5
static TRInterface & Instance()
static method to get an TRInterface instance reference
static constexpr double s
#define c(i)
Definition: RSha256.hxx:101
void SetAttribute(const TString name, T obj)
The R objects can to have associate attributes with this method you can added attribute to TRObject g...
Definition: TRObject.h:117
char name[80]
Definition: TGX11.cxx:109