ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ROOTR.C
Go to the documentation of this file.
1 //script to test Modules
2 #include<TRInterface.h>
3 
5 {
6  return cos(x);
7 }
8 
9 void ROOTR()
10 {
12  r.SetVerbose(kFALSE);
13  r.LoadModule("Gpad");
14  r.LoadModule("Hist");
15  r.LoadModule("Rint");
16 
17  r<<"x<-seq(0,2*pi,by=.1)";
18  r<<"c1<-new(TCanvas,'c1','dlnorm')";
19  r<<"u <-new(TGraph,length(x),x,dlnorm(x))" ;//TGraph(int,double*,double*)
20  r<<"u$Draw()";
21 
22  r<<"c2<-new(TCanvas,'c2','DiLog from TMath')";
23  r<<"o<- new(TF1,'dilog','TMath::DiLog(x)',0,2*pi)";
24  r<<"o$Draw()";
25 //
26  r<<"c3<-new(TCanvas,'c3','Custom')";
27  r<<"i <- new(TF1,'f2','[0]*myFunc([1]*x)',0,2*pi)";
28  r<<"i$SetRange(0,2*pi)";
29  r<<"i$SetParameter(0,4)";
30  r<<"i$SetParameter(1,pi/2)";
31  r<<"print(i$Eval(0))";
32  r<<"print(i$Eval(c(0,pi)))";
33  r<<"i$Draw('')";
34 
35 // r<<"gApp<-new(TRint,'ROOTR')";
36 // r<<"gApp$ProcessLine('cout<<\"Calling cout from TRint\"<<endl;')";
37 
38 }
Double_t myFunc(Double_t x)
Definition: ROOTR.C:4
const Bool_t kFALSE
Definition: Rtypes.h:92
double cos(double)
void ROOTR()
Definition: ROOTR.C:9
Double_t x[n]
Definition: legend1.C:17
ROOT::R::TRInterface & r
Definition: Object.C:4
double Double_t
Definition: RtypesCore.h:55
void SetVerbose(Bool_t status)
Method to set verbose mode, that produce extra output.
static TRInterface & Instance()
static method to get an TRInterface instance reference