Update master to aliroot
[u/mrichter/AliRoot.git] / TPC / scripts / resubmitMissing.sh
CommitLineData
05e3ee70 1# marian.ivanov@cern.ch
2# Paramters:
3# 1 - runlist
4# 2 - batch queues
5# 3 - number of chunks per calibration job
6# 0. Find runs with esd but missing calibration
1d980c30 7# Example:
8# $ALICE_ROOT/TPC/scripts/resubmitMissing.sh run.list alice-t3 10
05e3ee70 9
10runlist=$1
11bqueue=$2
12nchunks=$3
13echo runlist" "$runlist
14echo bqueue" "$bqueue
15echo nchunks" "$nchunks
16
17wdir=`pwd`
18rm runMissing.list
19touch runMissing.list
20for adir in `cat $runlist`; do
21 cd $wdir/$adir
22 nesd=`cat $wdir/esd$adir.txt| grep -c root`
23 if [ $nesd -gt 0 ] ; then
24 ncalib=`find $wdir/$adir/ | grep -c CalibObjects`
25 if [ $ncalib -lt 1 ] ; then
26 echo Missing $adir
27 echo $adir >> $wdir/runMissing.list
28 fi;
29 fi;
30 cd $wdir
31done;
32#
33# 1. Delete the content of directory
34#
35wdir=`pwd`
36for a in `cat runMissing.list`; do
37 rm -rf $a;
38done;
39#
40# 2. Redo directory structure for missing
41#
42$ALICE_ROOT/TPC/scripts/makeWorkspace.sh runMissing.list
43
44#
45# 3. Sumbmit calibration jobs for mssing directories
46#
3b9b13ee 47$ALICE_ROOT/TPC/scripts/submitCalib.sh runMissing.list "$bqueue" $nchunks
05e3ee70 48