TRD changes for the makeOCDB.C
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Jul 2011 11:41:45 +0000 (11:41 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Jul 2011 11:41:45 +0000 (11:41 +0000)
bug #84135: new CPass0 code - calibration and OCDB update

PWG1/CalibMacros/Pass0/makeOCDB.C

index 9c8edd2..0a35515 100644 (file)
@@ -5,7 +5,7 @@
   ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD
 
   Example:
-  .L $ALICE_ROOT/ANALYSIS/CalibMacros/MergeCalibration/makeOCDB.C
+  .L $ALICE_ROOT/PWG1/CalibMacros/Pass0/makeOCDB.C
   makeOCDB("105160");
 
 */
@@ -49,6 +49,12 @@ ocdbStorage+="?se=ALICE::CERN::SE";
   // Make vdrift calibration
   //proces.CalibTimeVdrift("CalibObjects.root",runNumber,AliCDBRunRange::Infinity(),ocdbStorage);
   proces.CalibTimeVdrift("CalibObjects.root",runNumber,runNumber,ocdbStorage);
+  //
+  // TOF part
+  //
+  AliTOFAnalysisTaskCalibPass0 calibTask;
+  Printf("Calibrating TOF");
+  calibTask.ProcessOutput("CalibObjects.root", ocdbStorage);
 
 
   // TRD part
@@ -57,20 +63,21 @@ ocdbStorage+="?se=ALICE::CERN::SE";
   procestrd.Init("CalibObjects.root");
   Int_t versionVdriftUsed = procestrd.GetVersionVdriftUsed();
   Int_t subversionVdriftUsed = procestrd.GetSubVersionVdriftUsed();
-  procestrd.SetCalDetVdrift(GetCalDetVdrift(runNumber,versionVdriftUsed,subversionVdriftUsed));
-         
-  procestrd.SetMinStatsVdriftT0PH(600*10);
-  procestrd.SetMinStatsVdriftLinear(60);
-  procestrd.SetMinStatsGain(600);
-  
-  procestrd.CalibVdriftT0("CalibObjects.root",runNumber,runNumber,ocdbStorage);
-  procestrd.CalibGain("CalibObjects.root",runNumber,runNumber,ocdbStorage);
-  
-  // TOF part
-  AliTOFAnalysisTaskCalibPass0 calibTask;
-  Printf("Calibrating TOF");
-  calibTask.ProcessOutput("CalibObjects.root", ocdbStorage);
+  if(versionVdriftUsed != 0) {
+
+    procestrd.SetCalDetVdrift(GetCalDetVdrift(runNumber,versionVdriftUsed,subversionVdriftUsed));
 
+    if(caldet) {
+      
+      procestrd.SetMinStatsVdriftT0PH(600*10);
+      procestrd.SetMinStatsVdriftLinear(60);
+      procestrd.SetMinStatsGain(600);
+      
+      procestrd.CalibVdriftT0("CalibObjects.root",runNumber,runNumber,ocdbStorage);
+      procestrd.CalibGain("CalibObjects.root",runNumber,runNumber,ocdbStorage);
+      procestrd.CalibChamberStatus(runNumber,runNumber,ocdbStorage);
+    }
+  }
   return;
 }