[ROOT] variable-size array of compiled class in a branch?

From: Yiqun Wang (yqwang@rcf.rhic.bnl.gov)
Date: Mon Jun 14 2004 - 04:28:18 MEST


Hi, ROOTers:

In Guide (3.10), I see one can have a variable-size array for a simple
type (Int_t, Float_t, etc.). Can we do that for a compiled class? I tried
the attached program, but got many errors (mismatched size) when reading
the root file in an interactive session. Any suggestions?

The motivation is to save disk space. Events I have may have interesting
data in only one module, or multiple modules. If possible, I don't want to
write all modules when some of them do not contain interesting data.

To run my simplied example, untar the attached "test.tar.gz" in an empty
directory, and run "make all". After that, run "./test" and generate the
root file "xxxxx.root". This file has one tree "tree", which contains a
branch "foo" (of class "Foo"). The leaf "modules" is the variable-size
array of compiled class "Bar".

Thanks!

Yiqun Wang






This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET