]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCDB.cxx
sync with GSI svn
[u/mrichter/AliRoot.git] / MUON / AliMUONCDB.cxx
index 5e9082ea9bc44f899285bba005fdb5d9404ac89b..d99eba4b0fc0bd9719a9bfc5da81ca091d943b34 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");
@@ -299,6 +305,7 @@ AliMUONRecoParam* AliMUONCDB::LoadRecoParam()
     if (!(recoParam = dynamic_cast<AliMUONRecoParam*>(entry->GetObject()))) {
       
       TObjArray* recoParamArray = static_cast<TObjArray*>(entry->GetObject());
+//      recoParamArray->SetOwner(kTRUE); // FIXME: this should be done, but is causing a problem at the end of the reco... investigate why...
       
       for(Int_t i = 0; i < recoParamArray->GetEntriesFast(); i++) {
        recoParam = static_cast<AliMUONRecoParam*>(recoParamArray->UncheckedAt(i));
@@ -323,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");
@@ -1533,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();
@@ -1870,7 +1883,7 @@ void AliMUONCDB::CheckHV(Int_t runNumber, Int_t verbose)
     
     TString name(static_cast<TObjString*>(a->At(0))->String());
     
-    if ( name.Contains("sw") || name.Contains("SUMMARY") ) continue;
+    if ( name.Contains("sw") || name.Contains("SUMMARY") ) {delete a; continue;}
     
     Int_t index = hvNamer.DCSIndexFromDCSAlias(name.Data());
     
@@ -1881,6 +1894,7 @@ void AliMUONCDB::CheckHV(Int_t runNumber, Int_t verbose)
     if (!de)
     {
       AliErrorGeneral("AliMUONCDB::CheckHV",Form("Could not get detElemId from dcsAlias %s",name.Data()));
+      delete a;
       continue;
     }