Changeset 9610 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 07/05/10 18:36:42 (14 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto_mc
r9605 r9610 60 60 setstatus "start" 61 61 62 command="./callisto -b -q -v4 -f --out=$outpath -- log=$log.log --html=$log.html --config=$callistorc $sequfile"62 command="./callisto -b -q -v4 -f --out=$outpath --ind=$inpath --log=$log.log --html=$log.html --config=$callistorc $sequfile" 63 63 printprocesslog "INFO executing "$command 64 64 $command -
trunk/MagicSoft/Mars/datacenter/scripts/runceres
r9605 r9610 54 54 setstatus "start" 55 55 56 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8`57 makedir $outpath58 log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6`59 56 setupfile=$setuppath/$program/`printf %03d $cereskey`/ceres.rc 60 57 … … 65 62 2) printprocesslog "INFO run $run and file $file is a data run (key="$runkey")" 66 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` 64 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8` 65 makedir $outpath 66 log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6` 67 67 command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run $inputfile" 68 68 printprocesslog "INFO executing "$command … … 71 71 ;; 72 72 3) printprocesslog "INFO run $run and file $file is a pedestal run (key="$runkey")" 73 drun=`echo "$run + 2 " | bc -l` 74 $outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8` 75 makedir $outpath 76 log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6` 73 77 command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run pedestal" 74 78 printprocesslog "INFO executing "$command … … 77 81 ;; 78 82 4) printprocesslog "INFO run $run and file $file is a calibration run (key="$runkey")" 83 drun=`echo "$run + 1 " | bc -l` 84 $outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $drun | cut -c 1-4`/`printf %08d $drun | cut -c 5-8` 85 makedir $outpath 86 log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6` 79 87 command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run calibration" 80 88 printprocesslog "INFO executing "$command -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r9605 r9610 274 274 function subquerypart() 275 275 { 276 query=$query" SELECT COUNT(*) FROM "$need"Status " 277 query=$query" "`getjoin $need "SpecialInfluence"`" " 278 query=$query" WHERE "$step"Status."`echo ${prims[0]} | sed -e 's/,//g'`"="$step"Status."`echo ${prims[0]} | sed -e 's/,//g'` 276 query=$query" SELECT COUNT(*) FROM "$need"Status "`getjoin $need "SpecialInfluence"` 277 needinfluences=`grep $need $steps | grep "Needs" | grep -v "$need[.]Needs" | cut -d'.' -f1` 278 for needinfl in $needinfluences 279 do 280 needinfljoin=`getjoin $needinfl "Influence"` 281 if ! [ "$needinfljoin" = "" ] 282 then 283 query=$query" LEFT JOIN "$needinfl"Status USING ("$needinfljoin") " 284 fi 285 query=$query" "`getjoin $needinfl "SpecialInfluence"`" " 286 done 287 query=$query" WHERE "`echo ${prims[0]} | sed -e 's/,//g'`"="$step"Status."`echo ${prims[0]} | sed -e 's/,//g'` 279 288 for (( j=1 ; j < ${#prims[@]} ; j++ )) 280 289 do 281 query=$query" AND " $step"Status."`echo ${prims[$j]} | sed -e 's/,//g'`"="$step"Status."`echo ${prims[$j]} | sed -e 's/,//g'`290 query=$query" AND "`echo ${prims[$j]} | sed -e 's/,//g'`"="$step"Status."`echo ${prims[$j]} | sed -e 's/,//g'` 282 291 done 283 292 } … … 309 318 counter=0 310 319 specialneedjoin= 320 specialinfljoin= 311 321 for need in $needs 312 322 do … … 316 326 fi 317 327 specialneedjoin=$specialneedjoin" "`getjoin $need "SpecialNeed"` 328 specialinfljoin=$specialinfljoin" "`getjoin $need "SpecialInfluence"` 318 329 if [ "$specialneedjoin" = " " ] 319 330 then … … 323 334 query=$query" ISNULL("$need"Status.fReturnCode) " 324 335 specialneedjoin= 336 specialinfljoin= 325 337 else 326 338 # special query to check steps which … … 334 346 query=$query" ) = ( " 335 347 subquerypart 336 query=$query" AND NOT ISNULL( fStartTime) "337 query=$query" AND NOT ISNULL( fStopTime) "338 query=$query" AND ISNULL( fReturnCode)) "348 query=$query" AND NOT ISNULL("$need"Status.fStartTime) " 349 query=$query" AND NOT ISNULL("$need"Status.fStopTime) " 350 query=$query" AND ISNULL("$need"Status.fReturnCode)) " 339 351 fi 340 352 counter=`echo $counter + 1 | bc -l` … … 504 516 query=$query" LEFT JOIN "$influence"Status USING (${inflprims[@]}) " 505 517 else 506 query=$query" "$infljoin 518 query=$query" LEFT JOIN "$influence"Status USING ("$infljoin") " 519 fi 520 specialinfljoin2=`getjoin $influence "SpecialInfluence"` 521 if ! [ "$specialinfljoin2" = "" ] 522 then 523 query=$query" "$specialinfljoin2 507 524 fi 508 525 done
Note:
See TracChangeset
for help on using the changeset viewer.