Hi Jiri, > and T->Draw("GetEntries()") (fTracks.GetEntries()). Note that in TTree::Draw you can never directly call the methods of a TClonesArray. TClonesArray are treated as a special case to make them appear (for convenience) as simple arrays of their content. Thus when you use 'T->Draw("GetEntries()")' it is NOT equivalent to 'T->Draw("fTracks.GetEntries()")' [this last syntax would try to call Track::GetEntries] Also, TTree::Draw implemenents one more convenience in that it allows the user to omit the left most part of qualifier. Thus when you use 'T->Draw("GetEntries()")', TTree::Draw look for the Method GetEntries, first in the main object (Event) and then in each of the leaf of the TTree (more or so each of the data members). Thus it calls fEntries on the first 'leaf' where it can. In the Event case, calling 'T->Draw("GetEntries()");' is actually equivalent to T->Draw("fHighPt.GetEntries()");'. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Jiri Masik Sent: Wednesday, February 13, 2002 6:10 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] test/Event example Hi, I examined the Event demo in the test directory and found something which I do not understand. I run ./Event to produce Event.root, then T->Draw() to obtain tree variables. The results on the number of tracks are different for T->Draw("fNtrack") and T->Draw("GetEntries()") (fTracks.GetEntries()). The first one is populated around 600 while the second one is typically 360. When events are written on file both numbers are equal. What's wrong? Is it a bug? cheers Jiri linuxdeb2ppc, gcc-3.0, Root-3.03 from 10/02
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET