Hi Avi, As indicated by the error messages, your library with the classes Neutron, Tracks and Bunch is missing. Did you forget to load it ? With the new branch style introduced in 3.01, one should be able to copy/select a Tree without having the original classes. Rene Brun Avi Malki wrote: > > hi rooters, > > We would like to consider reducing the data and select events with some > criteria such as 3 tracks (in event branch) and one negative particle (in > tracks branch) for example. > > The program below create a new tree with number of tracks equal 3 > for example. The problem is that only 'event' is created the other > Branches (they are under event branch): Neutron, Tracks and Bunch > are filled with zeros for all variables. > > Can someone please give us advise how to overcome this problem? > > Best regards > avi. > > { > gROOT->Reset(); > > gSystem->Load("/usr/local/root/test/libEvent.so"); > > TFile f("../DATA/tf8826.root"); > TTree *T = (TTree*)f.Get("T"); > > Event *event = new Event(); > > T->SetBranchAddress("event",&event); > > TFile f2("New.root","recreate"); > TTree *T2 = T->CopyTree("Ntrack==3"); > > T2->Write(); > } > > The problem: > > root [0] > Processing tree_copy.c... > Warning in <TBranchClones::Streamer>: Unknow class: Neutron. Cannot read BranchClones: fNeut > Warning in <TBranchClones::Streamer>: Unknow class: Bunch. Cannot read BranchClones: fBn > Warning in <TBranchClones::Streamer>: Unknow class: Neutron. Cannot read BranchClones: fNeut > Warning in <TBranchClones::Streamer>: Unknow class: Bunch. Cannot read BranchClones: fBn > root [1] .q
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET