Hello. I have a question about BrRichDigModule since the program crashes in this module at event No 612. Look at the copy of the problem codes with my comments. In BrRichDigModule::Event, BrDataTable* hits1 = inNode->GetDataTable("GeantHits RCR1"); BrDataTable* hits2 = inNode->GetDataTable("GeantHits RCR2"); BrDataTable* hits3 = inNode->GetDataTable("GeantHits RCR3"); Question 1. What are three different table? (Ok, maybe I really don't care what they are if the program does not crash.) ....... if(!hits1 && !hits2 && !hits3){ if( DebugLevel()>0 ) Warning("BrRichDigModule::Event()", "No Geant hit in this event" ); return; } Question 2. Are you sure you only want to check if all of hits1 and hits 2 and hits 3 are false. (Aren't they suppose to be "or" instead?) (I think this is the cause of the problem. But, since I don't know the RICH code well, I need comment from our RICH specialist.) //loop over hits in RCR1 for(Int_t i = 0; i < hits1->GetEntries(); i++) { BrGeantHit* hit = (BrGeantHit*) hits1->At(i); Double_t p = hit->GetTrack()->P(); Double_t mass = hit->GetTrack()->Mass(); Int_t trkNo = hit->TrackNo(); Question 3. Don't we have to check if hits1 really exits? (But, my program is not crashing here.) (still within the same loop) //loop over hits in RCR2 to find a hit if any belong to the same track BrGeantHit * hitRcr2 = 0; for(Int_t j = 0; j < hits2->GetEntries(); j++) { BrGeantHit* hit2 = (BrGeantHit*)hits2->At(j); if(hit2->TrackNo() == trkNo){ hitRcr2 = hit2; hits2->RemoveAt(j); break; } } Question 4. This is where my program crash since it does not check if hits2 really exits. Does hits2 always exist when hits1 is there? Or, go back to Question 2 (still within the same loop) //loop over hits in RCR3 to find a hit if any belong to the same track BrGeantHit * hitRcr3 = 0; for(Int_t j = 0; j < hits3->GetEntries(); j++){ BrGeantHit* hit3 = (BrGeantHit*)hits3->At(j); if(hit3->TrackNo() == trkNo){ hitRcr3 = hit3; hits3->RemoveAt(j); break; } } Question 5. The same as question 3. (My program does not get here.) etc......... Hiro _______________________________________________ Brahms-dev-l mailing list Brahms-dev-l@lists.bnl.gov http://lists.bnl.gov/mailman/listinfo/brahms-dev-lReceived on Tue Dec 21 18:43:15 2004
This archive was generated by hypermail 2.1.8 : Tue Dec 21 2004 - 18:43:36 EST