Hi, I have met a stupid (maybe) problem. I use tree to analyze ...: UShort_t nchar=0; Float_t px[MAX_TRACK]; TFile *fin = new TFile("oxygen.root","READ"); if (!(fin.IsOpen())) break; TTree *oxy = (TTree*)fin->Get("oxy"); oxy->SetBranchAddress("nchar",&nchar); oxy->SetBranchAddress("px",px); UInt_t nevents=oxy->GetEntries(); for (UInt_t i=0; i<nevents; i++) { oxy->GetEntry(i); .... using nchar using px[...] .... for (UInt_t i2=1; i2<500; i2++) { UShort_t event2 = (gRandom->Rndm())*nevents; if (event2 == i) event2 = (gRandom->Rndm())*nevents; oxy->GetEntry(event2); ... using nchar using px[...] .... } // end i2 } // end i The result is that the analysis of the root takes days, days, .. Can I somehow speed it up ? Thanks in advance, Jan
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:58 MET