Hi Volker, Volker Hejny wrote: > > Hi Rene, > > On Mon, Jan 21, 2002 at 08:42:45AM +0000, Rene Brun wrote: > > > In 3.02, I introduced a branch constructor supporting a collection in input. > > See : http://root.cern.ch/root/html302/src/TTree.cxx.html#TTree:Branch > > Branch(TCollection *list, Int_t bufsize, Int_t splitlevel, const char *name) > > Yes, I know. Maybe I have overlooked something, but the objects in > the collections are stored as top-level branches, aren't they? I'd > like to have this structure available in the tree, i.e. when browsing > through it. And, as far as I know, an automatic reconstruction of the > collection hierachy on read is not implemented so far. Suppose a TList *list containing objects A,B,C and D. Calling tree.Branch("event",list) This will create 4 top branches. In turn, if classes A,B,C or D have subobjects or pointers to TClonesArray, this will be split using the usual split rules. When reading the Tree, you still have to set the branch addresses for A,B,C,D. I could implement a special SetBranchAddress taking a list as input. > > > If you run in compression mode (default), elements that do not change from > > event to event will be highly compressed. See the result with TTree::Print. > > My concern is not disk space, it's rather speed. This would mean writing > two or three TString variables every time and to compress the buffer > every time. Writing is already a time consuming part. > It will take more time if you have many variables of this type. I would be curious to know the difference in time in your particular case. You can always have a RUN object and do RUN.Write() at the time when you do tree.Write(). Rene Brun > Best regards, > Volker > > -- > Dr. Volker Hejny Tel: 02461/616853 ** > Institut f. Kernphysik Fax: 02461/613930 ** > ---------------------------------------------------------------- ** ** --- > Forschungszentrum Juelich GmbH, D-52425 Juelich **
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:39 MET