Error Limitation: Statement too long

Hi,
I would like to read data from ascii file which consist of several numbers per line.
In my calibrate.C macro I was going to use something like:


file_status= fscanf(DATA,"%d %f %f %f .............%f %f \n", 
                              &event,
                              &vec[0],
                              &vec[1],
                              &vec[2],
                              ....
                              ....
                              &vec[89],
                              &vec[90])

Unfortunately I get the following error (where line 101 is about to the 60th number in the
line):

Limitation: Statement too long calibrate.C:101:
cint: Security mode 0x7:0x2 *** Fatal error in interpreter… restarting interpreter ***
*** Fatal error in interpreter… restarting interpreter ***

Is there something wrong I am doing or cint cannot handle that many numbers? If so, is there a simple way to do this?

Thanks in advance,
Lorenzo

Hi,

this is one of the “unfortunate” C-ish limitations in Cint (fixed buffer lengths). You could use stl (ifstream) instead, or - depending on your problem - read the data directly into a TGraph or TNtuple. Both support reading data from a file.

Cheers, Axel.

Hi
I got the same this error:

 (Limitation: Statement too long calibrate.C:101:
cint: Security mode 0x7:0x2 *** Fatal error in interpreter… restarting interpreter ***
*** Fatal error in interpreter… restarting interpreter *** )

Please can you told me how you solved
Thanks

First of all it is not a good idea to resurrect 12 years old post. You better create a new one.

What you get is a CINT error. So you are using an old ROOT version (5.34 ?) . CINT is now replaced by the CLING C++ interpreter in ROOT 6xx. Can you update to a more recent version of ROOT ?