On Tue, 22 Feb 2005, Stephen J. Sanders wrote: > Hi: > I am having to go back and replay some of the Yr02 AuAu raw data files > to > try and understand some changes that seem to have occurred in the MA. > However, the BrZdcRdoModule fails for the early runs with: > > Program received signal SIGSEGV, Segmentation fault. > 0x00be0879 in BrZdcRdoModule::Event (this=0x9a758c0, > InputTable=0xa70de28, rdoevent=0x99b5820) at BrZdcRdoModule.cxx:563 > 563 fLTdcHist[i]->Fill(digzdc_p->GetLeftTdc(i)); > > Is this an obvious error to one of you ZDC experts? I assume digzdc_p > is not being > defined, but what would have changed going to the Yr03 runs, where the > problem > does no exist? If no one has an easy fix, I'll try to devise a > workaround. I might see the problem - the change from year 02 to year 03 is that the dig object changes name from ZdcDIG to ZdcDig, and this is reflected in the code like this: (early in BrZdcRdoModule::Event) //----- high-gain table (old setup) if ((digzdc_p= (BrZdcDig*) InputTable->GetObject (BRTABLENAMES kDigZDC))) { <set adc/tdc> } //----- low-gain table (old setup) if ((digzdc_p= (BrZdcDig*) InputTable->GetObject (BRTABLENAMES kDigZDCLo))) { <set acd/tdc> } //----- current setup if ((digzdc_p= (BrZdcDig*) InputTable->GetObject (BRTABLENAMES kDigZdc))) { <set adc/tdc> } // Then this is what crashes: for (Int_t i=0; i<3; i++) { fLTdcHist[i]->Fill(digzdc_p->GetLeftTdc(i)); fRTdcHist[i]->Fill(digzdc_p->GetRightTdc(i)); fLCfdTdcHist[i]->Fill(digzdc_p->GetLeftTdcCfd(i)); fRCfdTdcHist[i]->Fill(digzdc_p->GetRightTdcCfd(i)); fLAdcHist[i]->Fill(digzdc_p->GetLeftAdc(i)); fRAdcHist[i]->Fill(digzdc_p->GetRightAdc(i)); // fLCfdAdcHist[i]->Fill(digzdc_p->GetLeftAdcCfd(i)); // fRCfdAdcHist[i]->Fill(digzdc_p->GetRightAdcCfd(i)); } The problem is that in your case the second call sets digzdc_p correctly, but it is then overwritten by a null pointer in the 'current setup' part (I think). The code then segfaults when it calls digzdc_p again. Solution: Add an 'else' to the last if-call, since we only have either DigZDC or DigZdc present at one time: //----- low-gain table (old setup) if ((digzdc_p= (BrZdcDig*) InputTable->GetObject (BRTABLENAMES kDigZDCLo))) { <set acd/tdc> } //----- current setup else if ((digzdc_p= (BrZdcDig*) InputTable->GetObject (BRTABLENAMES kDigZdc))) { <set adc/tdc> } (I haven't made the change though, so you'll have to try it :-) regards --Bjorn -- Bjorn H. Samset Phone: 22856465/92051998 PhD student, heavy ion physics Adr: Schouterrassen 6 Inst. of Physics, University of Oslo 0573 Oslo \|/ ----------------------------> -*- <----------------------------- /|\ _______________________________________________ Brahms-dev-l mailing list Brahms-dev-l@lists.bnl.gov http://lists.bnl.gov/mailman/listinfo/brahms-dev-lReceived on Wed Feb 23 02:28:28 2005
This archive was generated by hypermail 2.1.8 : Wed Feb 23 2005 - 02:28:32 EST