resubmitMissing.sh - resubmit calibration jobns for missing runs
[u/mrichter/AliRoot.git] / TPC / scripts / submitCalibJob.sh
1 #!/bin/sh
2
3 # 1 argument      - start file
4 # 2 argument      - number of files
5 # 3 argument      - input file list
6 # 4 argument      - run number used for ConfigOCDB
7
8 fstart=$1
9 fend=$2
10 cdbrun=$4
11 run=$4
12 echo $1   $2  $3 $4
13
14 echo Hallo world
15 echo Hostname $HOSTNAME
16 echo RUN $4
17 df /tmp
18 source ../balice.sh
19 source ../alienSetup.sh
20
21
22 mkdir $1_$2
23 cp *.C $1_$2 
24 cd $1_$2
25 cp $3 esd.txt
26
27 dname=`basename \`pwd\``
28 basename=`pwd`/${fstart}_${fend}
29 mkdirhier $basename
30 tmpname=/tmp/$USER/$run/$dname/${fstart}_${fend}
31 mkdirhier $tmpname
32 cp * $tmpname
33 ls -al $tmpname
34 cd $tmpname
35 echo Working directory  $tmpname
36
37
38 echo start aliroot
39 echo command aliroot -q -b CalibrateTPC.C\($fstart,$fend,$cdbrun\)
40 echo PWD `pwd`
41 echo 00000000000000000000000000000000000000000000000
42 echo Start job
43 echo Date  `date`
44 echo 00000000000000000000000000000000000000000000000
45 command aliroot  -q -b "CalibrateTPC.C($fstart,$fend,$cdbrun)"
46 echo 00000000000000000000000000000000000000000000000
47 echo Copy output
48 echo Date  `date`
49 echo 00000000000000000000000000000000000000000000000
50
51 rm *.root
52 cp -rf * $basename
53
54
55 echo 00000000000000000000000000000000000000000000000
56 echo End job
57 echo Date `date`
58 echo 00000000000000000000000000000000000000000000000
59 exit
60
61