[ROOT] Reading 2D arrays from a Tree

From: Ben Morgan (B.Morgan@sheffield.ac.uk)
Date: Mon Nov 12 2001 - 18:11:05 MET


Hello Rooters,
              I'm a new user of ROOT, so my question is probably trivial,
but I'm really stuck!
	I'm trying to read out the elements of a 8x2500 array stored as
one branch in a Tree. I've tried
using the examples posted by Glen Salo:

http://root.cern.ch/root/roottalk/roottalk01/3187.html
and
http://root.cern.ch/root/roottalk/roottalk99/0316.html

However, I call ROOT from my own C++ code, and the latter code for reading
elements out gives me a segmentation violation. Is there a way to read
each of the array columns into a 1d array from an external C++ code? I
note the suggestions to use separate one dimensional arrays, but I will
have to adapt the code later to allow for the column dimension to be
dynamically allocated, so using a 2d array from the start seems an easier
option. I'd be really grateful for any advice!

Thanks,

Ben Morgan.

-- 
-------------------------------------------------------------------------------
Mr. Ben Morgan
Postgraduate Student
University of Sheffield
Department of Physics & Astronomy
Hicks Building
Hounsfield Road
Sheffield  S3 7RH
-------------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:08 MET