I have a very odd problem that I am trying to resolve. I apologise if this is a stupid question - but I can’t seem to work my way past it.
I have a script (sdp.C) which I inherited from a colleague at the ANU that runs perfectly to analyse one set of data files but fails when I run it against a set of data files with seemingly identical structure.
The error message I receive is
“Error: Symbol TREE is not defined in current scope sdp.C:48:
Error: Failed to evaluate TREE->Draw(“X.PE1>>h1p1”)”
Any work arounds that I have found so far result in no data making it through the sort process.
My questions are:
How can symbol “TREE” not be defined in one ROOT file and yet be defined a very similar ROOT file (same basic structure and history, translated into ROOT from the same data collection system using an identical translation utility and identical setup scripts)?
Is there any step I can do within the script to make sure that the symbol “TREE” is defined (or does the definition have to exist in the ROOT file)?
Is there any step I can do to make sure that “TREE” is defined in the ROOT file?
Thank you for your patience
Problem found on both of the following ROOT versions.
ROOT 5.18/00b (branches/v5-18-00-patches@22563, Oct 19 2008, 22:04:00 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
ROOT 5.22/00 (trunk@26997, De 18 2008, 13:59:00 on win32)
Thank you for those two pointers. I apologise if I seem to be turning too quickly to seek assistance - I had tried variations on what you have just suggested in my various attempts to resolve this - but I tried the two steps on an either/or basis never making both changes in the same script.
I can now get past that sticking point and trying working my way past the next one.
The solutions you have suggested seem like they should be universally true for scripts of this type, but I still have the conceptual problem that the script sdp.C does run without any changes (apart from the file referenced by fname1) for a different data set. Unfortunately the ROOT files that it will run on are too big to upload to roottalk.
Thank you for the clarification and I apologise for not getting the point of your earlier advice.
In transferring the data into ROOT format I had accidentally declared the tree name (which the script had assumed would be “TREE”) to be the same as the file name. I have regenerated all of the ROOT files for the current data run and have checked that we have gotten past this problem now.
On to the next problem. Thank you again for your help