Setting storage to local:// in case there is the snapshot (which is now containing...
authorzampolli <chiara.zampolli@cern.ch>
Fri, 15 Aug 2014 07:05:50 +0000 (09:05 +0200)
committerzampolli <chiara.zampolli@cern.ch>
Fri, 15 Aug 2014 07:05:50 +0000 (09:05 +0200)
PWGPP/CalibMacros/CPass0/ConfigCalibTrain.C
PWGPP/CalibMacros/CPass1/ConfigCalibTrain.C

index c2ac57d..62bedd1 100644 (file)
@@ -15,15 +15,19 @@ void ConfigCalibTrain(Int_t run, const char *ocdb="raw://"){
 
   // OCDB
   printf("setting run to %d\n",run);
-  AliCDBManager::Instance()->SetDefaultStorage(ocdb);
-  AliCDBManager::Instance()->SetRun(run); 
   if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {  
     Printf("ConfigCalibTrain: using OCDB snapshot");
     AliCDBManager::Instance()->SetSnapshotMode("OCDB.root");
+    ocdb = "local://";
   }
   else {
     Printf("ConfigCalibTrain: NOT using OCDB snapshot");
   }
+  Printf("Default storage is %s", ocdb);
+
+  AliCDBManager::Instance()->SetDefaultStorage(ocdb);
+  AliCDBManager::Instance()->SetRun(run); 
+
   // magnetic field
   if ( !TGeoGlobalMagField::Instance()->GetField() ) {
     printf("Loading field map...\n");
index c8abcaf..603fbac 100644 (file)
@@ -15,15 +15,20 @@ void ConfigCalibTrain(Int_t run, const char *ocdb="raw://"){
 
   // OCDB
   printf("setting run to %d\n",run);
-  AliCDBManager::Instance()->SetDefaultStorage(ocdb);
-  AliCDBManager::Instance()->SetRun(run); 
   if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {  
     Printf("ConfigCalibTrain: using OCDB snapshot");
     AliCDBManager::Instance()->SetSnapshotMode("OCDB.root");
+    ocdb = "local://";
   }
   else {
     Printf("ConfigCalibTrain: NOT using OCDB snapshot");
   }
+
+  Printf("Default storage is %s", ocdb);
+
+  AliCDBManager::Instance()->SetDefaultStorage(ocdb);
+  AliCDBManager::Instance()->SetRun(run); 
+
   // magnetic field
   if ( !TGeoGlobalMagField::Instance()->GetField() ) {
     printf("Loading field map...\n");