Changeset 7460 for trunk/MagicSoft/Mars
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 52 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7459 r7460 21 21 2006/01/10 Daniela Dorner 22 22 23 * datacenter/macros/buildsequenceentries.C, checkfileavail.C, 24 checkstardone.C, doexclusions.C, fillcalib.C, filldotraw.C, 25 filldotrbk.C, filldotrun.C, fillganymed.C, fillsignal.C, 26 fillsinope.C, fillstar.C, findcacofiles.C, getdolist.C, 27 insertcacofile.C, insertdataset.C, insertdate.C, 28 insertsequence.C, resetallruns.C, resetcolumn.C, setstatus.C, 29 setupdb.C, writesequencefile.C: 23 * datacenter/macros/*.C, datacenter/script: 30 24 - updated and added documentation 25 - improved logging 26 - fixed small bugs 31 27 32 28 -
trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/checkstardone.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/createdataset.C
r7232 r7460 18 18 ! Author(s): Daniela Dorner, 06/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/doexclusions.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/fillcalib.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/filldotrbk.C
r7459 r7460 18 18 ! Author(s): Thomas Bretz, 08/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/filldotrun.C
r7459 r7460 19 19 ! Author(s): Thomas Bretz, 08/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C
r7459 r7460 18 18 ! Author(s): Thomas Bretz, 08/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 04/2005 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/fillsinope.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 04/2005 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 521 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! … … 32 32 // 33 33 // Sometimes the DAQ aborts a run and starts itself a new one. In this cases 34 // the re's thecamera controll doesn't start a new file, as the command to34 // the camera controll doesn't start a new file, as the command to 35 35 // start a new run was not sent by the central control. So the caco 36 36 // information is stored in the previous caco file, which has a different -
trunk/MagicSoft/Mars/datacenter/macros/getdolist.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/insertcacofile.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! … … 32 32 // 33 33 // Sometimes the DAQ aborts a run and starts itself a new one. In this cases 34 // the re's thecamera controll doesn't start a new file, as the command to34 // the camera controll doesn't start a new file, as the command to 35 35 // start a new run was not sent by the central control. So the caco 36 36 // information is stored in the previous caco file, which has a different -
trunk/MagicSoft/Mars/datacenter/macros/insertdataset.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/insertdate.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/insertsequence.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r7437 r7460 19 19 ! Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 521 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/macros/resetallruns.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/resetcolumn.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/setstatus.C
r7459 r7460 18 18 ! Author(s): Daniela Dorner, 01/2005 <mailto:dorner@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2006 21 21 ! 22 22 ! -
trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C
r7459 r7460 19 19 ! Author(s): Daniela Dorner, 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2006 22 22 ! 23 23 ! -
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the building of sequences for all days for which 28 # this step is needed. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then the sequences are built for each date in the todolist using the 33 # macro buildsequenceentries.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 52 61 makedir $getstatuslogpath >> $scriptlog 2>&1 53 62 63 # check if script is already running 54 64 date > $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1 55 65 checklock0=$? … … 57 67 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 58 68 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 59 echo "-> getting list forbuildsequenceentries is running -> exit" >> $scriptlog 2>&169 echo "-> buildsequenceentries is running -> exit" >> $scriptlog 2>&1 60 70 date >> $scriptlog 2>&1 61 71 exit;; … … 63 73 esac 64 74 65 66 echo "getting list..." >> $scriptlog 2>&175 # get todo list 76 echo "getting todo list..." >> $scriptlog 2>&1 67 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'` 68 78 69 79 case $check0 in 70 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;; 71 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 80 1) echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 72 86 esac 73 87 88 # retrieve dates from todofile 74 89 dates=(`cat $todofile`) 75 76 90 if [ "$dates" = "" ] 77 91 then … … 84 98 85 99 echo "dates: "${dates[@]} >> $scriptlog 2>&1 86 87 100 for date in ${dates[@]} 88 101 do … … 95 108 96 109 case $check1 in 97 1) echo "check1=$check1 -> everything ok -> setting status ..." >> $scriptlog 2>&1110 1) echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1 98 111 setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2 99 112 makedir $setstatuslogpath >> $scriptlog 2>&1 … … 102 115 case $check2 in 103 116 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;; 104 *) echo "check2=$check2 -> ERROR -> step could not be set " >> $scriptlog 2>&1;;117 *) echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;; 105 118 esac 106 119 ;; 107 *) echo "check1=$check1 -> ERROR - > step has to be repeated" >> $scriptlog 2>&1;;120 *) echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;; 108 121 esac 109 122 done -
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the checking of the availability of the files for 28 # the sequences. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each sequence the availability of the files (raw, cc, caco) is 33 # checked by using the macro checkfilesavail.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 51 60 cd $mars 52 61 53 if [ -e $todofile ] 54 then 55 echo "checkfilesforsequenceavail is already running -> exit" >> $scriptlog 2>&1 56 exit 57 fi 62 # check if script is already running 63 date > $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1 64 checklock0=$? 65 case $checklock0 in 66 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkfileavail is running -> exit" >> $scriptlog 2>&1 69 date >> $scriptlog 2>&1 70 exit;; 71 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 72 esac 58 73 74 # get todo list 59 75 echo "getting list..." >> $scriptlog 2>&1 60 76 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 62 78 case $check0 in 63 79 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 64 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; 80 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 81 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1 83 date >> $scriptlog 2>&1 84 exit;; 65 85 esac 66 86 87 # retrieve sequences from todofile 67 88 sequences=(`cat $todofile`) 68 69 89 if [ "$sequences" = "" ] 70 90 then 71 91 echo "nothing to do -> exit" >> $scriptlog 2>&1 72 92 rm -v $todofile >> $scriptlog 2>&1 73 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&193 rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1 74 94 date >> $scriptlog 2>&1 75 95 exit … … 77 97 78 98 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 79 80 99 for sequence in ${sequences[@]} 81 100 do … … 107 126 108 127 rm -v $todofile >> $scriptlog 2>&1 109 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&1128 rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1 110 129 111 130 date >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the checking of the availability of the files for 28 # the datasets. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each dataset the sequences are extracted from the datasetfile 33 # and for each sequence the availability of the star files checked by using 34 # the macro checkstardone.C 35 # If this was successful, the status is inserted into the database using 36 # the macro setstatus.C 27 37 # 28 38 … … 42 52 scriptlogpath=$logpath/run/checkstardone/`date +%Y/%m/%d` 43 53 makedir $scriptlogpath 44 45 54 scriptlog=$scriptlogpath/checkstardone-$datetime.log 46 55 … … 51 60 cd $mars 52 61 62 # check if script is already running 63 date > $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 64 checklock0=$? 65 case $checklock0 in 66 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkstardone is running -> exit" >> $scriptlog 2>&1 69 date >> $scriptlog 2>&1 70 exit;; 71 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 72 esac 53 73 54 if [ -e $todofile ] 55 then 56 echo "checkstardone is already running -> exit" >> $scriptlog 2>&1 57 exit 58 fi 59 74 # get todo list 60 75 echo "getting list..." >> $scriptlog 2>&1 61 76 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 63 78 case $check0 in 64 79 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 65 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; 80 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 81 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 83 date >> $scriptlog 2>&1 84 exit;; 66 85 esac 67 86 68 87 datasets=(`cat $todofile`) 69 70 88 if [ "$datasets" = "" ] 71 89 then 72 90 echo "nothing to do -> exit" >> $scriptlog 2>&1 73 91 rm -v $todofile >> $scriptlog 2>&1 74 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&192 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 75 93 date >> $scriptlog 2>&1 76 94 exit … … 78 96 79 97 echo "datasets: "${datasets[@]} #>> $scriptlog 2>&1 80 81 98 for dataset in ${datasets[@]} 82 99 do … … 123 140 124 141 rm -v $todofile >> $scriptlog 2>&1 125 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&1142 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 126 143 127 144 date >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/copyscript
r7456 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # … … 27 27 # 28 28 # This script handles the subsystem logfiles, which are copied every 29 # day automatically from pc15 in La Palma to /data/MAGIC/transfer/ in30 # Wuerzburg29 # day automatically from /local/ on pc15 in La Palma to 30 # /home/lapalma/transfer/ on coma in the datacenter in Wuerzburg 31 31 # The structure in this directory is: subsystem/date/logfile.* 32 32 # The logfiles are from CC (*.rep, CC*.dbg, CC*.rbk, CC*.rep, CC*.run, 33 # CC*.run.html) and Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt) 34 # AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt) are not copied 35 # every day automatically 33 # CC*.run.html), Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt) 34 # AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt) 36 35 # 37 36 # the script performs the following steps: … … 40 39 # using the macros filldotrbk.C and filldotrun.C 41 40 # - copying all logfiles to the correct directory: 42 # /Period*/subsystem/date/file.* 43 # (the period for each date is obtained by the macro getperiod.C) 44 # - filling the sequences for the standard analysis into the database 45 # (for each day of which a file was copied) 46 # 41 # /subsystemdata/subsystem/YYYY/MM/DD/file.* 42 # - building the sequences for the standard analysis in the database 43 # (for each day of which a file was copied) 44 # - if a new catalogfile has been copied, it is installed as standard in the 45 # setup directory /magic/datacenter/setup and the new lines are sent to 46 # the adresses specified in the script 47 47 # 48 48 # -- to make sure that no file is copied twice there's a textfile … … 66 66 transdir=/home/lapalma/transfer 67 67 char=28 68 #extern=MAGIC@virgo:/data/MAGIC/transfer69 68 datetime=`date +%F-%H-%M-%S` 70 69 … … 76 75 date >> $scriptlog 2>&1 77 76 77 # check if the script is already running 78 78 date > $lockpath/lock-copyscript.txt >> $scriptlog 2>&1 79 79 checklock0=$? … … 87 87 esac 88 88 89 # rsync new dc with virgo90 #rsync -av $extern/ $transdir >> $scriptlog 2>&191 92 89 cd $transdir 93 90 94 91 #check the checksums, write output into file 95 92 md5sum -c .checksums | tee $transdir/.check >> $scriptlog 2>&1 96 #md5sum -c $transdir/checksums-test >| $transdir/.check 93 97 94 if ! test -e $transdir/.check 98 95 then … … 113 110 #dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_*[0-1][0-9]_*[0-3][0-9] | grep -v '.tgz'` 114 111 dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_[0-1][0-9]_[0-3][0-9] | grep -v '.tgz'` >> $scriptlog 2>&1 115 116 112 if [ "$dates" = "" ] 117 113 then … … 123 119 124 120 echo "dates found: "$dates >> $scriptlog 2>&1 125 126 121 #loop over dates 127 122 for date in ${dates[@]} … … 138 133 139 134 date2=`echo $date | sed -e 's/_/\//g'` 140 # echo "date2=$date2"141 135 copylogpath=$logpath/copyscript/$date2 142 136 echo "copylogpath: "$copylogpath >> $scriptlog 2>&1 … … 148 142 echo "file: "$file >> $scriptlog 2>&1 149 143 filename=`basename $file` 150 # echo "filename: "$filename151 144 152 145 #check for each file whether it has to be processed … … 179 172 1) echo "checkfillrun=$checkfillrun -> everything ok " >> $scriptlog 2>&1 180 173 echo "-> insert date in SequenceBuildStatus for $date" >> $scriptlog 2>&1 181 # date3=`echo $date | sed -e 's/_/-/g'` 182 # echo "date3=$date3" 174 183 175 checkinsertdate=`root -q -b $macrospath/insertdate.C+\("\"$date\""\) | tee $copylogpath/insertdate-$date-log.txt | grep int | sed -e 's/(int)//'` 184 176 case $checkinsertdate in … … 224 216 225 217 rm -v $transdir/.check >> $scriptlog 2>&1 226 227 #rsync -av $transdir/ $extern >> $scriptlog 2>&1228 #rsync -av --delete $transdir/ $extern >> $scriptlog 2>&1229 218 230 219 -
trunk/MagicSoft/Mars/datacenter/scripts/correcttime
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script runs the timing correction for all run, that need the timing 28 # correction 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each run the timing correction is done 33 # If this was successful, the status is inserted into the database using 34 # the macro setstatus.C 35 # 36 # This script was needed for the data between 06/2004 and 02/2005 (including 37 # this months). 27 38 # 28 39 … … 56 67 esac 57 68 69 # retrieving runs from todo file 58 70 runs=(`cat $listpath/ToDo-$table-$column.txt`) 59 60 71 if [ "$runs" = "" ] 61 72 then … … 66 77 67 78 echo "runs: "${runs[@]} 68 69 79 for run in ${runs[@]} 70 80 do … … 80 90 timecorrpath=$outpath"/timecorrlogs" 81 91 echo "timecorrpath: "$timecorrpath 82 make 92 makedir $timecorrpath 83 93 84 94 check1=0 -
trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck
r7329 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the datacheck for all runs, which are not yet 28 # checked 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each run the following steps are done: 33 # - filldotraw.C 34 # - sinope (once for data and once for calibration events) 35 # - fillsinope 36 # - reset ExclusionsDone, so that the result from the datacheck can be 37 # taken into account when doexclusions is running the next time 38 # If this was successful, the status is inserted into the database using 39 # the macro setstatus.C 27 40 # 28 41 … … 46 59 scriptlogpath=$logpath/run/dodatacheck/`date +%Y/%m` 47 60 makedir $scriptlogpath 48 49 61 scriptlog=$scriptlogpath/dodatacheck-$datetime.log 50 62 … … 53 65 makedir $getstatuslogpath >> $scriptlog 2>&1 54 66 67 # check if there are already todo files 55 68 echo "checking if other todo-files are there" >> $scriptlog 2>&1 56 69 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 57 70 then 58 71 echo "other file(s) on disk " >> $scriptlog 2>&1 59 echo " -> choose one file and start calibrating" >> $scriptlog 2>&172 echo " -> choose one file and start datacheck " >> $scriptlog 2>&1 60 73 else 61 74 date > $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1 … … 70 83 esac 71 84 72 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 73 then 74 echo "other file(s) on disk " >> $scriptlog 2>&1 75 echo " -> choose one file and start datacheck" >> $scriptlog 2>&1 76 else 77 echo "getting list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 79 80 case $check0 in 81 1) echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 83 esac 84 fi 85 echo "getting list..." >> $scriptlog 2>&1 86 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 87 88 case $check0 in 89 1) echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;; 90 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 91 esac 85 92 rm -v $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1 86 93 fi 87 94 88 95 96 # finding a todo file 89 97 nr=bla 90 98 echo "finding the right todo-file" >> $scriptlog 2>&1 … … 92 100 93 101 echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1 94 95 102 for todofile in ${todofiles[@]} 96 103 do … … 120 127 121 128 129 # get run(s) from todo file 122 130 runs=(`cat $todofile`) 123 124 131 if [ "$runs" = "" ] 125 132 then … … 131 138 fi 132 139 140 # processing run(s) 133 141 echo "runs: "${runs[@]} >> $scriptlog 2>&1 134 135 142 for run in ${runs[@]} 136 143 do … … 143 150 date=`find /magic/data/rawfiles/ -name *${run}_[D,P,C,S]_*_E.raw | cut -c 22-31` 144 151 echo "date: "$date >> $scriptlog 2>&1 152 # for sinope the date is needed in the format YYYY-MM-DD 145 153 date2=`echo $date | sed -e 's/\//-/g'` 146 154 echo "date2: "$date2 >> $scriptlog 2>&1 147 155 156 # running filldotraw 148 157 filldotrawpath=$logpath/filldotraw/$date 149 158 makedir $filldotrawpath >> $scriptlog 2>&1 … … 160 169 esac 161 170 171 # running sinope 162 172 sinopepath=$datapath/sinope/$date 163 173 makedir $sinopepath >> $scriptlog 2>&1 … … 183 193 done 184 194 195 # running fillsinope 185 196 fillsinopepath=$logpath/fillsinope/$date 186 197 makedir $fillsinopepath >> $scriptlog 2>&1 … … 191 202 192 203 case $check3 in 193 1) echo "check3=$check3 -> everything ok -> set exclusions..." >> $scriptlog 2>&1204 1) echo "check3=$check3 -> everything ok -> set status..." >> $scriptlog 2>&1 194 205 ;; 195 206 *) echo "check3=$check3 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 … … 197 208 esac 198 209 199 echo "resetting the status for fExclusions done for date $date2" >> $scriptlog 2>&1 210 # resetting the status for exclusions 211 echo "resetting the status for fExclusionsDone for date $date2" >> $scriptlog 2>&1 200 212 resetlogpath=$logpath/resetexclusions/$date 201 213 echo "resetlogpath: $resetlogpath" >> $scriptlog 2>&1 … … 212 224 esac 213 225 226 # set status 214 227 echo "inserting the status for the datacheck for run $run into the db" >> $scriptlog 2>&1 215 228 setstatuslogpath=$logpath/setstatus/datacheck/$date -
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the excluding of runs for all days for which 28 # this step is needed. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then the run are excluded for each date in the todolist using the 33 # macro doexclusions.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 46 55 scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m` 47 56 makedir $scriptlogpath 48 49 57 scriptlog=$scriptlogpath/doexclusions-$datetime.log 50 58 … … 53 61 makedir $getstatuslogpath >> $scriptlog 2>&1 54 62 63 # check if the script is already running 55 64 date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1 56 65 checklock0=$? … … 64 73 esac 65 74 66 75 # get the todo list 67 76 echo "getting list..." >> $scriptlog 2>&1 68 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 70 79 case $check0 in 71 80 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;; 72 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 73 86 esac 74 87 75 88 dates=(`cat $todofile`) 76 77 89 if [ "$dates" = "" ] 78 90 then … … 84 96 fi 85 97 98 # do exclusions for each date in the todo file 86 99 echo "dates: "${dates[@]} >> $scriptlog 2>&1 87 88 100 for date in ${dates[@]} 89 101 do -
trunk/MagicSoft/Mars/datacenter/scripts/doqualityplots
r7407 r7460 20 20 # Author(s): Daniela Dorner 08/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script produces the qualityplots in the web by executing the macro 28 # plotdb.C 29 # 30 # After checking, if the script is already running, the plots are produced 31 # (ps and root file). Then they are moved to the webdirectory and there png 32 # files are produced from the ps file. 27 33 # 28 34 … … 43 49 date >> $scriptlog 2>&1 44 50 51 # check if script is already running 45 52 lockfile=$lockpath/lock-doqualityplots.txt 46 53 date > $lockfile >> $scriptlog 2>&1 … … 55 62 esac 56 63 57 64 # producing the plots with the values from the database 58 65 echo "producing plots: " >> $scriptlog 2>&1 59 66 check0=`root -q -b $macrospath/plotdb.C+\(\) | tee -a $scriptlog | grep int | sed -e 's/.*(int)//'` … … 66 73 esac 67 74 68 75 # making files available in the web 69 76 webpath=/www/htdocs/datacenter/datacheck 70 77 name=plotdb … … 74 81 mv -v $name.{root,ps} $webpath >> $scriptlog 2>&1 75 82 76 echo " moving files: " >> $scriptlog 2>&183 echo "producing png files: " >> $scriptlog 2>&1 77 84 pstoimg -antialias -flip r270 -density 100 -type png -multipage $psfile >> $scriptlog 2>&1 78 85 -
trunk/MagicSoft/Mars/datacenter/scripts/dowebplots
r7454 r7460 20 20 # Author(s): Daniela Dorner 08/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script produces the plots from all root-files in the web directory 28 # 29 # After checking, if the script is already running, the plots are produced: 30 # With the programm showplot a ps-file is written, from which the png 31 # files are produced. 27 32 # 28 33 … … 44 49 date >> $scriptlog 2>&1 45 50 51 # check if script is already running 46 52 lockfile=$lockpath/lock-dowebplots.txt 47 53 date > $lockfile >> $scriptlog 2>&1 … … 69 75 exit 70 76 fi 71 72 77 73 78 #produce plots for each rootfile … … 115 120 #make sure, that old plots of files, that are already removed from disk, 116 121 # are deleted also in the webdirectory 117 #this has to be done, as ps and png files are excluded from rsync, 118 #as rsync is done with --delete option (script /home/operator/condor/webupdate 122 #this has to be done, as ps and png files are excluded from rsync, and 123 #as rsync is done with --delete option (script /home/operator/condor/webupdate) 119 124 120 125 #find all directories with plots -
trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # 27 # This script checks which files are on disk and updates the database 28 # accordingly. It is not yet running automatically. 29 # 30 # It is checking the: 31 # - ccfiles 32 # - cacofiles 33 # this includes also the search for missing cacofiles: 34 # Sometimes the DAQ aborts a run and starts itself a new one. In this 35 # cases the camera controll doesn't start a new file, as the command to 36 # start a new run was not sent by the central control. So the caco 37 # information is stored in the previous caco file, which has a 38 # different runnumber. To be able to merpp the information into the 39 # calibrated data file, the runnumber of the file containing the 40 # information has to be found. 41 # In this script the search and inserting into the database is done 42 # using the macros findcacofiles.C and insertcacofile.C 43 # - rawfiles 44 # The update in the database is done using the macro resetallruns.C 45 # 28 46 29 47 user=`whoami` … … 39 57 40 58 echo "checking disk for ccfiles..." 41 42 59 filename=$filesondisklogpath/ccfilesondisk-$date.txt 43 60 column=fCCFileAvail 44 45 61 find $subsystemdir/cc/ -name '*_S.rep' | cut -d_ -f2 > $filename 46 47 62 48 63 echo "resetting runs..." … … 55 70 56 71 57 58 72 echo "checking disk for cacofiles..." 59 60 73 filename=$filesondisklogpath/cacofilesondisk-$date.txt 61 74 column=fCaCoFileAvail 62 63 75 find $subsystemdir/caco/ -name '*.txt' | cut -d_ -f8 | grep [0-9] > $filename 64 65 76 66 77 echo "resetting runs..." … … 71 82 *) echo "check0=$check0 -> ERROR -> something went wrong while resetting";; 72 83 esac 73 74 75 84 76 85 echo "checking missing cacofiles..." … … 83 92 84 93 missingcacoruns=(`cat $filesondisklogpath/findcacofiles-$date.txt`) 85 86 94 for missingcacorun in ${missingcacoruns[@]} 87 95 do … … 121 129 122 130 123 124 131 echo "checking disk for rawfiles..." 125 126 132 filename=$filesondisklogpath/rawfilesondisk-$date.txt 127 133 column=fRawFileAvail 128 129 134 find $datapath -name '*.raw' | cut -d_ -f2 > $filename 130 135 -
trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the filling of the results from the calibration for 28 # all sequences of which the results are not yet in the database. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each sequence in the todo list the calibration results are 33 # filled into the table Calibration in the database using the macros 34 # fillcalib.C and fillsignal.C 35 # If this was successful, the status is inserted into the database using 36 # the macro setstatus.C 27 37 # 28 38 … … 44 54 scriptlogpath=$logpath/run/fillcallisto/`date +%Y/%m/%d` 45 55 makedir $scriptlogpath 46 47 56 scriptlog=$scriptlogpath/runfillcallisto-$datetime.log 48 57 … … 53 62 cd $mars 54 63 64 # check if the script is already running 55 65 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 56 66 checklock0=$? … … 64 74 esac 65 75 76 # get todo file 66 77 echo "getting list..." >> $scriptlog 2>&1 67 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 69 80 case $check0 in 70 81 1) echo "check0=$check0 -> everything ok -> run fillcallisto" >> $scriptlog 2>&1;; 71 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 83 rm -v $todofile >> $scriptlog 2>&1 84 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 85 date >> $scriptlog 2>&1 86 exit;; 72 87 esac 73 88 74 89 sequences=(`cat $todofile`) 75 76 90 if [ "$sequences" = "" ] 77 91 then … … 83 97 fi 84 98 99 # fill information into the database for all sequences in the todo file 85 100 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 86 87 101 for sequence in ${sequences[@]} 88 102 do -
trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
r7340 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the filling of the results of ganymed into the db 28 # for all datasets of which the results are not yet in the database. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each dataset in the todo list the ganymed results are filled 33 # into the table Ganymed in the database using the macro fillganymed.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 52 61 cd $mars 53 62 63 # check if script is already running 54 64 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 55 65 checklock0=$? … … 63 73 esac 64 74 75 # get todo list 65 76 echo "getting list..." >> $scriptlog 2>&1 66 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 68 79 case $check0 in 69 80 1) echo "check0=$check0 -> everything ok -> run fillganymed" >> $scriptlog 2>&1;; 70 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 71 86 esac 72 87 88 # retrieve datasets from todo file 73 89 datasets=(`cat $todofile`) 74 75 90 if [ "$datasets" = "" ] 76 91 then … … 82 97 fi 83 98 99 # run fillganymed for datasets 84 100 echo "datasets: "${datasets[@]} >> $scriptlog 2>&1 85 86 101 for dataset in ${datasets[@]} 87 102 do … … 110 125 esac 111 126 ;; 112 *) 127 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 113 128 esac 114 129 done -
trunk/MagicSoft/Mars/datacenter/scripts/fillstar
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the filling of the results of star into the db 28 # for all sequences of which the results are not yet in the database. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each sequence in the todo list the star results are filled 33 # into the table Star in the database using the macro fillstar.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 52 61 cd $mars 53 62 63 # check if the script is already running 54 64 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 55 65 checklock0=$? … … 63 73 esac 64 74 75 # get todo list 65 76 echo "getting list..." >> $scriptlog 2>&1 66 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 68 79 case $check0 in 69 80 1) echo "check0=$check0 -> everything ok -> run fillstar" >> $scriptlog 2>&1;; 70 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 71 86 esac 72 87 88 # retrieve sequences from todo file 73 89 sequences=(`cat $todofile`) 74 75 90 if [ "$sequences" = "" ] 76 91 then … … 82 97 fi 83 98 99 # run fillstar for sequences 84 100 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 85 86 101 for sequence in ${sequences[@]} 87 102 do -
trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
r7337 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the inserting of the datasets into the db. 28 # 29 # Extract information (dataset number, source name, comment, observation 30 # mode) from dataset file and insert it into the database in the table 31 # DataSets using the macro insertdataset.C 27 32 # 28 33 … … 55 60 esac 56 61 57 62 # get all datasetfiles 58 63 datasetfiles=(`ls $datasetpath/*/*`) 59 64 echo "datasetfiles: "${datasetfiles[@]} >> $scriptlog 2>&1 60 65 echo "" >> $scriptlog 2>&1 61 66 67 # extract information from dataset file and insert it into db with the macro insertdataset.C 62 68 for datasetfile in ${datasetfiles[@]} 63 69 do 70 # get datasetnumber from filename 64 71 no=`echo $datasetfile | cut -d/ -f5 | cut -c8-99 | cut -d. -f1` 72 # get datasetnumber from file and get it with 8 digits 65 73 no2=`grep 'AnalysisNumber:' $datasetfile | sed -e 's/AnalysisNumber://g' | sed -e 's/ //g'` 66 74 no3=`printf %08d $no2` 75 # compare the two datasetnumber 76 # continue only if number is the same 67 77 if [ "$no" = "$no3" ] 68 78 then … … 73 83 continue 74 84 fi 85 # get source name, comment and observation mode from dataset file 75 86 source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'` >> $scriptlog 2>&1 76 87 comment=`grep 'Comment:' $datasetfile | sed -e 's/Comment://g'` >> $scriptlog 2>&1 … … 94 105 insertdatasetlog=$insertdatasetpath/insertdataset-$no3.log 95 106 107 # insert information into db 96 108 check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\""\,"\"$comment\""\,kFALSE\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'` 97 109 case $check0 in -
trunk/MagicSoft/Mars/datacenter/scripts/insertsequences
r7370 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the inserting of sequences into the db. 28 # It is not used in the automatic processing of data, but only for 29 # inserting of manual written sequences. 27 30 # 31 # Find manual written sequence files and insert information into the 32 # database using the macro insertsequence.C 33 # 28 34 29 35 user=`whoami` … … 44 50 date >> $scriptlog 2>&1 45 51 52 # check if script is already running 46 53 date > $lockpath/lock-insertsequences.txt >> $scriptlog 2>&1 47 54 checklock0=$? … … 55 62 esac 56 63 57 64 # finding manual written sequence files (marked by the comment '#manually changed') 58 65 sequencefiles=(`grep -R '#manually changed' $sequpath/ | cut -c 1-42`) 59 66 echo "sequencefiles: "${sequencefiles[@]} >> $scriptlog 2>&1 60 67 echo "" >> $scriptlog 2>&1 61 68 69 # process sequencefiles: insert information into the database 62 70 for sequencefile in ${sequencefiles[@]} 63 71 do -
trunk/MagicSoft/Mars/datacenter/scripts/linkmc
r7453 r7460 20 20 # Author(s): Daniela Dorner 12/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is linking the montecarlo files from the original structure 28 # to a structure from which the files can be processed more easily with the 29 # automatic analysis. 30 # This script is not yet running automatically. 31 # 32 # original structure: 33 # /montecarlo/camera/ 34 # 35 # new structure: 36 # /montecarlo/rawfiles/YYYY/MM/DD/file.root 37 # more explanation concerning the file structure can be found in the file 38 # /montecarlo/rawfiles/README.txt 39 # 40 # First the data files are linked and then in each new directory also the 41 # pedestal and calibration file is linked. 27 42 # 28 43 … … 38 53 date >> $scriptlog 2>&1 39 54 55 # check if script is already running 40 56 lockfile=$lockpath/lock-mclinks.txt 41 57 date > $lockfile >> $scriptlog 2>&1 … … 50 66 esac 51 67 52 53 68 mccampath=/montecarlo/camera 54 69 mcpath=/montecarlo/rawfiles … … 57 72 readme=$mcpath/README.txt #file in which the information about the modes is redirected to have always an updated explanation 58 73 74 # check if file with next runnumber is available 59 75 if ! ls $next >> $scriptlog 2>&1 60 76 then … … 64 80 fi 65 81 66 date >| $readme 2>&1 67 68 82 83 # observation modes 69 84 modes=("" "Gammawobble+" "Gammanowobble0" "GammawobbleHE+" "GammanowobbleHE0" "Gammawobble0" "GammawobbleHE0" "Gammadiffuse0" "Protonnowobble0" ) 70 71 85 #be carful: 72 86 # w- not yet foreseen in this script 73 87 88 # print information and explanation of structure into README.txt 89 date >| $readme 2>&1 74 90 echo "" >> $readme 2>&1 75 91 echo "Explanation for the structure in which the mc files are linked" >> $readme 2>&1 … … 218 234 done 219 235 220 221 236 rm -v $lockfile >> $scriptlog 2>&1 222 237 … … 225 240 date >> $scriptlog 2>&1 226 241 227 -
trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
r7281 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script links a special callisto.rc for data, for which the 28 # calibration with the standard callisto.rc failes. 29 # 30 # The sequences with failing calibration are searched by searching for the 31 # reason of failure in the callisto.log Then the special callisto.rc is 32 # linked to the directory of the sequence. 27 33 # 28 34 … … 41 47 date >> $scriptlog 2>&1 42 48 49 # check if script is already running 43 50 lockfile=$lockpath/lock-making-callisto-links.txt 44 51 date > $lockfile >> $scriptlog 2>&1 … … 53 60 esac 54 61 55 62 # reason why calibration with standard callisto.rc fails 56 63 reason="Pulse is too much to the right, cannot go beyond logain limits!" 57 64 echo "reason: "$reason >> $scriptlog 2>&1 58 65 66 # find files containing reason 59 67 files=`find $datapath/callisto -name callisto*.log` 60 68 69 # make links for callisto.rc for which the callisto.log contains reason 61 70 for file in $files 62 71 do -
trunk/MagicSoft/Mars/datacenter/scripts/mcsequences
r7448 r7460 20 20 # Author(s): Daniela Dorner 12/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # 27 # This script is an intermediate solution to process the montecarlo files. 28 # As soon as the montecarlo database is running, this script shall be 29 # exchanged. 30 # 31 # The script is building one sequence per directory. As the files are 32 # structured by condition, the files in one directory and such in one 33 # sequence have the same observation mode, psf, zbin, ... 34 # 28 35 29 36 user=`whoami` … … 38 45 date >> $scriptlog 2>&1 39 46 47 # check if script is already running 40 48 lockfile=$lockpath/lock-mcsequences.txt 41 49 date > $lockfile >> $scriptlog 2>&1 … … 54 62 mcsequpath=/montecarlo/sequences 55 63 64 # find montecarlo directories, build one sequence per directory and write sequence file 56 65 dirs=`find $mcpath -type d` 57 58 66 for dir in ${dirs[@]} 59 67 do -
trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 # 27 # This script is moving the rawfiles from the directory 28 # /magic/datacenter/fromtape/rawdata to the structure 29 # /magic/data/rawfiles/YYYY/MM/DD 30 # 26 31 27 32 umask 0002 28 33 34 # change permission for files 35 # perhaps needed as the tapes are read by the user tape 29 36 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* 30 37 # output for chmod with -v or -c (only changes) 38 # for files transferes via internet perhaps also needed for user lapalma 31 39 40 # find rawfiles 32 41 rawfiles=`find /magic/datacenter/fromtape/rawdata/ -name '*.*'` 33 34 42 for rawfile in $rawfiles 35 43 do 36 # echo "file: "$rawfile44 # workaround for rawfiles with wrong timing 37 45 # newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'` 38 46 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 39 # echo "new file: "$newrawfile40 47 newdir=`dirname $newrawfile` 41 # echo "newdir: "$newdir42 48 if [ ! -d $newdir ] 43 49 then … … 47 53 48 54 mv -v $rawfile $newrawfile 49 50 55 done 51 56 -
trunk/MagicSoft/Mars/datacenter/scripts/movingsubsystemfiles
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 # 27 # This script is moving the subsystemfiles from the directory 28 # /magic/datacenter/fromtape to the structure 29 # /magic/subsystemdata/subsystem/YYYY/MM/DD 30 # 26 31 27 32 umask 0002 28 33 34 # change permission for files 35 # perhaps needed as the tapes are read by the user tape 29 36 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/{ccdata,cacodata,amc,daqlog}/* 30 37 38 # find subsystem files 31 39 subsysfiles=`find /magic/datacenter/fromtape/ccdata/ -name '*.*'` 32 40 subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/daqlog/ -name '*.*'`) … … 34 42 subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/amc/ -name '*.*'`) 35 43 44 # moving subsystem files 36 45 for subsysfile in ${subsysfiles[@]} 37 46 do 38 # echo "file: "$subsysfile39 47 newsubsysfile=`echo $subsysfile | sed -e 's/datacenter\/fromtape/subsystemdata/g' -e 's/daqlog/daq__/g' -e 's/ccdata/cc/g' -e 's/cacodata/caco/g' -e 's/_/\//1' -e 's/_/\//1' -e 's/\/\///g'` 40 # echo "new file: "$newsubsysfile41 48 newdir=`dirname $newsubsysfile` 42 # echo "newdir: "$newdir43 49 if [ ! -d $newdir ] 44 50 then … … 48 54 49 55 mv -v $subsysfile $newsubsysfile 50 51 56 done 52 57 -
trunk/MagicSoft/Mars/datacenter/scripts/processmcsequences
r7448 r7460 20 20 # Author(s): Daniela Dorner 12/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is an intermediate solution to process the montecarlo files. 28 # As soon as the montecarlo database is running, this script shall be 29 # exchanged. 30 # 31 # The script is processing the montecarlo sequences: callisto and star 27 32 # 28 33 … … 38 43 date >> $scriptlog 2>&1 39 44 45 # check if script is already running 40 46 lockfile=$lockpath/lock-processmcsequences.txt 41 47 date > $lockfile >> $scriptlog 2>&1 … … 50 56 esac 51 57 52 53 58 mcpath=/montecarlo/rawfiles 54 59 mccalpath=/montecarlo/callisto … … 57 62 callistorc=$setuppath/callisto/callisto.rc 58 63 59 sequfiles=`find $mcsequpath -type f`60 61 64 cd $mars 62 65 66 # find montecarlo sequence files 67 sequfiles=`find $mcsequpath -type f` 63 68 for sequfile in ${sequfiles[@]} 64 69 do … … 69 74 makedir $caloutpath >> $scriptlog 2>&1 70 75 76 # continue with next sequence, if sequence is already processed 77 # or processing of sequence is just running 71 78 if ls $caloutpath/.done >> $scriptlog 2>&1 72 79 then 73 80 continue 74 81 fi 75 76 82 if ls $caloutpath/.doing >> $scriptlog 2>&1 77 83 then … … 79 85 fi 80 86 87 # lock file 81 88 touch $caloutpath/.doing 82 83 89 echo "processing sequ $sequfile" >> $scriptlog 2>&1 84 90 # find callisto.rc file 85 91 if [ -e $caloutpath/callisto.rc ] 86 92 then … … 92 98 callistorcseq=$caloutpath/callisto.rc 93 99 fi 94 100 # calibrate data 95 101 echo "./callisto -mc -f -b -q --ind=$mcpath/$date --log=$caloutpath/callisto$sequno.log --html=$caloutpath/callisto$sequno.html --out=$caloutpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null" >> $scriptlog 2>&1 96 102 ./callisto -mc -f -b -q --ind=$mcpath/$date --log=$caloutpath/callisto$sequno.log --html=$caloutpath/callisto$sequno.html --out=$caloutpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null 97 103 check1=$? 98 104 # if calibration worked -> run star for sequence 99 105 case $check1 in 100 106 0) echo "check1=$check1 -> everything ok..." >> $scriptlog 2>&1 … … 103 109 imgoutpath=$mccalpath/$no/$sequno 104 110 makedir $imgoutpath >> $scriptlog 2>&1 111 105 112 ./star -b -q -v4 -f -mc --log=$imgoutpath/star$sequno.log --html=$imgoutpath/star$sequno.html --ind=$caloutpath --out=$imgoutpath $sequfile 2>> $scriptlog> /dev/null 106 113 check2=$? … … 118 125 done 119 126 120 121 127 rm -v $lockfile >> $scriptlog 2>&1 122 128 -
trunk/MagicSoft/Mars/datacenter/scripts/rmlocks
r7452 r7460 20 20 # Author(s): Daniela Dorner 08/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is removing lock files which are older than 12 hours. 28 # 29 # Each process in the automatic analysis is writing a lock file. As these 30 # processes are launched with condor, they are stopped after 12 hours, if 31 # they are still running. In this case the lock files are not removed. 32 # 33 # By comparing the date of the lock file and the current date, the 34 # running time of a process is determined and if it is bigger than 12 35 # hours (which means that the process has been already kill by condor) the 36 # lock file is removed 27 37 # 28 38 -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is launching the calibration of sequences. 28 # 29 # In the case of calibration only one sequence is processed. Despite of 30 # that the structure of the script is such, that also more sequences could 31 # be processed. The restriction to one sequence has been made, as the 32 # calibration takes some time. There's one todo file per sequence. 33 # First the script searches for a todo file. Then the sequence from this 34 # todo file is calibrated and the merpp update is done. 35 # 36 # the callisto.rc files are stored in the setup directory 27 37 # 28 38 … … 32 42 set -C 33 43 44 # define callisto.rc files 34 45 callistorcnew=$setuppath/callisto/callisto.rc 35 46 callistorcmarapr05=$setuppath/callisto/callisto_MarApr05.rc … … 56 67 cd $mars 57 68 69 # get todo file 58 70 echo "checking if other todo-files are there" >> $scriptlog 2>&1 59 71 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 … … 73 85 esac 74 86 75 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 76 then 77 echo "other file(s) on disk " >> $scriptlog 2>&1 78 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 79 else 80 echo "getting list..." >> $scriptlog 2>&1 81 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 82 83 case $check0 in 84 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;; 85 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 86 esac 87 fi 87 echo "getting list..." >> $scriptlog 2>&1 88 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 89 90 case $check0 in 91 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;; 92 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 93 rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1 94 date >> $scriptlog 2>&1 95 exit;; 96 esac 88 97 rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1 89 98 fi 90 99 91 100 # choose todo file 92 101 nr=bla 93 102 echo "finding the right todo-file" >> $scriptlog 2>&1 94 103 todofiles=`ls -r $listpath/ToDo-$table-$column-*` 95 96 #echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&197 104 98 105 for todofile in ${todofiles[@]} … … 122 129 esac 123 130 131 # get sequence(s) from todo file 124 132 sequences=(`cat $todofile`) 125 126 133 if [ "$sequences" = "" ] 127 134 then … … 133 140 fi 134 141 142 # run calibration for sequence(s) 135 143 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 136 137 144 for sequence in ${sequences[@]} 138 145 do … … 146 153 echo "sequfile: "$sequfile >> $scriptlog 2>&1 147 154 155 # find callisto.rc file 148 156 if [ -e $outpath/callisto.rc ] 149 157 then … … 167 175 case $check1 in 168 176 0) echo "check1=$check1 -> everything ok -> doing update..." >> $scriptlog 2>&1 177 # running merpp update if calibration worked 178 # finding files, which have to be updated 169 179 echo "finding files to be updated" >> $scriptlog 2>&1 170 180 calfiles=`find $outpath -name *_Y_* ` … … 179 189 makedir $merpplogpath >> $scriptlog 2>&1 180 190 191 # updated calibrated data files with the information from the cc and caco files 181 192 for calfile in ${calfiles[@]} 182 193 do 183 194 echo "calfile: "$calfile >> $scriptlog 2>&1 195 # find cc and caco file 196 # if file is missing continue with next sequence 184 197 runno=`echo $calfile | cut -d_ -f2 | sed -e 's/^0//' | sed -e 's/^0//' | sed -e 's/^0//' ` 185 198 ccfile=`find /magic/subsystemdata/cc/ -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep` … … 232 245 done 233 246 247 # set status for calibration if merpp updates are also done 234 248 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 235 249 setstatuslogpath=$logpath/setstatus/callisto/$no -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is launching ganymed for datasets. 28 # 29 # In the case of ganymed only one dataset is processed. Despite of 30 # that the structure of the script is such, that also more datasets could 31 # be processed. The restriction to one dataset has been made, as ganymed 32 # takes some time. There's one todo file per dataset. 33 # First the script searches for a todo file. Then ganymed is run for the 34 # dataset from this todo file. 35 # 36 # the ganymed.rc files are stored in the setup directory 27 37 # 28 38 … … 45 55 scriptlogpath=$logpath/run/ganymed/`date +%Y/%m/%d` 46 56 makedir $scriptlogpath 47 48 57 scriptlog=$scriptlogpath/runganymed-$datetime.log 49 58 … … 54 63 cd $mars 55 64 65 # check if getting of list is already running 56 66 date > $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1 57 67 checklock0=$? … … 65 75 esac 66 76 77 # finding todo file 67 78 echo "checking if other todo-files are there" >> $scriptlog 2>&1 68 79 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 … … 82 93 rm -v $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1 83 94 95 # choosing todo file 84 96 nr=bla 85 97 echo "finding the right todo-file" >> $scriptlog 2>&1 86 98 todofiles=`ls $listpath/ToDo-$table-$column-*` 87 88 #echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&189 99 90 100 for todofile in ${todofiles[@]} … … 114 124 esac 115 125 116 126 # retrieve dataset from todo file 117 127 datasets=(`cat $todofile`) 118 119 128 if [ "$datasets" = "" ] 120 129 then … … 126 135 fi 127 136 137 # run ganymed for dataset 128 138 echo "datasets: "${datasets[@]} >> $scriptlog 2>&1 129 130 139 for dataset in ${datasets[@]} 131 140 do … … 138 147 datasetfile="$datasetpath/$no/dataset$no2.txt" 139 148 echo "datasetfile: "$datasetfile >> $scriptlog 2>&1 149 # get observation mode to choose ganymed.rc file 140 150 wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 141 151 wobble2=`echo $wobble | grep ^\#` >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is launching star for sequence. 28 # 29 # In the case of star only one sequence is processed. Despite of 30 # that the structure of the script is such, that also more sequences could 31 # be processed. The restriction to one sequence has been made, as star 32 # takes some time. There's one todo file per sequence. 33 # First the script searches for a todo file. Then star is run for the 34 # sequence from this todo file. 35 # 36 # the star.rc files are taken from the mars directory 27 37 # 28 38 … … 53 63 cd $mars 54 64 65 # check if getting of list is already running 55 66 date > $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1 56 67 checklock0=$? … … 64 75 esac 65 76 77 # finding todo file 66 78 echo "checking if other todo-files are there" >> $scriptlog 2>&1 67 79 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 … … 81 93 rm -v $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1 82 94 95 # choosing todo file 83 96 nr=bla 84 97 echo "finding the right todo-file" >> $scriptlog 2>&1 85 98 todofiles=`ls $listpath/ToDo-$table-$column-*` 86 87 #echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&188 99 89 100 for todofile in ${todofiles[@]} … … 114 125 115 126 127 # retrieve sequence from todo file 116 128 sequences=(`cat $todofile`) 117 118 129 if [ "$sequences" = "" ] 119 130 then … … 125 136 fi 126 137 138 # run star for sequence 127 139 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 128 129 140 for sequence in ${sequences[@]} 130 141 do -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7233 r7460 20 20 # Author(s): Daniela Dorner 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This a resource file for the scripts, in which the standard paths and 28 # functions, which are needed more often are stored. 27 29 # 28 30 -
trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the writing of the sequence files for all sequences 28 # for which this step is needed. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then the sequence file is written for each sequence in the todolist using 33 # the macro writesequencefile.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 52 61 cd $mars 53 62 63 # check if script is already running 54 64 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 55 65 checklock0=$? … … 63 73 esac 64 74 75 # get todo list 65 76 echo "getting list..." >> $scriptlog 2>&1 66 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 68 79 case $check0 in 69 80 1) echo "check0=$check0 -> everything ok -> run writesequencefiles" >> $scriptlog 2>&1;; 70 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 71 86 esac 72 87 88 # get sequences from todo file 73 89 sequences=(`cat $todofile`) 74 75 90 if [ "$sequences" = "" ] 76 91 then … … 82 97 fi 83 98 99 # write sequence file for all sequences in todo file 84 100 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 85 86 101 for sequence in ${sequences[@]} 87 102 do
Note:
See TracChangeset
for help on using the changeset viewer.