]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGPP/CalibMacros/CPass0/makeOCDB.C
updates:
[u/mrichter/AliRoot.git] / PWGPP / CalibMacros / CPass0 / makeOCDB.C
index b4bbcd0a84968535b17e12409b5daa484b01fe94..ac62db2f4be8d8a6b2689a8d388759f6b8ff709e 100644 (file)
@@ -55,7 +55,6 @@ void makeOCDB(Int_t runNumber, TString  targetOCDBstorage="", TString sourceOCDB
   }
   else {
     targetStorage = AliCDBManager::Instance()->GetStorage(targetOCDBstorage.Data());
-    targetStorage->SetMirrorSEs(mirrorsStr.Data());
   }
   printf("** targetOCDBstorage: \"%s\"\n",targetOCDBstorage.Data());
 
@@ -251,13 +250,19 @@ void printCalibStat(Int_t run, const char * fname,  TTreeSRedirector * pcstream)
   //
   Int_t tpcEvents=0;
   Int_t tpcTracks=0;
-  TList * TPCCalib = (TList*)fin->Get("TPCCalib");      
-  if (TPCCalib) {
-    AliTPCcalibTime  * calibTime = (AliTPCcalibTime  *)TPCCalib->FindObject("calibTime");
-    if (calibTime){
+  TObject* obj = dynamic_cast<TObject*>(fin->Get("TPCCalib"));
+  TObjArray* array = dynamic_cast<TObjArray*>(obj);
+  TDirectory* dir = dynamic_cast<TDirectory*>(obj);
+  AliTPCcalibTime  * calibTime = NULL;
+  if (dir) {
+    calibTime = dynamic_cast<AliTPCcalibTime*>(dir->Get("calibTime"));
+  }
+  else if (array){
+    calibTime = (AliTPCcalibTime *)array->FindObject("calibTime");
+  }
+  if (calibTime) {
       tpcEvents = TMath::Nint(calibTime->GetTPCVertexHisto(0)->GetEntries());
       tpcTracks = TMath::Nint(calibTime->GetResHistoTPCITS(0)->GetEntries());
-    }
   }
   printf("Monalisa TPCevents\t%d\n",tpcEvents);
   if (pcstream) (*pcstream)<<"calibStatAll"<<"TPCevents="<<tpcEvents;