]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/CalibMacros/MergeCalibration/makeOCDBTPC.C
Updating macro to perform merging.
[u/mrichter/AliRoot.git] / ANALYSIS / CalibMacros / MergeCalibration / makeOCDBTPC.C
diff --git a/ANALYSIS/CalibMacros/MergeCalibration/makeOCDBTPC.C b/ANALYSIS/CalibMacros/MergeCalibration/makeOCDBTPC.C
new file mode 100644 (file)
index 0000000..89bac07
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+    Make OCDB entries for the calibration using tracks:
+    The specific storage is set in the STEERING macro.
+
+
+    void makeOCDBTPC(Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity(),TString inputFile="CalibObjects.root",TString ocdbStorage)
+    Example:
+
+    .L makeOCDBTPC.C 
+    makeOCDBTPC(0, AliCDBRunRange::Infinity(), "CalibObjects.root","");
+
+*/
+
+
+
+void makeOCDBTPC(Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity(),TString inputFile="CalibObjects.root", TString ocdbStorage=""){
+  //
+  //
+  //
+  gSystem->Load("libSTEER");
+  gSystem->Load("libANALYSIS");
+  gSystem->Load("libSTAT");
+  gSystem->Load("libTPCcalib");
+  gROOT->LoadMacro("CalibTimeVdrift.C");
+  gROOT->LoadMacro("CalibTimeGain.C");
+  if (ocdbStorage.Length()==0) ocdbStorage+="local://"+gSystem->GetFromPipe("pwd")+"/OCDB";
+  //
+  // Make gain calibration
+  //
+  TFile fcalib(inputFile.Data());
+  //
+  //
+  //
+  CalibTimeGain(inputFile.Data(), startRun,endRun,ocdbStorage);
+  //
+  // Make vdrift calibration
+  //
+  CalibTimeVdrift(inputFile.Data(),startRun,AliCDBRunRange::Infinity(),ocdbStorage);
+}