Re: [ROOT] execute macros?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Jan 25 2003 - 08:41:37 MET


Hi,

To call a macro from another macro, do
   gROOT->ProcessLine(".x macro.C");
or 
   gROOT->ProcessLine(".L macro1.C");
   gROOT->ProcessLine(".L macro2.C");
   function1();  //from macro1.C
   function2();  //from macro2.C

If all your functions are in the same macro, do
  .L macro.C
  function1(); etc
or
  as above via gROOT->ProcessLine

see Users Guide for more information.

Rene Brun
 
On Sat, 25 Jan 2003, Sunil 
Jayatilleke wrote:

> 
> I have two macros like as follows
> 
> void test1(){
> //
> }
> 
> void test2(){
> //
> }
> 
> 
> I want to execute "test1" and "test2" inside a third macro. 
> how do we do this if
> 1.) all macros are in a same script
> 2.) first two are in a different script
> 
> Thanks
> Sunil
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET