]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/CalibMacros/CPass0/runCPass0.sh
CPass0/AddTaskTPCCalib.C - adding higher level calibration
[u/mrichter/AliRoot.git] / PWGPP / CalibMacros / CPass0 / runCPass0.sh
CommitLineData
27eb9bff 1#!/bin/bash
2
3# Script to run:
4# 1. reconstruction
a6168b42 5# 2. calibration
27eb9bff 6#
7# Files assumed to be in working directory:
4c8432c7 8# recCPass0.C - reconstruction macro
27eb9bff 9# runCalibTrain.C - calibration/filtering macro
10# Arguments (run locally):
11# 1 - raw data file name
12# 2 - number of events to be processed
13# 3 - run number
a6168b42 14# 4 - OCDBPath
15# 5 - optional trigger mask
27eb9bff 16# example:
a6168b42 17# runCPass0.sh raw.root 50 104892 raw://
27eb9bff 18
19#ALIEN setting
20# $1 = raw input filename
25e2b4b3 21runNum=`echo $1 | cut -d "/" -f 6 | sed 's/^0*//'`
27eb9bff 22if [ $# -eq 1 ] ; then
23 # alien Setup
24 nEvents=99999999
25 fileName="alien://"$1
26 ocdbPath="raw://"
a6168b42 27 triggerOption="?Trigger=kCalibBarrel"
27eb9bff 28fi;
a6168b42 29if [ $# -ge 4 ] ; then
27eb9bff 30 # local setup
a6168b42 31 fileName=$1
27eb9bff 32 nEvents=$2
33 runNum=$3
27eb9bff 34 ocdbPath=$4
a6168b42 35 triggerOption="?Trigger=kCalibBarrel"
36fi
37if [ $# -eq 5 ] ; then
38 # local setup in case we provide the trigger mask
39 # the trigger mask is first stripped of quotation characters
40 triggerOption=${5//\"/}
27eb9bff 41fi
42
43echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
4c8432c7 44echo runCPass0.sh Input arguments
27eb9bff 45echo fileName=$fileName
46echo nEvents=$nEvents
47echo runNum=$runNum
48echo ocdbPath=$ocdbPath
a6168b42 49echo triggerOption=$triggerOption
27eb9bff 50echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
51
52if [ -f Run0_999999999_v3_s0.root ]; then
53 mkdir -p TPC/Calib/Correction
54 mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
55fi
56
57
58
59echo File to be processed $1
60echo Number of events to be processed $nEvents
61
62echo ">>>>>>>>> PATH is..."
63echo $PATH
64echo ">>>>>>>>> LD_LIBRARY_PATH is..."
65echo $LD_LIBRARY_PATH
4c8432c7 66echo ">>>>>>>>> recCPass0.C is..."
67#cat recCPass0.C
27eb9bff 68echo
69
70echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..."
71
a6168b42 72aliroot -l -b -q "recCPass0.C(\"$fileName\", $nEvents, \"$ocdbPath\", \"$triggerOption\")" 2>&1 | tee rec.log
27eb9bff 73mv syswatch.log syswatch_rec.log
74
75echo ">>>>>>> Running AliRoot to make calibration..."
cd9dc5c7 76aliroot -l -b -q runCalibTrain.C\(\""$runNum\",\"AliESDs.root\",\"$ocdbPath"\"\) 2>&1 | tee calib.log
27eb9bff 77mv syswatch.log syswatch_calib.log