]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCDB.cxx
Coverity fix for uninitialized variables and check for returned null value
[u/mrichter/AliRoot.git] / MUON / AliMUONCDB.cxx
index 8bca56f1dd0d99853442484e433ccc0b8888dc0a..69751988c6bef6289e655ca3ad90f7dd8761035e 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 /* $Id$ */
-
 //-----------------------------------------------------------------------------
 /// \namespace AliMUONCDB
 ///
 #include <sstream>
 #include <set>
 
+using std::endl;
+using std::cout;
+using std::cerr;
+using std::ostringstream;
+using std::ifstream;
+
 namespace
 {
   //_____________________________________________________________________________
@@ -288,7 +294,7 @@ AliMUONRecoParam* AliMUONCDB::LoadRecoParam()
   
   AliInfoGeneral("AliMUONCDB", "Loading RecoParam from OCDB...");
   
-  if (!AliMUONCDB::CheckOCDB()) return kFALSE;
+  if (!AliMUONCDB::CheckOCDB()) return 0x0;
   
   AliMUONRecoParam* recoParam = 0x0;
   AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
@@ -324,7 +330,7 @@ TClonesArray* AliMUONCDB::LoadAlignmentData()
   
   AliInfoGeneral("AliMUONCDB", "Loading Alignemnt from OCDB...");
   
-  if (!AliMUONCDB::CheckOCDB()) return kFALSE;
+  if (!AliMUONCDB::CheckOCDB()) return 0x0;
   
   TClonesArray* alignmentArray = 0x0;
   AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Align/Data");
@@ -1534,6 +1540,12 @@ AliMUONCDB::ShowConfig(Bool_t withStatusMap)
 
     AliMUONRecoParam* recoParam = AliMUONCDB::LoadRecoParam();
   
+    if (!recoParam)
+    {
+      AliErrorGeneral("AliMUONCDB::ShowConfig","Cannot get recoParams from OCDB !");
+      return;
+    }
+    
     statusMaker->SetLimits(*recoParam);
   
     UInt_t mask = recoParam->PadGoodnessMask();