Correct memory management
authorhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 May 2008 07:35:33 +0000 (07:35 +0000)
committerhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 May 2008 07:35:33 +0000 (07:35 +0000)
TPC/AliTPCPreprocessor.cxx

index 9e3e5d0..ceba913 100644 (file)
@@ -491,9 +491,8 @@ UInt_t AliTPCPreprocessor::ExtractPedestals(Int_t sourceFXS)
            AliTPCCalROC *rocRMS=calPed->GetCalRocRMS(sector, kFALSE);
            if ( rocRMS )  calPadRMS->SetCalROC(rocRMS,sector);
         }
-
-        f->Close();
         delete calPed; 
+        f->Close();
       }
      ++index;
     }  // while(list)
@@ -597,8 +596,8 @@ UInt_t AliTPCPreprocessor::ExtractPulser(Int_t sourceFXS)
            AliTPCCalROC *rocQmean=calPulser->GetCalRocQ(sector);
            if ( rocQmean )  pulserQmean->SetCalROC(rocQmean,sector);
         }
-       f->Close();
        delete calPulser;
+       f->Close();
       }
      ++index;
     }  // while(list)
@@ -712,8 +711,8 @@ UInt_t AliTPCPreprocessor::ExtractCE(Int_t sourceFXS)
           TGraph *grQ=calCE->MakeGraphTimeCE(sector,0,3); // Q time graph
            if ( grQ ) rocTtime->AddAt(grQ,sector);         
         }
-       f->Close();
        delete calCE;
+       f->Close();
       }
      ++index;
     }  // while(list)