I’m having some rather odd problems with double arrays in ROOT. What follows is a simplified example of some of the problems that I have been having. All of these problems occur on 4.02/00 running on a Linux box, but they vanish when the code is run on 4.04/04 running on OS X.
I’ve attached the sample code, but unfortunately the data file is much to large to add as an attachment.
As is the code does not recognize the declaration of PN_P as an array, so it will seg fault when an address is accessed. One “fix” to this is to insert a cout statement between the two
cout << "" << endl;
The PN_P array will then be accessed fine, but the program will seg fault once it finishes. The other is to remove the retrieval of the ntuple data by commenting out
The program will run fine and end with no problems. Unfortunately I need to access this data so it’s a very viable work around.
Am I missing a complexity with using double arrays or am I making a more obvious mistake?
Thanks for any help.
test.c (614 Bytes)