Ignore:
Timestamp:
03/02/14 13:41:25 (11 years ago)
Author:
Daniela Dorner
Message:
give warning about missing files only when runinfo in DB available
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/FillAuxThresholds.sh

    r17596 r17597  
    5050   runnumber=`echo $date | sed -e 's/\///g'`
    5151
    52    # check if aux files are available from that night
    53    if ! [ -d $auxdir ]
    54    then
    55       printprocesslog "INFO no data available in "$auxdir
    56       continue
    57    else
    58       printprocesslog "INFO processing files in "$auxdir
    59    fi
    60    
    61    rawdir=$rawdata/$date
    62    # check if raw files are available from that night
    63    if ! [ -d $rawdir ]
    64    then
    65       logtext="INFO"
    66    else
    67       logtext="WARN"
    68    fi
    69 
    70    thresholdfile=$auxdir/$runnumber.RATE_CONTROL_THRESHOLD.fits
    71    printprocesslog "INFO processing "$thresholdfile
    72    echo "INFO processing "$thresholdfile >> $logfile 2>&1
    73    if ! [ -e $thresholdfile ]
    74    then
    75       printprocesslog $logtext" "$thresholdfile" not found."
    76       continue
    77    else
    78       threshnumerrors=`fverify $thresholdfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    79       if [ $threshnumerrors -gt 0 ]
    80       then
    81          printprocesslog "WARN for $thresholdfile fverify returned "$threshnumerrors" error(s)."
    82       fi
    83    fi
    84 
    85    thresholdfile2=$auxdir/$runnumber.FTM_CONTROL_STATIC_DATA.fits
    86    #ls $thresholdfile2
    87    if ! [ -e $thresholdfile2 ]
    88    then
    89       printprocesslog $logtext" "$thresholdfile2" not found."
    90       continue
    91    else
    92       threshnumerrors2=`fverify $thresholdfile2 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    93       if [ $threshnumerrors2 -gt 0 ]
    94       then
    95          printprocesslog "WARN for $thresholdfile2 fverify returned "$threshnumerrors2" error(s)."
    96       fi
    97    fi
    98 
    99 
    100 
    10152   # get file numbers from DB
    10253   #   but only for not-corrupted files
     
    10657      query=$query" AND ISNULL(fThresholdMedMean) AND ISNULL(fThresholdMinSet) "
    10758   fi
    108 
    10959   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    11060   filenumbers=( `sendquery $query` )
     61   # proceed only if there are files available
    11162   if [ ${#filenumbers} -eq 0 ]
    11263   then
    11364      printprocesslog "INFO No files found in the DB for night "$date
    11465      continue
     66   fi
     67
     68   # check if aux files are available from that night
     69   if ! [ -d $auxdir ]
     70   then
     71      printprocesslog "INFO no data available in "$auxdir
     72      continue
     73   else
     74      printprocesslog "INFO processing files in "$auxdir
     75   fi
     76   
     77   thresholdfile=$auxdir/$runnumber.RATE_CONTROL_THRESHOLD.fits
     78   printprocesslog "INFO processing "$thresholdfile
     79   echo "INFO processing "$thresholdfile >> $logfile 2>&1
     80   if ! [ -e $thresholdfile ]
     81   then
     82      printprocesslog "WARN "$thresholdfile" not found."
     83      continue
     84   else
     85      threshnumerrors=`fverify $thresholdfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     86      if [ $threshnumerrors -gt 0 ]
     87      then
     88         printprocesslog "WARN for $thresholdfile fverify returned "$threshnumerrors" error(s)."
     89      fi
     90   fi
     91
     92   thresholdfile2=$auxdir/$runnumber.FTM_CONTROL_STATIC_DATA.fits
     93   #ls $thresholdfile2
     94   if ! [ -e $thresholdfile2 ]
     95   then
     96      printprocesslog "WARN "$thresholdfile2" not found."
     97      continue
     98   else
     99      threshnumerrors2=`fverify $thresholdfile2 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     100      if [ $threshnumerrors2 -gt 0 ]
     101      then
     102         printprocesslog "WARN for $thresholdfile2 fverify returned "$threshnumerrors2" error(s)."
     103      fi
    115104   fi
    116105
Note: See TracChangeset for help on using the changeset viewer.