Hi Michael, I have some difficulty understanding your problem. Could you provide a simple exampl? Rene Brun Michael Alan Mazur wrote: > > hi all, > > i'm running root 3.02.07 (also tried 3.03.05) on RHL7.2... i have a class > representing a particle which inherits from TObject, and i run my code in > CINT. i always get (and usually ignore) the warning: > > "!!!There are some limitations regarding compiled/interpreted class > inheritance" > > is one of these known limitations that creating a TIter to iterate over a > TList of these objects causes memory problems? > > i have a TList containing my particle class, *leptonList, and i have two > TH1* hpe and hpmu. these objects have all been created, and the pointers > point to valid memory locations at the start of this code. > > in my main loop, i have the following code, which creates a TIter and > dumps all the pointers for debugging: > > cout << " before creating TIter " << (void*)hpmu <<" "<< > (void*)hpe << endl; > cout << " before, leptonList = " << (void*)leptonList << endl; > TIter iterLep(leptonList); > cout << " after creating TIter " << (void*)hpmu <<" "<< > (void*)hpe << endl; > cout << " after, leptonList = " << (void*)leptonList << endl; > cout << " &iterLep = " << (void*)&iterLep << endl; > > and, when i run this, i get the output below... the first time through the > loop is okay, but the second time through, creating the TIter changes the > pointers to the list itself and to two TH1 objects which have no > connection to the TList or the interpreted class at all... it then crashes > when i try to access one of the corrupt TH1 pointers. > > is this something people have seen before? any suggestions on what to do > in this case? > > thanks, > -michael > > root [3] t.Loop("test.root",10) > beginning event 0 > examining B+ 1 of 2 > before creating TIter 0x91f4160 0x91e7850 > before, leptonList = 0x9129ac0 > after creating TIter 0x91f4160 0x91e7850 > after, leptonList = 0x9129ac0 > &iterLep = 0x8f85e48 > examining B+ 2 of 2 > before creating TIter 0x91f4160 0x91e7850 > before, leptonList = 0x9129ac0 > after creating TIter 0x22 0x87eecf8 > after, leptonList = 0x4050fae4 > &iterLep = 0x8d58df0 > > *** Break *** segmentation violation > Root > Function Loop() busy flag cleared
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET