RE: [ROOT] Bad variable name characters from shell invocation

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Mar 29 2004 - 18:29:39 MEST


Hi Andy,

This problem has been fixed in ROOT version 4.00/03.
The variable names used are now _file0, _file1, etc.

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Andy Buckley
Sent: Monday, March 29, 2004 6:06 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Bad variable name characters from shell invocation



Hi all,

I've recently noticed that if I invoke ROOT with a specified file to
read and that file has a bad form for a variable name (starts with a
number or contains a C++ operator character) then the interpreter will
throw an error when it tries to make a variable of the same name as
below:


buckley@pcem:~/davinci/job$ root DVNtuplesForBu2KsPi-signal.root 
root [0] 
Attaching file DVNtuplesForBu2KsPi-signal.root...
Error: Variable name has bad character 'DVNtuplesForBu2KsPi-signal'
FILE:(tmpfile) LINE:1
*** Interpreter error recovered ***
root [1]


Would it be possible to parse CLI-specified files for variable-compliant
names and substitute e.g. an underscore when building the variable name?
There may be repercussions of this idea, but since "bad" filenames won't
work at all with the current behaviour, I don't imagine this change
would hurt existing scripts.


Thanks for listening :-)

Andy

-- 
Andy Buckley, HEP Group, Cavendish Lab, Cambridge
http://www.insectnation.org


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET