Fix for possible inconsistency between the MC and raw OCDB
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Apr 2013 15:53:16 +0000 (15:53 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Apr 2013 15:53:16 +0000 (15:53 +0000)
TPC/Base/AliTPCcalibDB.cxx

index ff185c6..ddccb97 100644 (file)
@@ -564,8 +564,9 @@ void AliTPCcalibDB::UpdateNonRec(){
   entry          = GetCDBEntry("TPC/Calib/Raw");
   if (entry){
     entry->SetOwner(kTRUE);
-    TObjArray *arr=(TObjArray*)(entry->GetObject());
+    TObjArray *arr=dynamic_cast<TObjArray*>(entry->GetObject());
     if (arr) fCalibRaw=(AliTPCCalibRaw*)arr->At(0);
+    else fCalibRaw = (AliTPCCalibRaw*)(entry->GetObject());
   }
   //QA calibration data
   entry          = GetCDBEntry("TPC/Calib/QA");