ROOT  6.06/09
Reference Guide
FunModule.C
Go to the documentation of this file.
1 //script to test pass function into a module
2 #include<TRInterface.h>
3 #include<TMath.h>
4 
5 std::string hello( std::string who, std::string msg){
6  std::string result( "hello " ) ;
7  result += who ;
8  result += msg;
9  return result ;
10 }
11 
12 ROOTR_MODULE(rootr){
13  ROOT::R::function( "hello", &hello );
14 }
15 
16 void FunModule()
17 {
19  r.SetVerbose(kFALSE);
20  r["rootr"]<<LOAD_ROOTR_MODULE(rootr);
21  r<<"print(rootr$hello('world ','ROOTR'))";
22 }
std::string hello(std::string who, std::string msg)
Definition: FunModule.C:5
const Bool_t kFALSE
Definition: Rtypes.h:92
void FunModule()
Definition: FunModule.C:16
void function(const char *name_, T fun, const char *docstring=0)
Definition: RExports.h:159
ROOT::R::TRInterface & r
Definition: Object.C:4
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
double result[121]
ROOTR_MODULE(rootr)
Definition: FunModule.C:12
#define LOAD_ROOTR_MODULE(NAME)
Definition: RExports.h:185