Logo ROOT   6.21/01
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 {
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
void FunModule()
Definition: FunModule.C:16
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151
ROOT::R::TRInterface & r
Definition: Object.C:4
const Bool_t kFALSE
Definition: RtypesCore.h:88
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
ROOTR_MODULE(rootr)
Definition: FunModule.C:12
#define LOAD_ROOTR_MODULE(NAME)
Definition: RExports.h:177