source: BAORadio/AmasNancay/submit2bqs-scaextractor.sh @ 540

Last change on this file since 540 was 540, checked in by campagne, 13 years ago

avoid the link to a specif bao daq date (jec)

File size: 1.8 KB
Line 
1#!/bin/sh -xvf
2DATE=/bin/date
3GREP=/bin/grep
4AWK=/bin/awk
5ECHO=/bin/echo
6WC=/usr/bin/wc
7CAT=/bin/cat
8PRINTF=/usr/bin/printf
9FIND=/usr/bin/find
10MKDIR=/bin/mkdir
11XARGS=/usr/bin/xargs
12SORT=/bin/sort
13RM=/bin/rm
14TR=/usr/bin/tr
15CP=/bin/cp
16LS=/bin/ls
17CHMOD=/bin/chmod
18
19#Process cmd line args: the -src option is mandatory (source name as Abell85)
20sourceRadio=
21while [ $# -gt 0 ]
22do
23  case "$1" in
24      -src)  sourceRadio=$2; shift;;
25        -h)
26            echo >&2 \
27            "usage: $0 -src souce"
28            exit 1;;
29        *)  break;;     # terminate while loop
30    esac
31    shift
32done
33
34#Path to public backupable path
35publicpath="/afs/in2p3.fr/home/c/campagne/public"
36
37
38#temporary files to synchronize scripts
39tmppublicpath=${TMPPUBLICPATH}
40$LS -l ${tmppublicpath} > /dev/null
41
42#Path of the utility scripts
43scriptpath="/afs/in2p3.fr/home/c/campagne/private/work/AmasNancay"
44
45#JEC 1/10/11 Use generic baodaqstatus name
46#the daq current irod status
47#tag=`${DATE} +%F`
48#OUT1=${publicpath}/baodaqstatus-${tag}.txt
49OUT1=${publicpath}/baodaqstatus-current.txt
50
51if [ ! -e ${OUT1}  -o ! -r ${OUT1} ]; then
52    $ECHO "FATAL (${scriptName}): ${OUT1} has a problem"
53    exit 1
54#    $ECHO "We should bring the DAQ status more up to date, this take 1 or 2sec..."
55#    $RM -f ${tmppublicpath}/statusdaq.finished
56#    ${scriptpath}/statusdaq.sh > ${OUT1}
57#    while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do
58#       sleep 30
59#    done
60#    $RM ${tmppublicpath}/statusdaq.finished
61#protect against remove/rewriting   
62#    $CHMOD -v 444 ${OUT1}
63fi
64
65jobBatchName="scaMaker-$sourceRadio"
66jobLogName="${jobBatchName}.log.$$"
67
68qsub -l u_sps_baoradio,u_irods,T=100000,M=256MB,scratch=700MB,platform=LINUX -eo -o $jobLogName -N $jobBatchName -mb -me -mu campagne@lal.in2p3.fr <<EOF
69/afs/in2p3.fr/home/c/campagne/private/work/AmasNancay/scaextractor.sh  $sourceRadio
70EOF
Note: See TracBrowser for help on using the repository browser.