Ignore:
Timestamp:
08/27/10 14:20:07 (14 years ago)
Author:
Daniela Dorner
Message:
changed processing of ceres from file- to run-basis
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/datacenter/scripts/runceres

    r9612 r9898  
    4040gettodo "1"
    4141run=${primaries[0]}
    42 file=${primaries[1]}
    43 cereskey=${primaries[2]}
     42cereskey=${primaries[1]}
    4443
    4544# lock sequ for cal
    46 lockfile=$lockpath/lock-$step-$run.$file.$cereskey.txt
     45lockfile=$lockpath/lock-$step-$run.$cereskey.txt
    4746checklock
    4847
     
    5049
    5150# run calibration for sequence
    52 printprocesslog "INFO starting $program for run $run and file $file and ceres-setup $cereskey"
     51printprocesslog "INFO starting $program for run $run and ceres-setup $cereskey"
    5352
    5453setstatus "start"
     
    5655setupfile=$setuppath/$program/`printf %03d $cereskey`/ceres.rc
    5756
    58 query="SELECT fRunTypeKEY FROM CeresInfo WHERE fRunNumber="$run" AND fFileNumber="$file" AND fCeresSetupKEY="$cereskey
     57query="SELECT fRunTypeKEY FROM CeresInfo WHERE fRunNumber="$run" AND fCeresSetupKEY="$cereskey
    5958runkey=`sendquery`
    6059
    6160case $runkey in
    62    2) printprocesslog "INFO run $run and file $file is a data run (key="$runkey")"
    63       inputfile=$mcpath/corsika/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8`/cer000`printf %06d $file | cut -c 4-6`
     61   2) printprocesslog "INFO run $run is a data run (key="$runkey")"
     62      printprocesslog "INFO getting file numbers for run "$run
     63      query="SELECT CONCAT('"$mcpath"/corsika/', RIGHT(LPAD(CeresInfo.fRunNumber, 8, '0'), 4),"
     64      query=$query" '"$mcpath"/corsika/', LEFT(LPAD(CeresInfo.fRunNumber, 8, '0'), 4), '/cer000'"
     65      query=$query" RIGHT(LPAD(CeresInfo.fFileNumber, 6, '0'), 3)) from CeresInfo "
     66      query=$query" WHERE fRunNumber="$run" AND fCeresSetupKEY="$cereskey
     67      inputfiles=`sendquery`
    6468      outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8`
    6569      makedir $outpath
    66       log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6`
    67       command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run $inputfile"
     70      log=$outpath/ceres`printf %08d $run `
     71      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run $inputfiles"
    6872      printprocesslog "INFO executing "$command
    6973      $command
    7074      check1=$?
    7175      ;;
    72    3) printprocesslog "INFO run $run and file $file is a pedestal run (key="$runkey")"
     76   3) printprocesslog "INFO run $run is a pedestal run (key="$runkey")"
    7377      drun=`echo "$run + 2 " | bc -l`
    7478      outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8`
    7579      makedir $outpath
    76       log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6`
     80      log=$outpath/ceres`printf %08d $run `
    7781      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run pedestal"
    7882      printprocesslog "INFO executing "$command
     
    8084      check1=$?
    8185      ;;
    82    4) printprocesslog "INFO run $run and file $file is a calibration run (key="$runkey")"
     86   4) printprocesslog "INFO run $run is a calibration run (key="$runkey")"
    8387      drun=`echo "$run + 1 " | bc -l`
    8488      outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8`
    8589      makedir $outpath
    86       log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6`
     90      log=$outpath/ceres`printf %08d $run `
    8791      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run calibration"
    8892      printprocesslog "INFO executing "$command
     
    96100
    97101case $check1 in
    98    0)   printprocesslog "INFO $program finished successfully for run $run file $file cereskey $cereskey runtype $runkey (check1=$check1)"
     102   0)   printprocesslog "INFO $program finished successfully for run $run, cereskey $cereskey, runtype $runkey (check1=$check1)"
    99103        ;;
    100    *)   printprocesslog "ERROR $program failed for run $run file $file cereskey $cereskey runtype $runkey (check1=$check1)"
     104   *)   printprocesslog "ERROR $program failed for run $run, cereskey $cereskey, runtype $runkey (check1=$check1)"
    101105        check=$check1
    102106        ;;
Note: See TracChangeset for help on using the changeset viewer.