[ROOT] TClonesArrays in ROOT events and readback

From: Amanda Weinstein (amanda@SLAC.stanford.edu)
Date: Fri Jul 12 2002 - 04:31:53 MEST


My question is as follows.  If I have an event
structure containing TClonesArrays, etc. the class
constructor looks like this:

EcsEvent::EcsEvent() {

  if (!_fsimpleTrackList)
    _fsimpleTrackList   = new TClonesArray("SimpleTrack", 100);
  _simpleTrackList = _fsimpleTrackList;
  if (!_fD0List)
    _fD0List           = new TClonesArray("TrackD0", 100);
  _D0List = _fD0List;

  _referenceList = new TObjArray(500);

  Clear(NULL);

 _simpleTrackList->BypassStreamer(kFALSE);
 _D0List->BypassStreamer(kFALSE);
}

(The actual event structure has a lot more lists in it, but this
is enough for the purposes of illustration).

Now, in the code I actually run, _D0List is never actually filled,
and therefore, given my understanding, is never written out,
except for the pointer itself.  Let's say that I produce a tree
with one branch of "EcsEvent" objects, filled as above, so that
the _simpleTrackList and _referenceList objects contain stuff,
but the _D0List never does.

Now, imagine that the size of the "TrackD0" object were to be
changed, and the code recompiled.  Will it still be possible
to read back the tree generated above, which don't actually
contain any "TrackD0" objects, even though EcsEvent creates
a TClonesArray of "TrackD0" objects in its constructor?  Or
will the change to the "TrackD0" object result in the readback
becoming corrupted?

			Thanks,
			   Amanda



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:59 MET