]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/calibPassX/runTrainPassX.sh
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / TPC / scripts / calibPassX / runTrainPassX.sh
1 #
2 # Sequence of steps to test Pass0 and PassX reconstruction/calibration which run on GRID 
3 # by default               
4
5 # Semi automatic test performed on the batch farm
6 # Important features:
7 # 1. Parsing of the log files                           
8 # 2. Parsing stack traces
9    
10 # author:  marian.ivanov@cern.ch
11
12
13 #
14 # 0. copy a template setup
15 #   To be modified if necessary
16 #  "standard scripts
17 cp $ALICE_ROOT/ANALYSIS/macros/runCalibTrain.C  .
18 #  scipts to run  on batch farm
19 cp $ALICE_ROOT/TPC/scripts/calibPassX/recPass0GSI.C   rec.C 
20 cp $ALICE_ROOT/TPC/scripts/calibPassX/runPassX.sh     .
21 cp $ALICE_ROOT/TPC/scripts/calibPassX/submitPass0.sh  .
22 cp $ALICE_ROOT/TPC/scripts/calibPassX/runPassXJob.sh  .
23
24 cp ../lists/run.list .
25 cp ../lists/raw.list .
26
27 #
28 # 1. Make workspace - directory structure with run and raw lists 
29 #
30 $ALICE_ROOT/TPC/scripts/makeWorkspace.sh run.list 
31 #
32 # 1.a clean the workspace all
33 #
34 find `pwd` | grep AliESD  | xargs rm
35 find `pwd` | grep out     | xargs rm
36 find `pwd` | grep log     | xargs rm
37 #
38 # 1.b clean workscpace  - rm root files if not tags found
39 #
40 find `pwd` | grep AliESDs.root > esd.txt
41 for efile in `cat esd.txt`; do
42     dname=`dirname $efile` 
43     status=`ls $dname/*tag.root`; 
44     echo  CHECK  $efile $status
45     if [ -z $status ]; then 
46       echo NON OK  rm -r $dname/*.root
47       rm -r $dname/*.root
48     else
49       echo IS OK $status
50     fi; 
51 done
52
53 #
54 # 2. Run reconstruction/calibration
55 #
56 bgroup=/recPass0/`pwd | xargs basename`
57 bgadd $bgroup
58 nEvents=500000
59 submitPass0.sh run.list "alice-t3_8h -g  $bgroup" $nEvents | tee  submit.log
60
61
62 #
63 # 3. Run merging - run level
64 #
65 for arun in `cat run.list`; do
66     cd $arun
67     find `pwd`/ | grep AliESDfriends_v1.root > calib.list
68     echo bsub -q alice-t3_8h  -o outMerge.log  aliroot -b -q  $ALICE_ROOT/ANALYSIS/macros/mergeCalibObjects.C
69     bsub -q alice-t3_8h -o outMerge.log aliroot -b -q  $ALICE_ROOT/ANALYSIS/macros/mergeCalibObjects.C
70     cd ../
71 done;
72
73 #
74 # 4. Merge all
75 #
76 ls `pwd`/*/CalibObjects.root  > calib.list
77 aliroot -b -q  $ALICE_ROOT/ANALYSIS/macros/mergeCalibObjects.C
78
79 #
80 # 5. filter reconstruction  logs, make statistic of problems
81 #
82 mkdirhier logs/reco
83 cd  logs/reco
84 find `pwd`/../../ | grep rec.log > errRec.log
85 $ALICE_ROOT/TPC/scripts/filterRecLog.sh
86 cd ../..
87
88 #
89 # 6. filter calibration  logs, make statistic of problems
90 #
91 mkdirhier logs/calib
92 cd  logs/calib
93 find `pwd`/../../ | grep calib.log > errRec.log
94 $ALICE_ROOT/TPC/scripts/filterRecLog.sh
95 cd ../..
96
97
98 #
99 # 7. filter debug streamer
100 #
101 mkdir debug
102 cd debug
103 find  `pwd`/../*/ | grep V6 | grep .root  > debugall.txt
104 cat  debugall.txt | grep calibTimeDebug > timeitstpc.txt
105
106
107
108