]>
Commit | Line | Data |
---|---|---|
27eb9bff | 1 | #!/bin/bash |
2 | ||
3 | # Script to run: | |
4 | # 1. reconstruction | |
5 | # 2. calibration and friend track filtering | |
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 | |
14 | ||
15 | # example: | |
4c8432c7 | 16 | # runCPass0.sh raw.root 50 104892 |
27eb9bff | 17 | |
18 | #ALIEN setting | |
19 | # $1 = raw input filename | |
25e2b4b3 | 20 | runNum=`echo $1 | cut -d "/" -f 6 | sed 's/^0*//'` |
27eb9bff | 21 | if [ $# -eq 1 ] ; then |
22 | # alien Setup | |
23 | nEvents=99999999 | |
24 | fileName="alien://"$1 | |
25 | ocdbPath="raw://" | |
26 | fi; | |
27 | if [ $# -eq 4 ] ; then | |
28 | # local setup | |
29 | nEvents=$2 | |
30 | runNum=$3 | |
31 | fileName=$1 | |
32 | ocdbPath=$4 | |
33 | fi | |
34 | ||
35 | echo xxxxxxxxxxxxxxxxxxxxxxxxxxx | |
4c8432c7 | 36 | echo runCPass0.sh Input arguments |
27eb9bff | 37 | echo fileName=$fileName |
38 | echo nEvents=$nEvents | |
39 | echo runNum=$runNum | |
40 | echo ocdbPath=$ocdbPath | |
41 | echo xxxxxxxxxxxxxxxxxxxxxxxxxxx | |
42 | ||
43 | if [ -f Run0_999999999_v3_s0.root ]; then | |
44 | mkdir -p TPC/Calib/Correction | |
45 | mv Run0_999999999_v3_s0.root TPC/Calib/Correction/ | |
46 | fi | |
47 | ||
48 | ||
49 | ||
50 | echo File to be processed $1 | |
51 | echo Number of events to be processed $nEvents | |
52 | ||
53 | echo ">>>>>>>>> PATH is..." | |
54 | echo $PATH | |
55 | echo ">>>>>>>>> LD_LIBRARY_PATH is..." | |
56 | echo $LD_LIBRARY_PATH | |
4c8432c7 | 57 | echo ">>>>>>>>> recCPass0.C is..." |
58 | #cat recCPass0.C | |
27eb9bff | 59 | echo |
60 | ||
61 | echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..." | |
62 | ||
4c8432c7 | 63 | aliroot -l -b -q recCPass0.C\(\""$fileName\", $nEvents, \"$ocdbPath"\"\) 2>&1 | tee rec.log |
27eb9bff | 64 | mv syswatch.log syswatch_rec.log |
65 | ||
66 | echo ">>>>>>> Running AliRoot to make calibration..." | |
cd9dc5c7 | 67 | aliroot -l -b -q runCalibTrain.C\(\""$runNum\",\"AliESDs.root\",\"$ocdbPath"\"\) 2>&1 | tee calib.log |
27eb9bff | 68 | mv syswatch.log syswatch_calib.log |