]>
Commit | Line | Data |
---|---|---|
a45764d9 | 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: | |
054d9070 | 8 | # recCPass1.C - reconstruction macro |
a45764d9 | 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: | |
054d9070 | 16 | # runCPass1.sh raw.root 50 104892 |
a45764d9 | 17 | |
18 | #ALIEN setting | |
19 | # $1 = raw input filename | |
20 | runNum=`echo $1 | cut -d "/" -f 6` | |
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 | |
054d9070 | 36 | echo runCPass1.sh Input arguments |
a45764d9 | 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 | |
054d9070 | 57 | echo ">>>>>>>>> recCPass1.C is..." |
58 | #cat recCPass1.C | |
a45764d9 | 59 | echo |
60 | ||
61 | echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..." | |
62 | ||
054d9070 | 63 | aliroot -l -b -q recCPass1.C\(\""$fileName\", $nEvents, \"$ocdbPath"\"\) 2>&1 | tee rec.log |
a45764d9 | 64 | mv syswatch.log syswatch_rec.log |
65 | ||
66 | echo ">>>>>>> Running AliRoot to make calibration..." | |
67 | aliroot -l -b -q runCalibTrain.C\(\""$runNum\",\"AliESDs.root\",\"$ocdbPath"\"\) 2>&1 | tee calib.log | |
68 | mv syswatch.log syswatch_calib.log |