Reading and Writing Trees with the same names and different structures

From: Kris Hagel <hagel_at_comp.tamu.edu>
Date: Tue, 26 Apr 2011 18:40:27 -0500


Hello,
I have two root files (file A, file B) with tree data which was generated using different libraries, say libA.so and libB.so. The structure of each tree is of the same philosophy as the classic event examples (Event.cxx, Event.h in the test directory) with some global data as well as the static TClonesArrays for the individual particles. However, the individual event structure is slightly different in each file, but is called the same, both the Event and the structure (ie Track) in the TClonesArray.

Now, I have a third user who would like to read both file A and file B and output a fraction of the events (after some cuts) to the event structure in file A. Doing this for file A is, of course, trivial.

How would one read file B (which has Event and Track) and output it to the Event, Track structure of file A? Again, they are both called Event,Track, but have slightly different data members.

Thank you.

Kris Hagel Received on Wed Apr 27 2011 - 01:40:27 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 28 2011 - 17:50:01 CEST