]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverity
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Mar 2011 08:25:33 +0000 (08:25 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Mar 2011 08:25:33 +0000 (08:25 +0000)
EMCAL/AliCaloRawAnalyzerPeakFinder.cxx

index 45c99dcfbc543a5c7ee433304d195a6939f69dba..0b406da8ef5a93dc956bb0b3f669ea2c27c3a7fe 100644 (file)
@@ -251,24 +251,27 @@ AliCaloRawAnalyzerPeakFinder::LoadVectorsOCDB()
   //Loading of Peak-Finder  vectors from the 
   //Offline Condition Database  (OCDB)
   AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/PeakFinder/");
-  cout << __FILE__ << ":" << __LINE__ << ": Printing metadata !! " << endl;
-  entry->PrintMetaData();
-
+  
   if( entry != 0 )
+  {
+    
+    cout << __FILE__ << ":" << __LINE__ << ": Printing metadata !! " << endl;
+    entry->PrintMetaData();
+
+    AliCaloPeakFinderVectors  *pfv = (AliCaloPeakFinderVectors *)entry->GetObject(); 
+    if( pfv == 0 )
     {
-      AliCaloPeakFinderVectors  *pfv = (AliCaloPeakFinderVectors *)entry->GetObject(); 
-      if( pfv == 0 )
-       {
-         cout << __FILE__ << ":" << __LINE__ << "_ ERRROR " << endl;
-       }
-  
-      CopyVectors( pfv );
-      
-      if( pfv != 0 )
-       {
-         fIsInitialized = true;
-       }
+      cout << __FILE__ << ":" << __LINE__ << "_ ERRROR " << endl;
+    }
+    
+    CopyVectors( pfv );
+    
+    if( pfv != 0 )
+    {
+      fIsInitialized = true;
     }
+  }
+  
 }
 
 
@@ -322,6 +325,10 @@ AliCaloRawAnalyzerPeakFinder::LoadVectorsASCII()
              fclose (fp);
              fclose (fpc);
            }
+      
+      delete fp;
+      delete fpc;
+      
     }
   }
 }