]>
Commit | Line | Data |
---|---|---|
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 | 21 | runNum=`echo $1 | cut -d "/" -f 6 | sed 's/^0*//'` |
27eb9bff | 22 | if [ $# -eq 1 ] ; then |
23 | # alien Setup | |
24 | nEvents=99999999 | |
25 | fileName="alien://"$1 | |
26 | ocdbPath="raw://" | |
a6168b42 | 27 | triggerOption="?Trigger=kCalibBarrel" |
27eb9bff | 28 | fi; |
a6168b42 | 29 | if [ $# -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" |
36 | fi | |
37 | if [ $# -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 | 41 | fi |
42 | ||
43 | echo xxxxxxxxxxxxxxxxxxxxxxxxxxx | |
4c8432c7 | 44 | echo runCPass0.sh Input arguments |
27eb9bff | 45 | echo fileName=$fileName |
46 | echo nEvents=$nEvents | |
47 | echo runNum=$runNum | |
48 | echo ocdbPath=$ocdbPath | |
a6168b42 | 49 | echo triggerOption=$triggerOption |
27eb9bff | 50 | echo xxxxxxxxxxxxxxxxxxxxxxxxxxx |
51 | ||
52 | if [ -f Run0_999999999_v3_s0.root ]; then | |
53 | mkdir -p TPC/Calib/Correction | |
54 | mv Run0_999999999_v3_s0.root TPC/Calib/Correction/ | |
55 | fi | |
56 | ||
57 | ||
58 | ||
59 | echo File to be processed $1 | |
60 | echo Number of events to be processed $nEvents | |
61 | ||
62 | echo ">>>>>>>>> PATH is..." | |
63 | echo $PATH | |
64 | echo ">>>>>>>>> LD_LIBRARY_PATH is..." | |
65 | echo $LD_LIBRARY_PATH | |
4c8432c7 | 66 | echo ">>>>>>>>> recCPass0.C is..." |
67 | #cat recCPass0.C | |
27eb9bff | 68 | echo |
69 | ||
70 | echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..." | |
71 | ||
a6168b42 | 72 | aliroot -l -b -q "recCPass0.C(\"$fileName\", $nEvents, \"$ocdbPath\", \"$triggerOption\")" 2>&1 | tee rec.log |
27eb9bff | 73 | mv syswatch.log syswatch_rec.log |
74 | ||
75 | echo ">>>>>>> Running AliRoot to make calibration..." | |
cd9dc5c7 | 76 | aliroot -l -b -q runCalibTrain.C\(\""$runNum\",\"AliESDs.root\",\"$ocdbPath"\"\) 2>&1 | tee calib.log |
27eb9bff | 77 | mv syswatch.log syswatch_calib.log |