Hi Dave, You cannot use TClonesArray for this problem. Use TObjArray instead. TClonesArray assume that the size of each object is constant. In your case each track has a variable length list of hits. Rene Brun On Thu, 2 Dec 1999, David Bailey (Antares Post Graduate) wrote: > Hi all, > > I'm trying to build a data structure in a ROOT file which contains several > levels of data. i.e. > > header > events -> calibration > tracks -> track parameters > -> hits -> position > amplitude etc > > i.e. Within each "event" there will be many "calibration" events and many > "tracks" each of which contain many "hits". Essentially, it is like the > example in the distribution ( class Event and Track ) but with another layer > ( in that context, "Track" contains a number of "Hits" ). As documented in > the example "How to Create and Fill a tree", TClonesArrays cannot be used > except for the last level of data with automatic splitting ( i.e. As I > understand it, "tracks" will contain a TClonesArray of "hits" ). The > question is, what is the best structure to use for the levels above and how > are they implemented? > > Thanks in advance, Dave Bailey > > /------------------------------------------/ > David Bailey : Antares post-Graduate / > Nuclear and Astrophysics Laboratory / > Keble Road, Oxford OX1 3RH /-------/ > (01865) 273395 /------------/ > -----------------/ d.bailey2@physics.ox.ac.uk >
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:43 MET