Changeset 9898 for trunk/Mars


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

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r9897 r9898  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2010/08/27 Daniela Dorner
     22
     23   * datacenter/scripts/insertmc:
     24     - updated some default values
     25
     26   * datacenter/scripts/insertmc, datacenter/scripts/insertmc,
     27     resources/step_fact.rc:
     28     - changed processing of ceres from file- to run-basis
     29
     30
    2031
    2132 2010/08/26 Daniela Dorner
  • trunk/Mars/datacenter/scripts/insertmc

    r9876 r9898  
    1818#
    1919#
    20 #   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    21 #
    22 #   Copyright: MAGIC Software Development, 2000-2007
     20#   Author(s): Daniela Dorner  08/2010 <mailto:daniela.dorner@unige.ch>
     21#
     22#   Copyright: MAGIC Software Development, 2000-2010
    2323#
    2424#
     
    9595impactmax=80000 # for protons (and irons ?)
    9696#impactmax=42500 # for gammas
    97 #impactmax=17500 # for muons
     97#impactmax=20000 # for muons
    9898
    9999# view cone
    100 viewconemax=4.5 # for muons and protons and irons
     100viewconemax=5.0 # for protons and irons
     101#viewconemax=4.5 # for muons
    101102#viewconemax=0 # for gammas
    102103
     
    273274         query="INSERT CeresInfo SET fSequenceNumber="$drun", fRunNumber="$drun", fFileNumber="$i", fCeresSetupKEY="$cereskey", fRunTypeKEY=2"
    274275         sendquery2
    275          query="INSERT CeresStatus SET fRunNumber="$drun", fFileNumber="$i", fCeresSetupKEY="$cereskey", fPriority="$drun
    276          sendquery2
    277276      done
    278277
     
    281280      query="INSERT CeresInfo SET fSequenceNumber="$drun", fRunNumber="$crun", fFileNumber=1, fCeresSetupKEY="$cereskey", fRunTypeKEY=4"
    282281      sendquery2
    283       query="INSERT CeresStatus SET fRunNumber="$prun", fFileNumber=1, fCeresSetupKEY="$cereskey", fPriority="$prun
    284       sendquery2
    285       query="INSERT CeresStatus SET fRunNumber="$crun", fFileNumber=1, fCeresSetupKEY="$cereskey", fPriority="$crun
     282      query="INSERT CeresStatus SET fRunNumber="$drun", fCeresSetupKEY="$cereskey", fPriority="$drun
     283      sendquery2
     284      query="INSERT CeresStatus SET fRunNumber="$prun", fCeresSetupKEY="$cereskey", fPriority="$prun
     285      sendquery2
     286      query="INSERT CeresStatus SET fRunNumber="$crun", fCeresSetupKEY="$cereskey", fPriority="$crun
    286287      sendquery2
    287288      query="INSERT Star SET fSequenceNumber="$drun", fCeresSetupKEY="$cereskey
  • 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        ;;
  • trunk/Mars/resources/steps_fact.rc

    r9853 r9898  
    44
    55Ceres.MainTable: Ceres
    6 Ceres.Primaries: fRunNumber, fFileNumber, fCeresSetupKEY
     6Ceres.Primaries: fRunNumber, fCeresSetupKEY
    77Ceres.Needs: Corsika
    8 Ceres.SpecialJoin: LEFT JOIN CeresInfo USING(fRunNumber, fFileNumber, fCeresSetupKEY)
     8Ceres.SpecialJoin: LEFT JOIN CeresInfo USING(fRunNumber, fCeresSetupKEY)
    99
    1010SequenceFile.MainTable: Ceres
Note: See TracChangeset for help on using the changeset viewer.