Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 {
18  ROOT::R::TRInterface &r=ROOT::R::TRInterface::Instance();
19  r.SetVerbose(kFALSE);
20  r["rootr"]<<LOAD_ROOTR_MODULE(rootr);
21  r<<"print(rootr$hello('world ','ROOTR'))";
22 }