X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSRawStreamSPDErrorLog.cxx;h=a0af29b101cccc14991011117084f063409116df;hb=29e1d5d808bb99127d490b3570afab87ca511e75;hp=665db9907ee73543fdc5e4c6626d35097eaa1495;hpb=b457135f5440c2fc67aac051cd6c35522f3c13e1;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSRawStreamSPDErrorLog.cxx b/ITS/AliITSRawStreamSPDErrorLog.cxx index 665db9907ee..a0af29b101c 100644 --- a/ITS/AliITSRawStreamSPDErrorLog.cxx +++ b/ITS/AliITSRawStreamSPDErrorLog.cxx @@ -65,7 +65,9 @@ AliITSRawStreamSPDErrorLog::AliITSRawStreamSPDErrorLog(const AliITSRawStreamSPDE fConsErrPos[err][eq] = new TGraph(*logger.fConsErrPos[err][eq]); } fConsErrType[eq] = new TH1F(*logger.fConsErrType[eq]); + fConsErrType[eq]->SetDirectory(0); fConsErrFraction[eq] = new TH1F(*logger.fConsErrFraction[eq]); + fConsErrFraction[eq]->SetDirectory(0); } } @@ -75,7 +77,9 @@ AliITSRawStreamSPDErrorLog& AliITSRawStreamSPDErrorLog::operator=(const AliITSRa if (this!=&logger) { delete fText; delete fTextTmpGeneral; - delete[] fTextTmp; + for(Int_t eq=0; eq<20;eq++){ + delete fTextTmp[eq]; + } this->DeleteHistograms(); for (UInt_t eq=0; eq<20; eq++) { @@ -104,7 +108,9 @@ AliITSRawStreamSPDErrorLog& AliITSRawStreamSPDErrorLog::operator=(const AliITSRa fConsErrPos[err][eq] = new TGraph(*logger.fConsErrPos[err][eq]); } fConsErrType[eq] = new TH1F(*logger.fConsErrType[eq]); + fConsErrType[eq]->SetDirectory(0); fConsErrFraction[eq] = new TH1F(*logger.fConsErrFraction[eq]); + fConsErrFraction[eq]->SetDirectory(0); } } @@ -117,7 +123,9 @@ AliITSRawStreamSPDErrorLog::~AliITSRawStreamSPDErrorLog() { DeleteHistograms(); delete fText; delete fTextTmpGeneral; - delete[] fTextTmp; + for(Int_t eq=0; eq<20; eq++){ + delete fTextTmp[eq]; + } } //________________________________________________________________________________________________ void AliITSRawStreamSPDErrorLog::InitHistograms() { @@ -127,12 +135,14 @@ void AliITSRawStreamSPDErrorLog::InitHistograms() { histName = Form("ConsErrType %d",eq); histTitle = Form("Distribution of errors, eq %d",eq); fConsErrType[eq]=new TH1F(histName.Data(),histTitle.Data(),kNrErrorCodes,-0.5,kNrErrorCodes-0.5); + fConsErrType[eq]->SetDirectory(0); fConsErrType[eq]->SetXTitle("Error Code"); fConsErrType[eq]->SetYTitle("Nr Errors"); histName = Form("ConsErrFraction %d",eq); histTitle = Form("Fraction of events with errors, eq %d",eq); fConsErrFraction[eq]=new TH1F(histName.Data(),histTitle.Data(),kNrErrorCodes,-0.5,kNrErrorCodes-0.5); + fConsErrFraction[eq]->SetDirectory(0); fConsErrFraction[eq]->SetXTitle("Error Code"); fConsErrFraction[eq]->SetYTitle("Fraction"); @@ -147,7 +157,7 @@ void AliITSRawStreamSPDErrorLog::InitHistograms() { } } //________________________________________________________________________________________________ -void AliITSRawStreamSPDErrorLog::DeleteHistograms() const { +void AliITSRawStreamSPDErrorLog::DeleteHistograms() { // delete histograms for (UInt_t eq=0; eq<20; eq++) { delete fConsErrType[eq]; @@ -318,7 +328,6 @@ void AliITSRawStreamSPDErrorLog::ProcessEvent(UInt_t eventNum) { //________________________________________________________________________________________________ void AliITSRawStreamSPDErrorLog::SummarizeEvent(UInt_t eventNum) { // summarize the information for the current event - // (could be replaced by calls to 'StartEvent' and 'EndEvent') ProcessEvent(eventNum); ResetEvent(); } @@ -484,3 +493,4 @@ UInt_t AliITSRawStreamSPDErrorLog::GetEventErrPos(UInt_t index, UInt_t errorCode } } +