Changeset 17903


Ignore:
Timestamp:
05/27/14 22:11:01 (10 years ago)
Author:
Daniela Dorner
Message:
completely rewritten to take into account the new calibration
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/QuickLook/Step1.sh

    r17617 r17903  
    11#!/bin/bash
    22#
     3
     4# remarks:
     5# rsync-server still used
     6# move fileerror check to main-loop?
     7
    38source `dirname $0`/../Sourcefile.sh
    49printprocesslog "INFO starting $0"
     
    712if [ "$certaindate" != "" ]
    813then
    9    checkstring=`echo $certaindate | grep -E -o '20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]'`
     14   checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'`
    1015   if [ "$checkstring" = "" ]
    1116   then
     
    2833makedir $infopath
    2934echo "" > $infopath/runrow.txt
    30 # create path for sequence files
    31 seqpath=$anapath/sequences/$datepath
    32 makedir $seqpath
     35# create path for callisto output
     36calpath=$anapath/callisto/$datepath
     37makedir $calpath
    3338rawpathnewdaq=/newdaq/raw/$datepath
    3439rawpath=/loc_data/raw/$datepath
     
    8186   if [ ${diskusage[3]} -lt $disklimitdaq ]
    8287   then
    83       #echo "WARN less than 700 left on /raid10 on node "$HOSTNAME" ("${diskusage[3]}")"
    84       printprocesslog "DISK less than 700 left on /raid10 on node "$HOSTNAME" ("${diskusage[3]}")"
    85       #df -h /raid10
     88      echo "WARN less than 700 left on /raid10 on node "$HOSTNAME
     89      printprocesslog "WARN less than 700 left on /raid10 on node "$HOSTNAME
     90      df -h /raid10
    8691      finish
    8792   fi
     
    101106fi
    102107fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )
    103 callistofiles=( `find $anapath/callisto -type f -name $date*-calibration.log | sort` )
     108callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` )
    104109# get number of dataruns from DB
    105110query="SELECT Count(*) FROM RunInfo WHERE fNight="$date" AND fRunTypeKey=1"
    106111numdataruns=`sendquery`
     112query="SELECT Count(*) FROM RunInfo WHERE fNight="$date" AND fRunTypeKey=6"
     113numlpruns=`sendquery`
     114query="SELECT Count(*) FROM RunInfo WHERE fNight="$date" AND fRunTypeKey=2 AND fHasDrsFile=1 AND fROI=300"
     115numpedruns=`sendquery`
     116query="SELECT Count(*) FROM RunInfo WHERE fNight="$date" AND fRunTypeKey=5"
     117numdrstime=`sendquery`
     118numpedruns=0
     119#numcalibrated=`echo " $numdataruns + $numlpruns + $numpedruns + $numdrstime " | bc -l`
     120numcalibrated=`echo " $numdataruns + $numdrstime " | bc -l`
    107121
    108122# create raw directory on daq, if not yet there
    109123makedir $rawpath
    110124
    111 #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    112 printprocesslog "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    113 
    114 while [ ${#fileslocal[@]} -ne ${#files[@]} ] || [ $numdataruns -ne ${#callistofiles[@]} ] # || [ $numdataruns -ne 0 ] # FIXME: Logik ueberdenken u ueberarb
     125echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
     126printprocesslog "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
     127
     128while [ ${#fileslocal[@]} -ne ${#files[@]} ] || [ $numcalibrated -ne ${#callistofiles[@]} ] # || [ $numcalibrated -ne 0 ] # FIXME: Logik ueberdenken u ueberarb
    115129do
    116130   # only continue with script
     
    119133   check_daq
    120134   
    121    numdataruns=0
    122    #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    123    printprocesslog "INFO status beginning of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     135   numcalibrated=0
     136   echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
     137   printprocesslog "INFO status beginning of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
    124138
    125139   rsync_aux_file $drivefilenewdaq $drivefile
     
    142156            nondrs=`basename $file | sed -e 's/[.]drs//g'`
    143157            nondrsfile=`find $rawpath -name $nondrs.*z`
    144             #echo "nondrs: "$nondrsfile
    145158            tstop=`$factpath/fitsdump -h $nondrsfile  2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'`
    146159         else
    147160            tstop=`$factpath/fitsdump -h $file  2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'`
    148161         fi
    149          #echo "tstop -"$tstop"-"
    150162         # when stop time is 0, file is not closed
    151163         # when an error is returned the tstop is empty
     
    185197      fi
    186198
    187       if [ "`echo $localfile | grep -o drs`" != "drs" ]
     199      # for .drs.fits files no further treatment needed
     200      if [ "`echo $localfile | grep -o drs`" == "drs" ]
    188201      then
    189          runtype=`$factpath/fitsdump -h $localfile  2>/dev/null | grep RUNTYPE | grep -E -o "['][a-z0-9._-]+[']" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"`
    190          runnum=`echo $localfile | cut -d_ -f3 | cut -d. -f1`
    191          roi=`$factpath/fitsdump -h $localfile  2>/dev/null | grep ROI | grep -v ROITM | grep -E -o "[0-9][0-9][0-9][0-9]?" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"`
     202         continue
     203      fi
     204     
     205      # treat other files (.fits.fz)
     206      runtype=`$factpath/fitsdump -h $localfile  2>/dev/null | grep RUNTYPE | grep -E -o "['][a-z0-9._-]+[']" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"`
     207      if [ "$runtype" != "data" ]
     208      then
     209         # skip a non-data run when it has not 1000 evts
     210         #   as this means probably an fad-loss
     211         #   and these runs are repeated in that case
    192212         numevts=`$factpath/fitsdump -h $file  2>/dev/null | grep Events | grep -E -o '[0-9]+'`
    193          printprocesslog "DEBUG runnum "$runnum" runtype "$runtype" roi "$roi" numevts "$numevts
    194          if [ "$runtype" == "drs-time-upshifted" ]
     213         if [ $numevts -ne 1000 ]
    195214         then
    196             printprocesslog "INFO file "$file" has runtype drs-time-upshifted -> continue "
     215            printprocesslog "INFO file "$file" is a non-data file ("$runtype") and has not 1000 events ("$numevts")"
    197216            continue
    198217         fi
    199          #echo $runtype" "$runnum
    200          if [ "$runtype" == "data" ]
    201          then
     218      fi
     219
     220      # get run number
     221      runnum=`echo $localfile | cut -d_ -f3 | cut -d. -f1`
     222     
     223      # what is needed to process the different runs?
     224      #   P: run#(P), run#(drs-file)
     225      #   C: run#(C), run#(drs-file), run#(drs-time)
     226      #   D: run#(D), run#(drs-file), run#(drs-time), ?
     227      # what is drs-file? pedestal, roi300, has drs.fits
     228      callistolog=$calpath"/"$date"_"$runnum"-calibration.log"
     229      case $runtype in
     230         data) # treat D-runs
    202231            if [ "$fileerror" = "yes" ]
    203232            then
     
    206235               continue
    207236            fi
    208             seqfile=$seqpath/${date}_${runnum}.seq
    209             printprocesslog "INFO write data-seq "$seqfile
    210             echo "# written by automatic analysis in LP" >$seqfile
    211             echo "" >> $seqfile
    212             echo "Sequence: "`echo $date | cut -c3-8`$runnum >> $seqfile
    213             echo "Night: "`echo $datepath | sed -e 's/\//-/g'` >> $seqfile
    214             echo "" >> $seqfile
    215             echo "DrsSequence: "$drsseq >> $seqfile
    216             echo "" >> $seqfile
    217 #            echo $runrow" CalRuns"
    218 #            echo $runrow | grep -E -o '[0-9]{3}light-pulser-ext300' | sed -e 's/light-pulser-ext300//g'
    219             echo "CalRuns: "`echo $runrow | grep -E -o '[0-9]{3}light-pulser-ext300' | sed -e 's/light-pulser-ext300//g'` >> $seqfile
    220             echo "PedRuns: "`echo $runrow | grep -E -o '[0-9]{3}pedestal300' | sed -e 's/pedestal300//g'` >> $seqfile
    221             echo "DatRuns: "$runnum >> $seqfile
    222             echo "" >> $seqfile
    223             echo "DrsFiles: "$drsfile >> $seqfile
    224             echo "" >> $seqfile
    225             echo "#DrsFile: "$drsfile >> $seqfile
    226             echo "" >> $seqfile
    227 
    228 #            tstopi=`$factpath/fitsdump -h $localfile  2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'`
    229 #            tstopf=`$factpath/fitsdump -h $localfile  2>/dev/null | grep TSTOPF | grep -E -o '[.][0-9]+'`
    230 #            tstop=${tstopi}${tstopf}
    231 #            coordinates=( `${factpath}/fitsdump ${drivefile} -c Ra_src Dec_src -r --filter='Time<'${tstop}  2>/dev/null | tail -1 2>&1` )
    232 #            if [ "${coordinates[0]}" == "" ] || [ "${coordinates[1]}" == "" ]
    233 #            then
    234 #               printprocesslog "WARN couldn't get coordinates ("${coordinates[@]}") from "$drivefile
    235 #               #echo "WARN couldn't get coordinates ("${coordinates[@]}") from "$drivefile
    236 #               continue
    237 #            fi
    238 #            if [ "${coordinates[0]}" == "0" ] || [ "${coordinates[1]}" == "0" ]
    239 #            then
    240 #               printprocesslog "WARN coordinates "${coordinates[@]}
    241 #               #echo "WARN coordinates "${coordinates[@]}
    242 #               continue
    243 #            fi
    244 #            printprocesslog "DEBUG coordinates "${coordinates[@]}
    245 #            query="SELECT fSourceKEY FROM scheduling.source WHERE "
    246 #            query=$query" fRightAscension BETWEEN "${coordinates[0]}"-0.01 AND "${coordinates[0]}"+0.01 "
    247 #            query=$query" AND fDeclination BETWEEN "${coordinates[1]}"-0.01 AND "${coordinates[1]}"+0.01 "
    248 #            sourcekey=`sendquery`
    249 #            if [ "$sourcekey" == "" ]
    250 #            then
    251 #               printprocesslog "WARN sourcekey empty - coordinates"${coordinates[@]}
    252 #            fi
    253237           
    254             printprocesslog "INFO counting callisto logs and data files +1."
     238            # some accounting
     239            printprocesslog "DEBUG counting callisto logs and set data files +1."
    255240            # get number of callisto logs
    256241            runcallistocount=`ps aux | grep RunCallisto | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
    257             # count data runs
    258             numdataruns=`echo " $numdataruns + 1 " | bc -l`
    259             #echo "numdata +1"
     242            # count runs to be calibrated
     243            numcalibrated=`echo " $numcalibrated + 1 " | bc -l`
     244            printprocesslog "DEBUG running callistos: "$runcallistocount" #runs: "$numcalibrated" #callisto-logs: "${#callistofiles[@]}
    260245           
    261             #echo "cal: "$runcallistocount" numdat: "$numdataruns" numcallog: "${#callistofiles[@]}
    262             printprocesslog "INFO running callistos: "$runcallistocount" #data-runs: "$numdataruns" #callisto-logs: "${#callistofiles[@]}
    263246            # do not overload system in case of a lot of files to be processed
    264247            #  numruncallistos is set in setup.fact.lp.data
     
    266249            then
    267250               printprocesslog "INFO "$runcallistocount" RunCallisto.sh are running -> continue"
    268                #echo "INFO "$runcallistocount" RunCallisto.sh are running -> continue"
    269251               continue
    270252            fi
    271             callistolog=`dirname $seqfile | sed -e "s/sequences/callisto/"`"/"$date"_"$runnum"-calibration.log"
     253           
     254            # starting calibration
    272255            if ! [ -e $callistolog ]
    273256            then
     
    277260               rsync_aux_file $tempfilenewdaq $tempfile
    278261               rsync_aux_file $humfilenewdaq $humfile
    279                #printprocesslog "INFO starting RunCallisto.sh for "$sourcekey" "$seqfile
    280                #echo "INFO starting RunCallisto.sh for "$sourcekey" "$seqfile
    281                #`dirname $0`/RunCallisto.sh $sourcekey $seqfile &
    282                printprocesslog "INFO starting RunCallisto.sh for "$seqfile
    283                #echo "INFO starting RunCallisto.sh for "$seqfile
    284                `dirname $0`/RunCallisto.sh $seqfile &
     262               if [ -e $drstime ]
     263               then
     264                  calfile=$calpath"/"$date"_"$runnum"_C.root"
     265                  printprocesslog "INFO starting RunCallisto.sh for drun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" outpath "$outpath" calfile "$calfile
     266                  echo "INFO starting RunCallisto.sh for drun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" outpath "$outpath" calfile "$calfile
     267                  `dirname $0`/RunCallisto.sh "drun" $callistolog $localfile $drscalib $drstime $calpath $calfile &
     268               fi
    285269            fi
    286270            continue
    287          else
    288             # skip a non-data run when it has not 1000 evts
    289             #   as this means probably an fad-loss
    290             if [ $numevts -ne 1000 ]
    291             then
    292                printprocesslog "INFO file "$file" is a non-data file ("$runtype") and has not 1000 events ("$numevts")"
    293                continue
    294             fi
    295          fi
    296          printprocesslog "DEBUG runrow "$runrow" (from variable) "
    297          runrow=`cat $infopath/runrow.txt`
    298          printprocesslog "DEBUG runrow "$runrow" (from file) "
    299          runrow=$runrow$runnum$runtype$roi"_"
    300          echo $runrow > $infopath/runrow.txt
    301          if echo $runrow | grep -E '[0-9]{3}drs-pedestal1024_[0-9]{3}drs-gain1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-time1024_[0-9]{3}pedestal300_[0-9]{3}pedestal300_' >/dev/null
    302          then
    303             runrow2=`echo $runrow | grep -E -o '[0-9]{3}drs-pedestal1024_[0-9]{3}drs-gain1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-time1024_[0-9]{3}pedestal300_[0-9]{3}pedestal300_'`
    304             run1=`echo $runrow2 | cut -d_ -f1 | sed -e 's/drs-pedestal1024//g'`
    305             run2=`echo $runrow2 | cut -d_ -f2 | sed -e 's/drs-gain1024//g'`
    306             run3=`echo $runrow2 | cut -d_ -f3 | sed -e 's/drs-pedestal1024//g'`
    307             run4=`echo $runrow2 | cut -d_ -f4 | sed -e 's/drs-pedestal1024//g'`
    308             run5=`echo $runrow2 | cut -d_ -f5 | sed -e 's/drs-time1024//g'`
    309             run6=`echo $runrow2 | cut -d_ -f6 | sed -e 's/pedestal300//g'`
    310             run7=`echo $runrow2 | cut -d_ -f7 | sed -e 's/pedestal300//g'`
    311             seqfile=$seqpath/${date}_${run1}.drs.seq
    312             printprocesslog "INFO write drs-seq "$seqfile
    313             echo "# written by automatic analysis in LP" > $seqfile
    314             echo "" >> $seqfile
    315             echo "Sequence: "`echo $date | cut -c3-8`$run1 >> $seqfile
    316             echo "Night: "`echo $datepath | sed -e 's/\//-/g'` >> $seqfile
    317             echo "" >> $seqfile
    318             echo "CalRuns:  "$run2 >> $seqfile
    319             echo "PedRuns:  "$run6" "$run7 >> $seqfile
    320             echo "DatRuns:  "$run5 >> $seqfile
    321             echo "DrsRuns:  "$run1" "$run3" "$run4 >> $seqfile
    322             echo "DrsFiles: "$run3" "$run6 >> $seqfile
    323             echo "" >> $seqfile
    324             echo "#DrsFile: "$run6 >> $seqfile
    325             echo "" >> $seqfile
    326             echo "" > $infopath/runrow.txt
    327             drsseq=$run1
    328             drsfile=$run6
    329          fi
    330          if echo $runrow | grep -E '[0-9]{3}pedestal300_[0-9]{3}light-pulser-ext300_' >/dev/null
    331          then
    332             echo "" > $infopath/runrow.txt
    333          fi
    334       fi
     271            ;;
     272         pedestal) # treat P-runs
     273            roi=`$factpath/fitsdump -h $localfile  2>/dev/null | grep ROI | grep -v ROITM | grep -E -o "[0-9][0-9][0-9][0-9]?" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"`
     274            if [ $roi -eq 300 ]
     275            then
     276               # check drs-file
     277               drsfile=`echo $localfile | sed -e 's/[.]fits[.]fz/.drs.fits/g'`
     278               if [ -e $drsfile ]
     279               then
     280                  # set name of drs-file
     281                  drscalib=$drsfile
     282                  continue
     283               #else
     284                  # not needed for QLA
     285                  #if ! [ -e $callistolog ]
     286                  #then
     287                  #   pedfile=$calpath"/"$date"_"$runnum"-pedestal.root"
     288                  #   # count runs to be calibrated
     289                  #   numcalibrated=`echo " $numcalibrated + 1 " | bc -l`
     290                  #   printprocesslog "INFO starting RunCallisto.sh for prun "$localfile" logfile "$callistolog" drs-calib "$drscalib" pedfile "$pedfile
     291                  #   echo "INFO starting RunCallisto.sh for prun "$localfile" logfile "$callistolog" drs-calib "$drscalib" pedfile "$pedfile
     292                  #  `dirname $0`/RunCallisto.sh "prun" $callistolog $localfile $drscalib $pedfile &
     293                  #fi
     294               fi
     295            fi
     296            ;;
     297         light-pulser-ext) # treat C-runs
     298            # do lp-treatment -> not needed for QLA
     299            #lpfile=$calpath"/"$date"_"$runnum"-lightpulser.root"
     300            #if ! [ -e $callistolog ]
     301            #then
     302            #   if [ -e $drstime ]
     303            #   then
     304            #      # count runs to be calibrated
     305            #      numcalibrated=`echo " $numcalibrated + 1 " | bc -l`
     306            #      printprocesslog "INFO starting RunCallisto.sh for crun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" lpfile "$lpfile
     307            #      echo "INFO starting RunCallisto.sh for crun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" lpfile "$lpfile
     308            #      `dirname $0`/RunCallistoNew.sh "crun" $callistolog $localfile $drscalib $drstime $lpfile &
     309            #   fi
     310            #fi
     311            ;;
     312         drs-time) # treat C-runs
     313            # do drs-timing calibration
     314            drstime=$calpath"/"$date"_"$runnum"-drstime.root"
     315            # starting calibration
     316            if ! [ -e $callistolog ]
     317            then
     318               # count runs to be calibrated
     319               numcalibrated=`echo " $numcalibrated + 1 " | bc -l`
     320               printprocesslog "INFO starting RunCallisto.sh for time "$localfile" logfile "$callistolog" drs-ped "$drsped" drstime "$drstime
     321               echo "INFO starting RunCallisto.sh for time "$localfile" logfile "$callistolog" drs-ped "$drsped" drstime "$drstime
     322               `dirname $0`/RunCallisto.sh "time" $callistolog $localfile $drsped $drstime &
     323            fi
     324            ;;
     325         drs-pedestal) # get drs-pedestal
     326            roi=`$factpath/fitsdump -h $localfile  2>/dev/null | grep ROI | grep -v ROITM | grep -E -o "[0-9][0-9][0-9][0-9]?" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"`
     327            drs=`$factpath/fitsdump -h $localfile  2>/dev/null | grep DRSCALIB | grep -E -o " T " `
     328            if [ $roi -eq 1024 ] && [ "$drs" == " T " ]
     329            then
     330               drsped=`echo $localfile | sed -e 's/[.]fits[.]fz/.drs.fits/g'`
     331            fi
     332            ;;
     333         *) # other runs
     334            printprocesslog "INFO file "$file" has runtype "$runtype" -> continue "
     335            continue
     336            ;;
     337      esac
    335338   done
    336    printprocesslog "INFO status after loop: "$runcallistocount" callistos running, "$numdataruns" data runs to process in total, "${#callistofiles[@]}" have already a callisto-logfile "
     339   printprocesslog "INFO status after loop: "$runcallistocount" callistos running, "$numcalibrated" data runs to process in total, "${#callistofiles[@]}" have already a callisto-logfile "
    337340   
    338341   # get new file lists
     
    340343   files=( `find $rawpathnewdaq -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )
    341344   fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )
    342    callistofiles=( `find $anapath/callisto -type f -name $date*-calibration.log | sort` )
    343    #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    344    printprocesslog "INFO status after for-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     345   callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` )
     346   echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
     347   printprocesslog "INFO status after for-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
    345348
    346349   # wait and get new file lists
     
    350353      printprocesslog "INFO wait 60 seconds."
    351354      sleep 60
    352       #echo "sleep 60..."
    353355      printprocesslog "INFO get new file lists for "$datepath
    354356      files=( `find $rawpathnewdaq -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )
    355357      fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )
    356       callistofiles=( `find $anapath/callisto -type f -name $date*-calibration.log | sort` )
     358      callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` )
    357359   fi
    358    #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    359    printprocesslog "INFO status after wait end of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    360    
    361    # this should not happen, but may in rare cases if data are deleted in the wrong order
    362    if [ ${#files[@]} -lt ${#fileslocal[@]} ]
    363    then
    364       printprocesslog "ERROR numfiles on newdaq("${#files[@]}") < #files on daq ("${#fileslocal[@]}") - maybe deleting data in the wrong order?"
    365       echo "ERROR numfiles on newdaq("${#files[@]}") < #files on daq ("${#fileslocal[@]}") - maybe deleting data in the wrong order?"
    366       finish
    367    fi
     360   echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
     361   printprocesslog "INFO status after wait end of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated
    368362done
    369363
    370364
    371365
    372 
Note: See TracChangeset for help on using the changeset viewer.