download_parallel.sh 1.13 KB
Newer Older
Gernot Maier's avatar
Gernot Maier committed
1
2
3
4
5
6
#!/bin/bash
#
# simple script which allows to download
# all particle types simulatenously
#

Gernot Maier's avatar
Gernot Maier committed
7
# Prod5 NSB 1x
Gernot Maier's avatar
Gernot Maier committed
8
DD="Prod5_Paranal_AdvancedBaseline_NSB1x"
Gernot Maier's avatar
Gernot Maier committed
9
10
11
# Prod4b SST production
DD="Prod4b_Paranal"

Gernot Maier's avatar
Gernot Maier committed
12
ZE="20deg"
Gernot Maier's avatar
Gernot Maier committed
13
DL="DL0"
Gernot Maier's avatar
Gernot Maier committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

mkdir -p tmp_log

for P in proton gamma_cone gamma_onSource electron
do
     if [[ ${P} == "gamma_cone" ]]; then
         PP="gamma-diffuse"
     elif [[ ${P} == "gamma_onSource" ]]; then
         PP="gamma"
     else
         PP=${P}
     fi

     for A in North South
     do
         rm -f tmp_log/${P}_${A}.log
Gernot Maier's avatar
Gernot Maier committed
30
31
32
33
34
35
36
37
38
39
40
41
42
         # Prod4b SST production
         if [[ $DD = *"Prod4"* ]]; then
            if [[ $A == "South" ]]; then
               continue
            fi
            for S in "sst-astri" "sst-astri+chec-s" 
            do
                FFLIST="${DD}_${ZE}/${DD}_${PP}_${A}_${ZE}_SSTOnly_${S}_${DL}.GRID.list"
                ./getRawFilesFromGRID-DIRAC.sh ${FFLIST} ${DD}/${P}/ 100 &> tmp_log/${P}_${A}_${S}.log &
            done
         else
            ./getRawFilesFromGRID-DIRAC.sh ${DD}/${DD}_${PP}_${A}_${ZE}_${DL}.GRID.list ${DD}/${P}/ 100 &> tmp_log/${P}_${A}.log &
         fi
Gernot Maier's avatar
Gernot Maier committed
43
44
45
         sleep 10
     done
done