]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/CalibMacros/CPass0/mergeMakeOCDB.sh
Why the h*ll do we make a remote commit when pulling?
[u/mrichter/AliRoot.git] / PWGPP / CalibMacros / CPass0 / mergeMakeOCDB.sh
CommitLineData
27eb9bff 1#!/bin/bash
2
3# Script to merge objects coming out of the calibration train:
4# Arguments:
5# 1 - directory on which to look for the files to be merged
9e160db9 6# 2 - runNumber
27eb9bff 7# 3 - OCDB output path
e32aadf3 8# [4 - default OCDB]
27eb9bff 9
10# example:
9e160db9 11# mergeMakeOCDB.sh /alice/cern.ch/user/a/aliprod/CPass0/output/ 120691 alien://folder=/alice/cern.ch/user/a/aliprod/CPass0/output
27eb9bff 12
13#ALIEN setting
14# $1 = directory where to perform the find
9e160db9 15# $2 = runNumber
27eb9bff 16# $3 = OCDB path
17
9e160db9 18path=$1
d1c49c14 19runNumber=`echo "$2" | sed 's/^0*//'`
9e160db9 20outputOCDB=$3
21
e32aadf3 22# if fourth argument given, its the default OCDB, otherwise use the default raw://
23defaultOCDB="raw://"
9e160db9 24[[ -n $4 ]] && defaultOCDB=$4
25
27eb9bff 26if [ -f Run0_999999999_v3_s0.root ]; then
27 mkdir -p TPC/Calib/Correction
28 mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
29fi
30
9e160db9 31echo ">>>>>>> Running AliRoot to merge calib objects found in $path with pattern AliESDfriends_v1.root"
40f73007 32aliroot -l -b -q "merge.C(\"$path\",\"AliESDfriends_v1.root\")" 2>&1 | tee merge.log
27eb9bff 33mv syswatch.log syswatch_merge.log
34
9e160db9 35echo ">>>>>>> Extract OCDB entries for run = $runNumber, to be stored in $outputOCDB"
40f73007 36aliroot -l -b -q "makeOCDB.C($runNumber,\"$outputOCDB\",\"$defaultOCDB\")" 2>&1 | tee ocdb.log
27eb9bff 37mv syswatch.log syswatch_makeOCDB.log