Changeset 17092 for trunk/DataCheck/Processing
- Timestamp:
- 09/06/13 15:50:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillAuxCurrents.sh
r16724 r17092 1 1 #!/bin/bash 2 2 3 # option 4 doupdate="yes" # update all entries (needed when new fields have been added) 5 #doupdate="no" # fill only entries which are not yet existing (default) 3 # option whether to fill all row or only those where information is missing 4 # $doupdate might be given as environment variable 5 if [ "$doupdate" = "" ] 6 then 7 doupdate="yes" # update all entries (needed when new fields have been added) 8 doupdate="no" # fill only entries which are not yet existing (default) 9 fi 6 10 7 11 source `dirname $0`/../Sourcefile.sh … … 21 25 fi 22 26 23 24 # get last 3, 6 or 9 nights 25 #dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \ 26 # `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \ 27 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \ 28 # ) 29 #dates=( `find -L $ziprawdata -mindepth 3 -type d | sort -r | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw 30 31 dates=("2013/05/08 2013/05/07 2013/05/06 2013/05/05 2013/05/04 2013/05/03 2013/05/02 2013/05/01 2013/04/30 2013/04/29 2013/04/28 2013/04/27 2013/04/22 2013/04/21 2013/04/20 2013/04/19 2013/04/18 2013/04/17 2013/04/16 2013/04/15 2013/04/14 2013/04/13 2013/04/10 2013/04/09 2013/04/08 2013/04/07 2013/04/06 2013/04/05 2013/04/01 2013/03/31 2013/03/30 2013/03/29 2013/03/28 2013/03/25 2013/03/24 2013/03/23 2013/03/22 2013/03/21 2013/03/20 2013/03/19 2013/03/18 2013/03/17 2013/03/15 2013/03/14 2013/03/13 2013/03/12 2013/03/11 2013/03/09 2013/03/08 2013/03/07 2013/03/06 2013/03/02 2013/02/22 2013/02/20 2013/02/17 2013/02/16 2013/02/15 2013/02/14 2013/02/10 2013/02/09 2013/02/08 2013/02/07 2013/02/06 2013/02/05 2013/02/04 2013/02/03 2013/02/02 2013/02/01 2013/01/31 2013/01/30 2013/01/29 2013/01/28 2013/01/27 2013/01/24 2013/01/23 2013/01/22 2013/01/21 2013/01/20 2013/01/19 2013/01/18 2013/01/17 2013/01/16 2013/01/15 2013/01/14 2013/01/13 2013/01/12 2013/01/11 2013/01/10 2013/01/09 2013/01/08 2013/01/07 2013/01/06 2013/01/05 2013/01/04 2013/01/03 2013/01/02 2012/12/23 2012/12/22 2012/12/21 2012/12/20 2012/12/19 2012/12/18 2012/12/17 2012/12/16 2012/12/15 2012/12/14 2012/12/13 2012/12/11 2012/12/10 2012/12/09 2012/12/08 2012/12/07 2012/12/06 2012/12/05 2012/12/04 2012/12/03 2012/12/02 2012/12/01 2012/11/26 2012/11/24 2012/11/23 2012/11/22 2012/11/21 2012/11/20 2012/11/19 2012/11/18 2012/11/17 2012/11/15 2012/11/14 2012/11/13 2012/11/12 2012/11/09 2012/11/08 2012/10/26 2012/10/25 2012/10/24 2012/10/23 2012/10/22 2012/10/21 2012/10/20 2012/10/17 2012/10/16 2012/10/15 2012/10/12 2012/10/11 2012/10/10 2012/10/09 2012/10/08 2012/10/06 2012/10/05 2012/10/04 2012/10/03 2012/10/02 2012/10/01 2012/09/26 2012/09/25 2012/09/24 2012/09/23 2012/09/22 2012/09/21 2012/09/20 2012/09/19 2012/09/18 2012/09/17 2012/09/16 2012/09/13 2012/08/22 2012/08/21 2012/08/20 2012/08/19 2012/08/18 2012/08/13 2012/08/12 2012/08/10 2012/08/09 2012/08/08 2012/08/07 2012/08/04 2012/08/03 2012/08/02 2012/08/01 2012/07/31 2012/07/30 2012/07/28 2012/07/27 2012/07/26 2012/07/25 2012/07/24 2012/07/23 2012/07/18 2012/07/16 2012/07/15 2012/07/14 2012/07/13 2012/07/12 2012/07/11 2012/07/10 2012/07/09 2012/07/08 2012/07/07 2012/07/06 2012/07/05 2012/07/02 2012/07/01 2012/06/30 2012/06/29 2012/06/28 2012/06/27 2012/06/26 2012/06/25 2012/06/24 2012/06/23 2012/06/22 2012/06/21 2012/06/20 2012/06/19 2012/06/18 2012/06/17 2012/06/16 2012/06/15 2012/06/14 2012/06/13 2012/06/12 2012/06/11 2012/06/10 2012/06/09 2012/06/08 2012/06/07 2012/06/06 2012/06/05 2012/06/01 2012/05/31 2012/05/30 2012/05/29 2012/05/28 2012/05/27 2012/05/26 2012/05/25 2012/05/24 2012/05/23 2012/05/22 2012/05/21 2012/05/20 2012/05/18 2012/05/17 2012/05/16 2012/05/15 2012/05/14 2012/05/13 2012/05/12 2012/05/10 2012/05/09 2012/05/08 2012/05/03 2012/04/17 2012/04/16 2012/04/15 2012/04/14 2012/04/13 2012/04/12 2012/04/10 2012/04/09 2012/04/08 2012/04/06 2012/04/05 2012/04/03 2012/03/30 2012/03/29 2012/03/28 2012/03/27 2012/03/26 2012/03/25 2012/03/24 2012/03/22 2012/03/21 2012/03/20 2012/03/18 2012/03/17 2012/03/16 2012/03/15 2012/03/14 2012/03/13 2012/03/12 2012/03/11 2012/03/10 2012/03/09 2012/03/08 2012/03/06 2012/03/05 2012/03/04 2012/03/03 2012/03/02 2012/03/01 2012/02/29 2012/02/28 2012/02/27 2012/02/26 2012/02/25 2012/02/24 2012/02/23 2012/02/22 2012/02/21 2012/02/20 2012/02/19 2012/02/18 2012/02/17 2012/02/16 2012/02/09 2012/02/08 2012/02/04 2012/02/03 2012/02/02 2012/02/01 2012/01/31 2012/01/26 2012/01/25 2012/01/24 2012/01/23 2012/01/21 2012/01/20 2012/01/19 2012/01/17 2012/01/15 2012/01/14 2012/01/13 2011/12/13 2011/12/12 2011/12/08 2011/12/07 2011/12/06 2011/12/05 2011/12/03 2011/12/02 2011/12/01 2011/11/30 2011/11/29 2011/11/28 2011/11/27 2011/11/26 2011/11/25 2011/11/24 2011/11/23 2011/11/22 2011/11/21 2011/11/20 2011/11/19 2011/11/18 2011/11/17 2011/11/16 2011/11/15 2011/11/10 2011/11/09 2011/11/08 2011/11/07 2011/11/06 2011/11/05 2011/11/04 2011/11/03 2011/11/02 2011/11/01 2011/10/31 2011/10/30 2011/10/29 2011/10/28 2011/10/26 2011/10/25 2011/10/24 2011/10/19 2011/10/17 2011/10/16 2011/10/15 2011/10/14 2011/10/13 2011/10/12 2011/10/11 2011/10/10 2011/10/09 2011/10/06 2011/09/17 2011/09/16 2011/09/15 2011/09/14 2011/09/13 2011/09/12 2011/09/11 2011/09/10 2011/09/09 2011/09/08 2011/09/07 2011/09/06 2011/09/05 2011/09/02 2011/08/24 2011/08/23 2011/08/11 2011/08/09 2011/08/08 2011/08/05 2011/08/04 2011/08/03 2011/08/02 2011/07/27 2011/07/22") 32 33 #dates=( "2013/05/28" ) 27 # get dates 28 if [ "$certaindate" != "" ] 29 then 30 getdates $certaindate 31 else 32 # get all night 33 #getdates "all" 34 # get last 6 nights 35 getdates 6 36 fi 34 37 35 38 printprocesslog "INFO processing the following night(s): "${dates[@]} 36 39 echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1 37 38 #echo ${dates[@]}39 40 40 41 cd $mars … … 46 47 runnumber=`echo $date | sed -e 's/\///g'` 47 48 48 if [ $runnumber -lt 20130301 ]49 then50 continue51 fi49 #if [ $runnumber -lt 20130301 ] 50 #then 51 # continue 52 #fi 52 53 53 54 # check if aux files are available from that night … … 102 103 if ! [ -e $calcurrentsfile ] 103 104 then 104 printprocesslog "INFO run calibrate.C for night "$runnumber105 printprocesslog "INFO run calibrate.C for night "$runnumber >> $logfile 2>&1106 root -q -b -l fact/calibrate.C\($runnumber\)107 105 calcurrentsfile=/gpfs/scratch/fact/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits 108 fi 106 if ! [ -e $calcurrentsfile ] 107 then 108 printprocesslog "INFO run calibrate.C for night "$runnumber >> $logfile 2>&1 109 root -q -b -l fact/processing/calibrate.C\($runnumber\) 110 fi 111 fi 112 printprocesslog "INFO using calibrated currents from file "$calcurrentsfile 109 113 110 114 #calcurrentsfile=$auxdir/$runnumber.FEEDBACK_CALIBRATED_CURRENTS.fits … … 233 237 query=$query", fCurrentsDiffToPrediction="${currents[6]} 234 238 fi 239 if [ "${currents[7]}" == "" ] 240 then 241 query=$query", fCurrentsRelDiffToPrediction=NULL" 242 else 243 query=$query", fCurrentsRelDiffToPrediction="${currents[7]} 244 fi 245 if [ "${currents[8]}" == "" ] 246 then 247 query=$query", fCurrentsLineRms=NULL" 248 else 249 query=$query", fCurrentsLineRms="${currents[8]} 250 fi 251 if [ "${currents[9]}" == "" ] 252 then 253 query=$query", fCurrentsRelLineRms=NULL" 254 else 255 query=$query", fCurrentsRelLineRms="${currents[9]} 256 fi 235 257 else 236 258 query=$query" fCurrentsMedMean=NULL" … … 241 263 query=$query", fCurrentsMedMeanEnd=NULL" 242 264 query=$query", fCurrentsDiffToPrediction=NULL" 265 query=$query", fCurrentsRelDiffToPrediction=NULL" 266 query=$query", fCurrentsLineRms=NULL" 267 query=$query", fCurrentsRelLineRms=NULL" 243 268 fi 244 269
Note:
See TracChangeset
for help on using the changeset viewer.