Changeset 17597 for trunk


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
Location:
trunk/DataCheck/Processing
Files:
10 edited

Legend:

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

    r17577 r17597  
    4646   auxdir=$auxdata/$date
    4747   runnumber=`echo $date | sed -e 's/\///g'`
     48   # the container temperature was not available before this date
    4849   if [ $runnumber -lt 20130413 ]
    4950   then
     51      printprocesslog "INFO container temperature was not available before 20130413 "
     52      continue
     53   fi
     54
     55   # get file numbers from DB
     56   #   but only for not-corrupted files
     57   query="SELECT fRunID from RunInfo WHERE fNight="$runnumber" AND fFitsFileErrors=0 "
     58   if [ "$doupdate" = "no" ]
     59   then
     60      query=$query" AND ISNULL(fContainerTempMean) "
     61   fi
     62   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
     63   filenumbers=( `sendquery $query` )
     64   # proceed only if there are files available
     65   if [ ${#filenumbers} -eq 0 ]
     66   then
     67      printprocesslog "INFO No files found in the DB for night "$date
    5068      continue
    5169   fi
     
    6078   fi
    6179
    62    # get file numbers from DB
    63    #   but only for not-corrupted files
    64    query="SELECT fRunID from RunInfo WHERE fNight="$runnumber" AND fFitsFileErrors=0 "
    65    if [ "$doupdate" = "no" ]
    66    then
    67       query=$query" AND ISNULL(fContainerTempMean) "
    68    fi
    69 
    70    printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    71    filenumbers=( `sendquery $query` )
    72    if [ ${#filenumbers} -eq 0 ]
    73    then
    74       printprocesslog "INFO No files found in the DB for night "$date
    75       continue
    76    fi
    77 
    7880   # get daily fits files
    7981   conttempfile=$auxdir/$runnumber.TEMPERATURE_DATA.fits
     
    8183   then
    8284      printprocesslog "WARN "$conttempfile" not found."
    83       echo "WARN "$conttempfile" not found."
    8485      continue
    8586   else
  • trunk/DataCheck/Processing/FillAuxCtrDev.sh

    r17578 r17597  
    6767      query=$query" AND ISNULL(fCtrlDevMean) "
    6868   fi
    69 
    7069   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    7170   filenumbers=( `sendquery $query` )
     71   # proceed only if there are files available
    7272   if [ ${#filenumbers} -eq 0 ]
    7373   then
  • trunk/DataCheck/Processing/FillAuxCurrents.sh

    r17596 r17597  
    5252   #fi
    5353   
    54    # check if aux files are available from that night
    55    if ! [ -d $auxdir ]
    56    then
    57       printprocesslog "INFO no data available in "$auxdir
    58       continue
    59    else
    60       printprocesslog "INFO processing files in "$auxdir
    61    fi
    62 
    63    rawdir=$rawdata/$date
    64    # check if raw files are available from that night
    65    if ! [ -d $rawdir ]
    66    then
    67       logtext="INFO"
    68    else
    69       logtext="WARN"
    70    fi
    71 
    72    biasvoltagefile=$auxdir/$runnumber.BIAS_CONTROL_VOLTAGE.fits
    73    if ! [ -e $biasvoltagefile ]
    74    then
    75       printprocesslog $logtext" "$biasvoltagefile" not found."
    76       continue
    77    else
    78       biasnumerrors=`fverify $biasvoltagefile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    79       if [ $biasnumerrors -gt 0 ]
    80       then
    81          printprocesslog "WARN for $biasvoltagefile fverify returned "$biasnumerrors" error(s)."
    82       fi
    83    fi
    84 
    85    biascurrentfile=$auxdir/$runnumber.BIAS_CONTROL_CURRENT.fits
    86    if ! [ -e $biascurrentfile ]
    87    then
    88       printprocesslog $logtext" "$biascurrentfile" not found."
    89       continue
    90    else
    91       biascurrnumerrors=`fverify $biascurrentfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    92       if [ $biascurrnumerrors -gt 0 ]
    93       then
    94          printprocesslog "WARN for $biascurrentfile fverify returned "$biascurrnumerrors" error(s)."
    95       fi
    96    fi
    97 
    98    # this file is needed for the calibration of the currents
    99    feedbackcalfile=$auxdir/$runnumber.FEEDBACK_CALIBRATION.fits
    100    if ! [ -e $feedbackcalfile ]
    101    then
    102       printprocesslog $logtext" "$feedbackcalfile" not found."
    103       continue
    104    else
    105       feedbacknumerrors=`fverify $feedbackcalfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    106       if [ $feedbacknumerrors -gt 0 ]
    107       then
    108          printprocesslog "WARN for $feedbackcalfile fverify returned "$feedbacknumerrors" error(s)."
    109       fi
    110    fi
    111 
    112    calcurrentsfile=$auxdir/$runnumber.FEEDBACK_CALIBRATED_CURRENTS.fits
    113    if ! [ -e $calcurrentsfile ]
    114    then
    115       calcurrentsfile=/gpfs/scratch/fact/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
    116       if ! [ -e $calcurrentsfile ]
    117       then
    118          printprocesslog "INFO run calibrate.C for night "$runnumber >> $logfile 2>&1
    119          root -q -b -l fact/processing/calibrate.C\($runnumber\)
    120       fi
    121    fi
    122    printprocesslog "INFO using calibrated currents from file "$calcurrentsfile
    123 
    124    #calcurrentsfile=$auxdir/$runnumber.FEEDBACK_CALIBRATED_CURRENTS.fits
    125    #calcurrentsfile=/scratch_nfs/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
    126    #calcurrentsfile=/gpfs/scratch/fact/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
    127    if ! [ -e $calcurrentsfile ]
    128    then
    129       printprocesslog $logtext" "$calcurrentsfile" not found."
    130       continue
    131    else
    132       calnumerrors=`fverify $calcurrentsfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
    133       if [ $calnumerrors -gt 0 ]
    134       then
    135          printprocesslog "WARN for $calcurrentsfile fverify returned "$calnumerrors" error(s)."
    136       fi
    137    fi
    138    
    139 
    14054   # get file numbers from DB
    14155   #   but only for not-corrupted files
     
    14559      query=$query" AND ISNULL(fCurrentsMedMean) "
    14660   fi
    147 
    14861   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    14962   filenumbers=( `sendquery $query` )
     63   # proceed only if there are files available
    15064   if [ ${#filenumbers} -eq 0 ]
    15165   then
     
    15468   fi
    15569
     70   # check if aux files are available from that night
     71   if ! [ -d $auxdir ]
     72   then
     73      printprocesslog "INFO no data available in "$auxdir
     74      continue
     75   else
     76      printprocesslog "INFO processing files in "$auxdir
     77   fi
     78
     79   biasvoltagefile=$auxdir/$runnumber.BIAS_CONTROL_VOLTAGE.fits
     80   if ! [ -e $biasvoltagefile ]
     81   then
     82      printprocesslog "WARN "$biasvoltagefile" not found."
     83      continue
     84   else
     85      biasnumerrors=`fverify $biasvoltagefile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     86      if [ $biasnumerrors -gt 0 ]
     87      then
     88         printprocesslog "WARN for $biasvoltagefile fverify returned "$biasnumerrors" error(s)."
     89      fi
     90   fi
     91
     92   biascurrentfile=$auxdir/$runnumber.BIAS_CONTROL_CURRENT.fits
     93   if ! [ -e $biascurrentfile ]
     94   then
     95      printprocesslog "WARN "$biascurrentfile" not found."
     96      continue
     97   else
     98      biascurrnumerrors=`fverify $biascurrentfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     99      if [ $biascurrnumerrors -gt 0 ]
     100      then
     101         printprocesslog "WARN for $biascurrentfile fverify returned "$biascurrnumerrors" error(s)."
     102      fi
     103   fi
     104
     105   # this file is needed for the calibration of the currents
     106   feedbackcalfile=$auxdir/$runnumber.FEEDBACK_CALIBRATION.fits
     107   if ! [ -e $feedbackcalfile ]
     108   then
     109      printprocesslog "WARN "$feedbackcalfile" not found."
     110      continue
     111   else
     112      feedbacknumerrors=`fverify $feedbackcalfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     113      if [ $feedbacknumerrors -gt 0 ]
     114      then
     115         printprocesslog "WARN for $feedbackcalfile fverify returned "$feedbacknumerrors" error(s)."
     116      fi
     117   fi
     118
     119   calcurrentsfile=$auxdir/$runnumber.FEEDBACK_CALIBRATED_CURRENTS.fits
     120   if ! [ -e $calcurrentsfile ]
     121   then
     122      calcurrentsfile=/gpfs/scratch/fact/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
     123      if ! [ -e $calcurrentsfile ]
     124      then
     125         printprocesslog "INFO run calibrate.C for night "$runnumber >> $logfile 2>&1
     126         root -q -b -l fact/processing/calibrate.C\($runnumber\)
     127      fi
     128   fi
     129   printprocesslog "INFO using calibrated currents from file "$calcurrentsfile
     130
     131   #calcurrentsfile=$auxdir/$runnumber.FEEDBACK_CALIBRATED_CURRENTS.fits
     132   #calcurrentsfile=/scratch_nfs/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
     133   #calcurrentsfile=/gpfs/scratch/fact/calibrated_currents/$runnumber.CALIBRATED_CURRENTS.fits
     134   if ! [ -e $calcurrentsfile ]
     135   then
     136      printprocesslog "WARN "$calcurrentsfile" not found."
     137      continue
     138   else
     139      calnumerrors=`fverify $calcurrentsfile 2>/dev/null | grep -o '[0-9][ ]error(s)'  | grep -E -o '[0-9]'`
     140      if [ $calnumerrors -gt 0 ]
     141      then
     142         printprocesslog "WARN for $calcurrentsfile fverify returned "$calnumerrors" error(s)."
     143      fi
     144   fi
     145   
    156146   # fill auxiliary information for files
    157147   for filenum in ${filenumbers[@]}
  • trunk/DataCheck/Processing/FillAuxData.sh

    r17583 r17597  
    116116   runnumber=`echo $date | sed -e 's/\///g'`
    117117
    118    # check if aux files are available from that night
    119    if ! [ -d $auxdir ]
    120    then
    121       printprocesslog "INFO no data available in "$auxdir
    122       continue
    123    else
    124       printprocesslog "INFO processing files in "$auxdir
    125    fi
    126 
    127118   # get file numbers from DB
    128119   #   but only for not-corrupted files
     
    135126   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    136127   filenumbers=( `sendquery $query` )
     128   # proceed only if there are files available
    137129   if [ ${#filenumbers} -eq 0 ]
    138130   then
    139131      printprocesslog "INFO No files found in the DB for night "$date
    140132      continue
     133   fi
     134
     135   # check if aux files are available from that night
     136   if ! [ -d $auxdir ]
     137   then
     138      printprocesslog "INFO no data available in "$auxdir
     139      continue
     140   else
     141      printprocesslog "INFO processing files in "$auxdir
    141142   fi
    142143
  • trunk/DataCheck/Processing/FillAuxTemp.sh

    r17582 r17597  
    6767      query=$query" AND ISNULL(fCameraTempMean) "
    6868   fi
    69 
    7069   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    7170   filenumbers=( `sendquery $query` )
     71   # proceed only if there are files available
    7272   if [ ${#filenumbers} -eq 0 ]
    7373   then
  • 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
  • trunk/DataCheck/Processing/FillDrsTemp.sh

    r17579 r17597  
    7171      query=$query" AND ISNULL(fCameraTempMean) "
    7272   fi
    73 
    7473   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    7574   filenumbers=( `sendquery $query` )
     75   # proceed only if there are files available
    7676   if [ ${#filenumbers} -eq 0 ]
    7777   then
  • trunk/DataCheck/Processing/FillEffectiveOn.sh

    r17596 r17597  
    4949#   echo $auxdir" @ "`date`
    5050
     51   # get file numbers from DB
     52   #   but only for not-corrupted files
     53   query="SELECT fRunID from RunInfo WHERE fNight="$runnumber" AND fFitsFileErrors=0 "
     54   if [ "$doupdate" = "no" ]
     55   then
     56      query=$query" AND ISNULL(fEffectiveOn) "
     57   fi
     58   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
     59   filenumbers=( `sendquery $query` )
     60   # proceed only if there are files available
     61   if [ ${#filenumbers} -eq 0 ]
     62   then
     63      printprocesslog "INFO No files found in the DB for night "$date
     64      continue
     65   fi
     66
    5167   # check if aux files are available from that night
    5268   if ! [ -d $auxdir ]
     
    5874   fi
    5975   
    60    rawdir=$rawdata/$date
    61    # check if raw files are available from that night
    62    if ! [ -d $rawdir ]
    63    then
    64       logtext="INFO"
    65    else
    66       logtext="WARN"
    67    fi
    68 
    6976   ftmcontrolfile=$auxdir/$runnumber.FTM_CONTROL_TRIGGER_RATES.fits
    7077   if ! [ -e $ftmcontrolfile ]
    7178   then
    72       printprocesslog $logtext" "$ftmcontrolfile" not found."
     79      printprocesslog "WARN "$ftmcontrolfile" not found."
    7380      continue
    7481   else
     
    7885         printprocesslog "WARN for $ftmcontrolfile fverify returned "$ftmnumerrors" error(s)."
    7986      fi
    80    fi
    81 
    82    # get file numbers from DB
    83    #   but only for not-corrupted files
    84    query="SELECT fRunID from RunInfo WHERE fNight="$runnumber" AND fFitsFileErrors=0 "
    85    if [ "$doupdate" = "no" ]
    86    then
    87       query=$query" AND ISNULL(fEffectiveOn) "
    88    fi
    89 
    90    printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
    91    filenumbers=( `sendquery $query` )
    92    if [ ${#filenumbers} -eq 0 ]
    93    then
    94       printprocesslog "INFO No files found in the DB for night "$date
    95       continue
    9687   fi
    9788
  • trunk/DataCheck/Processing/FillMoonInfo.sh

    r17094 r17597  
    4848   fi
    4949   printprocesslog "DEBUG get filenumbers from DB: QUERY: "$query
     50   # proceed only if there are files available
    5051   filenumbers=( `sendquery` )
    5152   if [ ${#filenumbers} -eq 0 ]
  • trunk/DataCheck/Processing/FillRatescans.sh

    r17596 r17597  
    4444   fi
    4545   
    46    rawdir=$rawdata/$date
    47    # check if raw files are available from that night
    48    if ! [ -d $rawdir ]
    49    then
    50       logtext="INFO"
    51    else
    52       logtext="WARN"
    53    fi
    54 
    5546   ratescanfile=$auxdir/$runnumber.RATE_SCAN_DATA.fits
    5647   printprocesslog "INFO processing "$ratescanfile
     
    5849   if ! [ -e $ratescanfile ]
    5950   then
    60       printprocesslog $logtext" "$ratescanfile" not found."
     51      rawdir=$rawdata/$date
     52      # check if raw files are available from that night
     53      if ! [ -d $rawdir ]
     54      then
     55         printprocesslog "INFO "$ratescanfile" not found."
     56      else
     57         printprocesslog "WARN "$ratescanfile" not found."
     58      fi
    6159      continue
    6260   else
Note: See TracChangeset for help on using the changeset viewer.