Ignore:
Timestamp:
05/17/04 13:42:44 (21 years ago)
Author:
merck
Message:
Merck: Changed to loop automatically over all dates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/runped

    r4085 r4090  
    3838
    3939DATES=`ls -d -1 $BASEPATH/$ROOTDIR/20* | cut -d/ -f6 '-'`
    40 select DATE in $DATES "Exit"; do
    41         break
    42 done
    43 if [ "$DATE" = "Exit" ]
    44 then
    45   exit
    46 fi
     40for DATE in $DATES
     41do
    4742
    48 INDIR=$BASEPATH/$ROOTDIR/$DATE/
    49 OUTDIR=$BASEPATH/calibdata/$DATE/
    50 if [ ! -d $OUTDIR ]
    51 then
    52   echo $DATE
    53   mkdir $OUTDIR
    54 fi
     43  INDIR=$BASEPATH/$ROOTDIR/$DATE/
     44  OUTDIR=$BASEPATH/calibdata/$DATE/
     45  if [ ! -d $OUTDIR ]
     46  then
     47    echo $DATE
     48    mkdir $OUTDIR
     49  fi
    5550
    56 PEDFILES=`ls -1 $INDIR/*_P_*.root | cut -d_ -f4 '-'`
     51  PEDFILES=`ls -1 $INDIR/*_P_*.root | cut -d_ -f4 '-'`
    5752
    58 MARSFILE=./marsconfig
    59 LOGFILE=$OUTDIR/Pedestal.log
     53  MARSFILE=./marsconfig
     54  LOGFILE=$OUTDIR/Pedestal.log
    6055
    61 TIME=`date`
    62 echo "-----------------------------------------------------------------" > $LOGFILE
    63 echo " PEDESTAL calc started $TIME" >> $LOGFILE
    64 echo "-----------------------------------------------------------------" >> $LOGFILE
     56  TIME=`date`
     57  echo "-----------------------------------------------------------------" > $LOGFILE
     58  echo " PEDESTAL calc started $TIME" >> $LOGFILE
     59  echo "-----------------------------------------------------------------" >> $LOGFILE
    6560
    6661#
     
    6863# and run the macro "stdPed.C" in root using batch mode
    6964#
    70 for I in $PEDFILES
    71 do
    72   echo "inpath:                  $INDIR" > $MARSFILE
    73   echo "outpath:                 $OUTDIR" >> $MARSFILE
    74   echo "pedfile001:              $I" >> $MARSFILE
    75   root -b -q stdPed.C >> $LOGFILE
     65  for I in $PEDFILES
     66  do
     67    echo "inpath:                  $INDIR" > $MARSFILE
     68    echo "outpath:                 $OUTDIR" >> $MARSFILE
     69    echo "pedfile001:              $I" >> $MARSFILE
     70    root -b -l -q stdPed.C >> $LOGFILE
     71  done
    7672done
Note: See TracChangeset for help on using the changeset viewer.