[ROOT] root script from tcsh

From: trincaz@lpnhep.in2p3.fr
Date: Mon Oct 29 2001 - 13:36:18 MET


Hello, 

I want to run a script that open root, run a macro ans exit
from root. I know how to do this but my problem is how to give an
argument that root will accept?

My script (called goon) is : 

#!/usr/local/bin/tcsh
setenv lerun $1
root << ! 
.L ChainRootTuples.C
ChainRootTuples($lerun);
.q
!
exit 0

And I only have to type in my unix environnement : goon Run133000

And I have the following error in root : 

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.01/05       7 June 2001   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

Compiled with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.02, June 2 2001
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: No symbol Run133000 in current scope  FILE:/tmp/fileMO8vu3_cint
LINE:1
*** Interpreter error recovered ***             

If I put directly "Run133000" instead of the argument $lerun in the
script, it works well.

What is the right way to give the argument to root? 

Thank you ! 

                              Sophie

------------------------
Sophie Trincaz-Duvoid

trincaz@lpnhep.in2p3.fr

01 44 27 23 28
------------------------



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