Changeset 20103 for trunk/Mars/hawc/processing/DiskToDB/run-callisto2.sh
- Timestamp:
- 09/01/21 07:56:42 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/hawc/processing/DiskToDB/run-callisto2.sh
r20093 r20103 32 32 readonly STAR=star 33 33 # Directory to Mars environment (usually Mars/build) 34 readonly MARS="/home/frankm/Dateien/Mars /build/"34 readonly MARS="/home/frankm/Dateien/Mars-6.24.00/build4/" 35 35 # Absolut path to macros 36 readonly MACROS="/home/frankm/Dateien/Mars /hawc"36 readonly MACROS="/home/frankm/Dateien/Mars-6.24.00/hawc" 37 37 readonly PROGRAM=$0 38 38 REPLACE=false … … 60 60 if [ ! -d "${MARS}" ] 61 61 then 62 echo "Mars does not exists at ${MARS}. Please change in \ 62 echo "Mars does not exists at ${MARS}. Please change in \\ 63 63 script ${PROGRAM}." 64 64 exit 1 … … 68 68 if [ ! -d "${MACROS}" ] 69 69 then 70 echo "Macros directorey does not exists at ${MACROS}. Please change in \ 70 echo "Macros directorey does not exists at ${MACROS}. Please change in \\ 71 71 script ${PROGRAM}." 72 72 exit 1 … … 88 88 NIGHT="${4}" 89 89 90 function UpdateStatus() 91 { 92 local tel="${1}" 93 local night="${2}" 94 local runid="${3}" 95 local stat="${4}" 96 97 mysql --defaults-file=${CRED} \ 98 --compress \ 99 -e "UPDATE DataOnDisk \ 100 SET DataOnDisk.callisto = ${stat} \ 101 WHERE DataOnDisk.Telescope = ${tel} \ 102 AND DataOnDisk.NIGHT = ${night} \ 103 AND DataOnDisk.RUNID = ${runid};" 104 } 105 90 106 # Get all runs that can (and should) be calibrated 91 107 # Pipe the output to mysql and read the … … 94 110 "\ 95 111 SELECT 96 NIGHT, RUNID, DrsNight, DrsRunID 112 Calibration.NIGHT, 113 Calibration.RUNID, 114 Calibration.DrsNight, 115 Calibration.DrsRunID 97 116 FROM 98 117 Calibration 118 INNER JOIN 119 DataOnDisk 120 ON 121 DataOnDisk.Telescope = Calibration.Telescope 122 AND 123 DataOnDisk.NIGHT = Calibration.NIGHT 124 AND 125 DataOnDisk.RUNID = Calibration.RUNID 99 126 WHERE 100 Telescope=${TEL}127 Calibration.Telescope = ${TEL} 101 128 AND 102 NIGHT=${NIGHT} 129 Calibration.NIGHT = ${NIGHT} 130 AND 131 DataOnDisk.calibration = 0 103 132 ORDER BY 104 NIGHT,RUNID\133 Calibration.NIGHT, Calibration.RUNID\ 105 134 "\ 106 135 | mysql \ … … 161 190 162 191 # Execute the calibration and write output to log-file 163 root -b -q -l ${MACROS}/callisto.C'("'"${DATA}"/${DATPATH}/${DATNAME}'","'"${DATA}"/${DRSPATH}/${DRSNAME}'", "'"${OUT}"'")' \192 root -b -q -l ${MACROS}/callisto.C'("'"${DATA}"/${DATPATH}/${DATNAME}'","'"${DATA}"/${DRSPATH}/${DRSNAME}'", 0 ,"'"${OUT}"'")' \ 164 193 2>&1 | tee "${OUT}"/${PREFIX}.log 165 194 … … 176 205 if [ "${RC}" == "0" ] 177 206 then 178 touch "${OUT}"/.${PREFIX}.success 207 touch "${OUT}"/.${PREFIX}.success 208 else 209 UpdateStatus ${TEL} ${NIGHT} ${DATRUNID} 1 179 210 fi 180 211
Note:
See TracChangeset
for help on using the changeset viewer.