]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/runTrainBatch.sh
CalibMacros/CalibTimeVdrift.C - Removed obsolete code
[u/mrichter/AliRoot.git] / TPC / scripts / runTrainBatch.sh
1 #######################################################################
2 #
3 # Run train commands locally: 
4 # marian.ivanov@cern.ch
5 #
6 # This is just pseudo code. Bellow you can find the sequence of steps
7 # to be done to run and update calibration using batch farm. 
8 #######################################################################
9
10
11 ########################################################################
12 # Make workspace
13 # This is just example (see $ALICE_ROOT/TPC/scripts/ReadmeTrain.txt)
14 ########################################################################
15 cp $ALICE_ROOT/TPC/macros/CalibrateTPC.C .
16 cp $ALICE_ROOT/TPC/macros/ConfigOCDB.C .
17 #modify ConfigOCDB.C
18 ln -sf ~/.balice64HEAD0108 balice.sh
19 #use your favourite aliroot
20 ln -sf $HOME/alienSetup.sh alienSetup.sh
21 #use your alien setup 
22 cp $ALICE_ROOT/TPC/scripts/submitCalibJob.sh .
23 cp ../lists/run.list .
24 cp ../lists/esd.list .
25
26
27 ####################################################################################
28 # 0. Create a list for each run - the superlist are located  in the lists directory
29 #    and make directory structure.  
30 #    To be in workspace dir:    
31 #      0.0 run.list 
32 #      0.1 esd.list
33 $ALICE_ROOT/TPC/scripts/makeWorkspace.sh run.list 
34
35
36 ###########################################################################
37 # 1. Get list of missing 
38 #
39 ##
40 $ALICE_ROOT/TPC/scripts/filterMissing.sh
41 ###########################################################################
42 # 2. Filter corrupted 
43 #
44 $ALICE_ROOT/TPC/scripts/filterCorrupted.sh alice-t3_8h
45 cat  */esd*.txt.Bad > esdBad.txt 
46 cat  */esd*.txt.Good > esdGood.txt 
47
48
49 ###########################################################################
50 # 3. Run calibration: 
51 #    You have to wait until the lists are filtered
52 #    Only Afterwards you should process with calibration submission
53 #     Submitting calibration
54 ################################################################## 
55 ################################################################## 
56 bgroup=/recalib/`pwd | xargs basename`
57 bgadd $bgroup
58 $ALICE_ROOT/TPC/scripts/submitCalib.sh run.list "alice-t3 -g $bgroup"  20
59 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 2
60 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 5
61 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run90000.list alice-t3 10
62 #$ALICE_ROOT/TPC/scripts/submitCalib.sh runMag05.list alice-t3 5
63 #$ALICE_ROOT/TPC/scripts/submitCalib.sh runMag02.list alice-t3 5
64 ###################################################################
65 #
66 # 4. Check the error and out log
67
68 find `pwd`/*/err*  > errRec.log
69 #find `pwd`/*/out*  > outRec.log
70 $ALICE_ROOT/TPC/scripts/filterRecLog.sh
71
72 ###################################################################
73 #
74 # 5. Submitting merging
75 #
76 ################################################################## 
77 ################################################################## 
78 bgroup=/merge/`pwd | xargs basename`
79 bgadd $bgroup
80 $ALICE_ROOT/TPC/scripts/submitMerging.sh run.list "alice-t3_8h -c 0:10" $bgroup
81 #$ALICE_ROOT/TPC/scripts/submitMerging.sh runMissing.list "alice-t3_8h -c 0:10" $bgroup
82
83 ###################################################################
84
85 # 6. resubmit missing if neccessary
86 # e.g if the lists were updated
87 # submit in groups
88 # time restriction 3 hours
89 ################################################################## 
90 bgroup=/recalib/`pwd | xargs basename`
91 bgadd $bgroup
92 $ALICE_ROOT/TPC/scripts/resubmitMissing.sh  run.list "alice-t3 -c 3:00  -g $bgroup"  10
93 #
94 #
95 #$ALICE_ROOT/TPC/scripts/resubmitMissing.sh  runLaser.list alice-t3 5
96
97
98 ###################################################################
99
100 # 7. Merge separatelly sub run list
101 ################################################################## 
102
103 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag05.list 
104 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag02.list
105 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag0.list
106    
107
108 ls -d mergerunMag0*.list > runMagAll.list
109 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMagAll.list
110 rm runMagN0.list
111 echo mergerunMag02.list >runMagN0.list
112 echo mergerunMag05.list >>runMagN0.list 
113 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMagN0.list
114
115
116 #
117 # filter debug streamers
118 #
119 rlist=runMag02.list
120 rm debug$rlist
121 for a in `cat $rlist`; do 
122     ls `pwd`/$a/*/*.root  >> debug$rlist
123 done 
124 #
125 #
126 #
127 ls | grep Run|  sed s_Run__| sed s/_/\ /| gawk ' { print $1} '