Re: [ROOT] how to use TROOT::ProcessLine()

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Thu Aug 14 2003 - 10:43:40 MEST


 Hi tcli,
check http://root.cern.ch/root/htmldoc/TROOT.html#TROOT:Macro

Regards. Valeriy

----- Original Message ----- 
From: "tcli" <tcli@ic.sunysb.edu>
To: <roottalk@pcroot.cern.ch>
Sent: Wednesday, August 13, 2003 10:01 PM
Subject: [ROOT] how to use TROOT::ProcessLine()


> Dear root users,
>       I want to use TROOT::ProcessLine() to execute multiple scripts
> with some conditions from a single top script. The user guide v3.05
> simply mentions the name of this method and says it can be used for this
> purpose. It also mentions an example from
> $ROOTSYS/tutorials/cernstaff.C. I went through the cernstaff.C file, but
> it only demonstrates how to create and fill a tree, set branches,etc,
> including nothing on how to use TROOT::ProcessLine().
>       I seached in "root.cern.ch", finding only this:
> 
> "ProcessLine(const char* line, Int_t* error = 0)"
> 
> and
> 
> "void ProcessLine(const char *line, Int_t *error)
> 
>  Process interpreter command via TApplication::ProcessLine().
>  On Win32 the line will be processed a-synchronously by sending
>  it to the CINT interpreter thread. For explicit synchrounous processing
>  use ProcessLineSync(). On non-Win32 platforms there is not difference
>  between ProcessLine() and ProcessLineSync().
>  The possible error codes are defined by TInterpreter::EErrorCode.  In
>  particular, error will equal to TInterpreter::kProcessing until the
>  CINT interpreted thread has finished executing the line."
> 
> 
>      The second long explantion includes no examples on how to use
> ProcessLine().
> 
>       Then I tried to do the following on the root prompt:
> root[] .L myfile.C
> root[] gROOT.ProcessLine("myfile.C")
> 
> but root says "..Symbol myfile is not defined in current scope ...". So
> I have no idea on how to use it. Can anyone kindly help me?
> 
> The version of ROOT I am using is 3.05/04.
> 
> Thanks in advance!
> 
> tcli
> 



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