]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliCaloCalibPedestal.cxx
Coverity fixes.
[u/mrichter/AliRoot.git] / EMCAL / AliCaloCalibPedestal.cxx
index 44e9d16147cab38915ae99f6bd6eb2cd7bcc2c47..15fe6056036a4b5f9e8a7ad804becc17b4a63384 100644 (file)
@@ -254,10 +254,12 @@ void AliCaloCalibPedestal::CompressAndSetOwner()
 //_____________________________________________________________________
 AliCaloCalibPedestal::~AliCaloCalibPedestal()
 {
+  //dtor
+  
   if (fReference) delete fReference;//Delete the reference object, if it has been loaded
-
+  
   // delete also TObjArray's 
-  fPedestalLowGain.Delete();
+  fPedestalLowGain.Delete(); 
   fPedestalHighGain.Delete();
   fPedestalLEDRefLowGain.Delete();
   fPedestalLEDRefHighGain.Delete();
@@ -277,7 +279,7 @@ AliCaloCalibPedestal::~AliCaloCalibPedestal()
   fPeakMinusPedLowGainRatio.Delete();
   fPeakMinusPedHighGainRatio.Delete();
   fDeadMap.Delete();
-
+  
 }
 
 // copy ctor
@@ -549,6 +551,8 @@ Bool_t AliCaloCalibPedestal::ProcessEvent(AliCaloRawStreamV3 *in)
 { 
   // Method to process=analyze one event in the data stream
   if (!in) return kFALSE; //Return right away if there's a null pointer
+  in->Reset(); // just in case the next customer forgets to check if the stream was reset..
+
   fNEvents++; // one more event
 
   if (fNEvents==1) ValidateProfiles(); // 1st event, make sure histos/profiles exist
@@ -652,7 +656,6 @@ Bool_t AliCaloCalibPedestal::ProcessEvent(AliCaloRawStreamV3 *in)
     }// end while over channel   
   }//end while over DDL's, of input stream 
 
-  in->Reset(); // just in case the next customer forgets to check if the stream was reset..
  
   return kTRUE;
 }
@@ -1066,7 +1069,7 @@ void AliCaloCalibPedestal::ComputeDeadTowers(const char * deadMapFile)
     }
     if (!diff->is_open()) {
       delete diff;
-      fout = 0;//Set the pointer to empty if the file was not opened
+      diff = 0;//Set the pointer to empty if the file was not opened
     }
   }