[ROOT] Bad variable name characters from shell invocation

From: Andy Buckley (buckley@hep.phy.cam.ac.uk)
Date: Mon Mar 29 2004 - 14:06:25 MEST

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

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 Buckley, HEP Group, Cavendish Lab, Cambridge

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