1 #######################################################################
3 # Run train commands locally:
4 # marian.ivanov@cern.ch
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 #######################################################################
11 ########################################################################
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 .
18 ln -sf ~/.balice64HEAD0108 balice.sh
19 #use your favourite aliroot
20 ln -sf $HOME/alienSetup.sh alienSetup.sh
22 cp $ALICE_ROOT/TPC/scripts/submitCalibJob.sh .
23 cp ../lists/run.list .
24 cp ../lists/esd.list .
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:
33 $ALICE_ROOT/TPC/scripts/makeWorkspace.sh run.list
36 ###########################################################################
37 # 1. Get list of missing
40 $ALICE_ROOT/TPC/scripts/filterMissing.sh
41 ###########################################################################
44 $ALICE_ROOT/TPC/scripts/filterCorrupted.sh alice-t3_8h
45 cat */esd*.txt.Bad > esdBad.txt
46 cat */esd*.txt.Good > esdGood.txt
49 ###########################################################################
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`
58 $ALICE_ROOT/TPC/scripts/submitCalib.sh run.list "alice-t3 -g $bgroup -c 3:00 " 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 ###################################################################
66 # 4. Check the error and out log
68 find `pwd`/*/err* > errRec.log
69 #find `pwd`/*/out* > outRec.log
70 $ALICE_ROOT/TPC/scripts/filterRecLog.sh
72 ###################################################################
74 # 5. Submitting merging
76 ##################################################################
77 ##################################################################
78 bgroup=/merge/`pwd | xargs basename`
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
83 ###################################################################
85 # 6. resubmit missing if neccessary
86 # e.g if the lists were updated
88 # time restriction 3 hours
89 ##################################################################
90 bgroup=/recalib/`pwd | xargs basename`
92 $ALICE_ROOT/TPC/scripts/resubmitMissing.sh run.list "alice-t3 -c 3:00 -g $bgroup" 5
95 #$ALICE_ROOT/TPC/scripts/resubmitMissing.sh runLaser.list alice-t3 5
98 ###################################################################
100 # 7. Merge separatelly sub run list
101 ##################################################################
103 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh run.list
104 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag05.list
105 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag02.list
106 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMag0.list
109 ls -d mergerunMag0*.list > runMagAll.list
110 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMagAll.list
112 echo mergerunMag02.list >runMagN0.list
113 echo mergerunMag05.list >>runMagN0.list
114 $ALICE_ROOT/TPC/scripts/mergeCalibRun.sh runMagN0.list
118 # filter debug streamers
122 for a in `cat $rlist`; do
123 ls `pwd`/$a/*/*.root >> debug$rlist
128 ls | grep Run| sed s_Run__| sed s/_/\ /| gawk ' { print $1} '