Changeset 9898 for trunk/Mars/datacenter/scripts/runceres
- Timestamp:
- 08/27/10 14:20:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/datacenter/scripts/runceres
r9612 r9898 40 40 gettodo "1" 41 41 run=${primaries[0]} 42 file=${primaries[1]} 43 cereskey=${primaries[2]} 42 cereskey=${primaries[1]} 44 43 45 44 # lock sequ for cal 46 lockfile=$lockpath/lock-$step-$run.$ file.$cereskey.txt45 lockfile=$lockpath/lock-$step-$run.$cereskey.txt 47 46 checklock 48 47 … … 50 49 51 50 # run calibration for sequence 52 printprocesslog "INFO starting $program for run $run and file $file andceres-setup $cereskey"51 printprocesslog "INFO starting $program for run $run and ceres-setup $cereskey" 53 52 54 53 setstatus "start" … … 56 55 setupfile=$setuppath/$program/`printf %03d $cereskey`/ceres.rc 57 56 58 query="SELECT fRunTypeKEY FROM CeresInfo WHERE fRunNumber="$run" AND f FileNumber="$file" AND fCeresSetupKEY="$cereskey57 query="SELECT fRunTypeKEY FROM CeresInfo WHERE fRunNumber="$run" AND fCeresSetupKEY="$cereskey 59 58 runkey=`sendquery` 60 59 61 60 case $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` 64 68 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8` 65 69 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" 68 72 printprocesslog "INFO executing "$command 69 73 $command 70 74 check1=$? 71 75 ;; 72 3) printprocesslog "INFO run $run and file $fileis a pedestal run (key="$runkey")"76 3) printprocesslog "INFO run $run is a pedestal run (key="$runkey")" 73 77 drun=`echo "$run + 2 " | bc -l` 74 78 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8` 75 79 makedir $outpath 76 log=$outpath/ceres`printf %08d $run ` "."`printf %06d $file | cut -c 4-6`80 log=$outpath/ceres`printf %08d $run ` 77 81 command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run pedestal" 78 82 printprocesslog "INFO executing "$command … … 80 84 check1=$? 81 85 ;; 82 4) printprocesslog "INFO run $run and file $fileis a calibration run (key="$runkey")"86 4) printprocesslog "INFO run $run is a calibration run (key="$runkey")" 83 87 drun=`echo "$run + 1 " | bc -l` 84 88 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8` 85 89 makedir $outpath 86 log=$outpath/ceres`printf %08d $run ` "."`printf %06d $file | cut -c 4-6`90 log=$outpath/ceres`printf %08d $run ` 87 91 command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run calibration" 88 92 printprocesslog "INFO executing "$command … … 96 100 97 101 case $check1 in 98 0) printprocesslog "INFO $program finished successfully for run $run file $file cereskey $cereskeyruntype $runkey (check1=$check1)"102 0) printprocesslog "INFO $program finished successfully for run $run, cereskey $cereskey, runtype $runkey (check1=$check1)" 99 103 ;; 100 *) printprocesslog "ERROR $program failed for run $run file $file cereskey $cereskeyruntype $runkey (check1=$check1)"104 *) printprocesslog "ERROR $program failed for run $run, cereskey $cereskey, runtype $runkey (check1=$check1)" 101 105 check=$check1 102 106 ;;
Note:
See TracChangeset
for help on using the changeset viewer.