Default OCDB path as an argument for the macro
[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
6# 2 - pattern
7# 3 - OCDB output path
e32aadf3 8# [4 - default OCDB]
27eb9bff 9
10# example:
4c8432c7 11# mergeMakeOCDB.sh /alice/cern.ch/user/a/aliprod/CPass0/output/ 000120691 alien://folder=/alice/cern.ch/user/a/aliprod/CPass0/output
27eb9bff 12
13#ALIEN setting
14# $1 = directory where to perform the find
15# $2 = pattern
16# $3 = OCDB path
17
e32aadf3 18# if fourth argument given, its the default OCDB, otherwise use the default raw://
19defaultOCDB="raw://"
20[[ $# -eq 4 ]] && defaultOCDB=$4
21
27eb9bff 22if [ -f Run0_999999999_v3_s0.root ]; then
23 mkdir -p TPC/Calib/Correction
24 mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
25fi
26
27echo ">>>>>>> Running AliRoot to merge calib objects found in $1 with pattern AliESDfriends_v1.root"
28aliroot -l -b -q merge.C\(\"$1\",\"AliESDfriends_v1.root\"\) 2>&1 | tee merge.log
29mv syswatch.log syswatch_merge.log
30
31echo ">>>>>>> Extract OCDB entries for run = $2, to be stored in $3"
e32aadf3 32aliroot -l -b -q makeOCDB.C\(\"$2\",\"$3\",\"$defaultOCDB\"\) 2>&1 | tee ocdb.log
27eb9bff 33mv syswatch.log syswatch_makeOCDB.log