TChain does not work on the 2nd file.

Wei Xie (xiewei@ceropa.weizmann.ac.il)
Sun, 3 May 1998 10:24:22 +0200 (EET)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--2005740935-851401618-894183861=:9418
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dear ROOTers

I'd better to describe my problem in some more detail.
A file "htree.root" are produced by the attached files in which
there're one TTree object "T" and two Branchs varible "point" and
"eventn". A 2nd file "htree2.root" are produced by the same file but
the Branch variable name has been changed to "circle" and "neve", that
means two new branches has been produced in the 2nd file.
I combine the two files in a chain(Just for understanding the TChain)
by typing:

** TChain chain("T");
** chain.Add("htree.root");
** chain.Add("htree2.root");
** chain.Draw("point");
** chain.Draw("circle");

It'll draw distribution of "point" sucessfully but show the following
message for "circle":

** *ERROR 26 :
** Unknown name : "circle"

But if change the sequence of adding the two files, i.e.

** TChain chain("T");
** chain.Add("htree2.root");
** chain.Add("htree.root");
** chain.Draw("point");
** chain.Draw("circle");

It'll draw distribution of "circle" sucessfully but show the following
message for "point" this time:

** *ERROR 26 :
** Unknown name : "point"

Since Chain is intended for concatenating several pieces of the same tree
residing in several files, I assume it should be able to deal with Branch
"point" and "circle" together since they're in the same tree. Could you
tell me where's the mistake of my operation ?

Sincerely yours

Xie

W__W W__W
/ \ PHONE : 972 8 9343372 (o) 9471872 (h) / \
( 0 _ 0) (0 _ 0 )
\_ V_/ E-mail: xiewei@ceres.weizmann.ac.il \_^ _/
/ \ / \
=OOOo=======oOOO====================================OOOo=======oOOO======

--2005740935-851401618-894183861=:9418
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="oo.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.HPP.3.96-heb-2.07.980503102421.9418B@ceropa.weizmann.ac.il>
Content-Description:

I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSAiVFJPT1QuaCINCiNpbmNs
dWRlICJURmlsZS5oIg0KI2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