Re: executing one macro from another

From: Ingo Strauch (strauch@toots.physik.rwth-aachen.de)
Date: Mon Mar 27 2000 - 11:31:40 MEST


Hi Rutger,

I tried the same and got the same error message first. One workaround is to
either specify the full path to the macro or the path relative to the path in
which you started your ROOT Session. Assume you have both files in
/home/yourname/root/macros try the following:

> Example:
>
> --------- macro topMacro.C
> {
>
    gInterpreter->ExecuteMacro("/home/yourname/root/macros/subMacro1.C");

    or

    gInterpreter->ExecuteMacro("root/macros/subMacro1.C");

>
> }
> --------- subMacro1.C
> {
>  // do something
> }

Of course the second possibility only works if you started ROOT in your
home-directory.

Ciao,
     Ingo

----------------------------------------------------------------------------
Ingo Strauch       Budapester Str. 30, 20359 Hamburg, Tel.: +49 40 7421 4722
----------------------------------------------------------------------------
DESY, Group H1/AAC1, Room 1c354      | I.Phys.Inst. RWTH Aachen, Room 28B210
Notkestr. 85, 22607 Hamburg          |       Sommerfeldstr. 14, 52056 Aachen
Tel: +49 40 8998-2312 / Fax: -4385   |  Tel: +49 241 80-7183 / Fax: 8888-661
strauch@mail.desy.de                 |   strauch@toots.physik.rwth-aachen.de
----------------------------------------------------------------------------
www-h1.desy.de/~strauch/      or      www-users.rwth-aachen.de/Ingo.Strauch/
----------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET