Re: [ROOT] Run macro inside a main macro!

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 02 2001 - 12:44:21 MEST


Hi Annalisa,

Your macro writing.C is correctly executed, but you forgot to flush the cout
output. Add an endl at teh end of your last cout, eg

cout<<" The channel number is "<<nch<<'\n'<<endl;


Rene Brun

Annalisa De Caro wrote:
> 
>    Hi rooters,
> i am trying to run a macro (run.C) that calls an other macro (writing.C),
> with command:
>              gROOT->ProcessLine(.x writing.C);
> At command: .x run.C, ROOT executes all command line but does not execute
> the line gROOT->ProcessLine(.x writing.C);
> ROOT ends the main macro execution (run.C) without execute the macro
> writing.C .
> Only when you do the command to exit from ROOT (.q), ROOT executes the
> macro writing.C .
> I do not understand why.
> I send you two macro, if you want try to run them.
> Thank you in advance
>                                         Annalisa
> 
> *************************************************************************
> *    University of Bologna    |                   |  decaro@bo.infn.it  *
> *     Physics Department      | +39 051  20 91103 |                     *
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> *    University of Salerno    |                   |                     *
> * Physics Sciences Department | +39 089  96 5359  |                     *
> *       (INFN of Napoli)      |                   |                     *
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> *     CERN - EP division      |                   | decaro@mail.cern.ch *
> *        (Bld.29 R019)        | +41  22  76 77767 |                     *
> *************************************************************************
> 
>   --------------------------------------------------------------------------------
> 
>                    Name: writing.C
>    writing.C       Type: Plain Text (TEXT/PLAIN)
>                Encoding: BASE64
> 
>                Name: run.C
>    run.C       Type: Plain Text (TEXT/PLAIN)
>            Encoding: BASE64



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET