Hi Avi, If libMyclass.so is the shared lib with your classes Neutron, Bunch, etc you can load this library with gSystem->Load("libMyclass"); You must load the libs in the right order in case one lib references classes from another lib. In case you already have a statement like the one above, you must remove the statement gROOT->Reset() from your macro or add gSystem->Load("libMyclass") after gROOT->Reset(). Rene Brun Avi Malki wrote: > > hi Rene, > > > As indicated by the error messages, your library with the classes Neutron, > > Tracks and Bunch is missing. Did you forget to load it ? > > I don't forget to load the classes Neutron, Tracks and Bunch. I don't > know how to do this. Can you please explain how to do this? > My root version is 2.22/09. > > Best Regards > Avi. > > > > > 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