]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/runTrainBatch.sh
mergeCalibRun.sh - merge result of calibration - over several runs
[u/mrichter/AliRoot.git] / TPC / scripts / runTrainBatch.sh
1 #######################################################################
2 #
3 # Run train commands at GSI: 
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 $ALICE_ROOT/TPC/CalibMacros/alienSetupGSI.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 $ALICE_ROOT/TPC/scripts/filterMissing.sh
40 ####################################################################################
41 # 2. Filter corrupted 
42 #
43 $ALICE_ROOT/TPC/scripts/filterCorrupted.sh alice-t3_8h
44 cat  */esd*.txt.Bad > esdBad.txt 
45 cat  */esd*.txt.Good > esdGood.txt 
46
47
48 ####################################################################################
49 # 3. Run calibration: 
50 #    You have to wait until the lists are filtered
51 #    Only Afterwards you should process with calibration submission
52 #     Submitting calibration
53 #
54 $ALICE_ROOT/TPC/scripts/submitCalib.sh run.list alice-t3 50
55 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 2
56 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 5
57 #$ALICE_ROOT/TPC/scripts/submitCalib.sh run90000.list alice-t3 10
58
59
60 ###################################################################
61 #
62 # 4. Check the error and out log
63
64 find `pwd`/*/err*  > errRec.log
65 find `pwd`/*/out*  > outRec.log
66 $ALICE_ROOT/TPC/scripts/filterRecLog.sh
67
68 ###################################################################
69 #
70 # 5. Submitting merging
71 #
72 $ALICE_ROOT/TPC/scripts/submitMerging.sh run.list alice-t3_8h
73
74 ###################################################################
75
76 # 6. resubmit missing if neccessary
77 # e.g if the lists were updated
78 $ALICE_ROOT/TPC/scripts/resubmitMissing.sh  run.list alice-t3 10
79 #
80 #
81 #$ALICE_ROOT/TPC/scripts/resubmitMissing.sh  runLaser.list alice-t3 5
82
83
84
85
86
87
88
89
90
91
92 #
93 # Merge mag field data
94 #
95 mydir=`pwd`
96 mkdir mergeMag
97 cd  mergeMag
98 rm mergeTrain1.txt
99 rm mergeTrain2.txt
100 touch mergeTrain1.txt
101 touch mergeTrain2.txt
102 for adir in `cat ../../lists/runMag*s.list`; do
103 ls $mydir/$adir/CalibObjectsTrain1.root >> mergeTrain1.txt;
104 ls $mydir/$adir/CalibObjectsTrain2.root >> mergeTrain2.txt;
105 done;
106 aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain1.root\",10000,\"mergeTrain1.txt\"\)
107 aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain2.root\",10000,\"mergeTrain2.txt\"\)
108 cd ..
109 #
110 #
111 # Merge mag 0
112 #
113 mydir=`pwd`
114 mkdir mergeMag0
115 cd  mergeMag0
116 rm mergeTrain1.txt
117 rm mergeTrain2.txt
118 touch mergeTrain1.txt
119 touch mergeTrain2.txt
120 for adir in `cat ../../lists/runMag0.list`; do
121 ls $mydir/$adir/CalibObjectsTrain1.root >> mergeTrain1.txt;
122 ls $mydir/$adir/CalibObjectsTrain2.root >> mergeTrain2.txt;
123 done;
124 aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain1.root\",10000,\"mergeTrain1.txt\"\) 
125 aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain2.root\",10000,\"mergeTrain2.txt\"\)
126 cd ..
127 #