Changeset 9610


Ignore:
Timestamp:
Jul 5, 2010, 6:36:42 PM (10 years ago)
Author:
dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9609 r9610  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2010/07/05 Daniela Dorner
     22
     23   * datacenter/scripts/runceres:
     24     - added path for C and P run (was not the same like for D run)
     25
     26   * datacenter/scripts/sourcefile:
     27     - fixed joins in subquerypart()
     28
     29   * datacenter/scripts/runcallisto_mc:
     30     - added inpath to command line
     31
     32   * datacenter/db/mcinfo.php:
     33     - removed FailMenu
     34     - fixed bug (group by did not work in case statusvalue was not
     35       selected)
     36
     37   * datacenter/db/mcdefs.php:
     38     - removed FailMenu columns
     39
     40
     41
    2142 2010/07/05 Thomas Bretz
    2243
  • trunk/MagicSoft/Mars/datacenter/db/mcdefs.php

    r9599 r9610  
    5151     "Callisto"                 => "Callisto",
    5252     "Star"                     => "Star",
    53      "fStartTime"               => "Process",
    54      "fFailedTime"              => "Failed",
    55      "fReturnCode"              => "Ret<br>Code",
    56      "fProgramId"               => "Prgr<br>Id",
    5753     "fZenithDistanceMin"       => "Zd<br>Min",
    5854     "fZenithDistanceMax"       => "Zd<br>Max",
     
    111107    $tables = array
    112108        (
    113          "fNumEvents"                        => $fromtable . ".fNumEvents",
     109         "fNumEvents"                        => "CorsikaInfo.fNumEvents",
    114110         "fMCRunNumber"                      => "MCCorsikaRunData.fMCRunNumber",
    115111         "fRawFileAvail"                     => "RunProcessStatus.fRawFileAvail",
    116112         "SUM(fRunTime)/3600"                => "'Time [h]'",
    117113         "SUM(fNumEvents)"                   => "'Evts'",
    118          "fStartTime"                        => "fStartTime",
    119          "fFailedTime"                       => "fFailedTime",
    120          "fReturnCode"                       => "fReturnCode",
    121          "fProgramId"                        => "fProgramId",
    122114         "fParticleTypeName"                 => "ParticleType.fParticleTypeName",
    123115         "fRunTypeName"                      => "RunType.fRunTypeName",
  • trunk/MagicSoft/Mars/datacenter/db/mcinfo.php

    r9603 r9610  
    8787                        $query0 .= " CONCAT('failed (', " . $key . "Status.fReturnCode, ')'), ";
    8888                        $query0 .= " CONCAT('done (', " . $key . "Status.fStopTime, ";
    89                         $query0 .= " ',', TIMEDIFF(" . $key . "Status.fStopTime, " . $key . "Status.fStartTime), ')')))) ";
     89                        $query0 .= " ', ', TIMEDIFF(" . $key . "Status.fStopTime, " . $key . "Status.fStartTime), ')')))) ";
    9090
    9191                        //$query0 .= ", CONCAT( 'halo', " . $key . "Status.fStartTime)";
     
    103103
    104104        foreach ($_GET as $key => $element)
    105             if (($_GET[$key]=="On" || $groups>0))// && !empty($joins[$key]))
     105            if (($_GET[$key]=="On" || $groups>0 || $statusgroups>0))// && !empty($joins[$key]))
    106106                $query0 .= GetJoin($fromtable,$key);
    107107
     
    210210        printf("<img id='allbutton' src='minus.png' alt='-' onclick=\"showhide('all')\"> <b>Menu</b>&nbsp;&nbsp;&nbsp;&nbsp;\n");
    211211        printf("&nbsp;&nbsp;<img id='infobutton'   src='plus.png' alt='+' onClick=\"showhide('info');showhide('info2')\"> MCRunInfo  \n");
    212         printf("&nbsp;&nbsp;<img id='statbutton'   src='plus.png' alt='+' onClick=\"showhide('stat');showhide('fail')\">  StatusInfo \n");
     212        printf("&nbsp;&nbsp;<img id='statbutton'   src='plus.png' alt='+' onClick=\"showhide('stat')\">  StatusInfo \n");
    213213        printf("&nbsp;&nbsp;<img id='rangesbutton' src='plus.png' alt='+' onClick=\"showhide('ranges')\">                 Ranges     \n");
    214214
    215215        printf(" <div id='all' style='display:block'>");
    216216        PrintMCRunInfoMenu($host,$user,$pw,$db);
    217 //        PrintRunInfo2Menu($host,$user,$pw,$db);
    218217        PrintMCRunStatMenu();
    219         PrintFailMenu();
    220218        printf(" <div id='ranges' style='display:none'>");
    221 //        PrintSequMenu($host,$user,$pw,$db);
    222 //        PrintNightRangeMenu($host,$user,$pw,$db, "RunData");
    223219        printf("<p>");
    224 //        PrintZdRangeMenu($host,$user,$pw,$db);
    225220        PrintMCRunRangeMenu($host,$user,$pw,$db);
    226 //        printf(" <P>\n");
    227 //        PrintSourceMenu($host,$user,$pw,$db);
    228221        printf("<p>");
    229222        printf("</div>");
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto_mc

    r9605 r9610  
    6060setstatus "start"
    6161
    62 command="./callisto -b -q -v4 -f --out=$outpath --log=$log.log --html=$log.html --config=$callistorc $sequfile"
     62command="./callisto -b -q -v4 -f --out=$outpath --ind=$inpath --log=$log.log --html=$log.html --config=$callistorc $sequfile"
    6363printprocesslog "INFO executing "$command
    6464$command
  • trunk/MagicSoft/Mars/datacenter/scripts/runceres

    r9605 r9610  
    5454setstatus "start"
    5555
    56 outpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $run | cut -c 1-4`/`printf %08d $run | cut -c 5-8`
    57 makedir $outpath
    58 log=$outpath/ceres`printf %08d $run `"."`printf %06d $file | cut -c 4-6`
    5956setupfile=$setuppath/$program/`printf %03d $cereskey`/ceres.rc
    6057
     
    6562   2) printprocesslog "INFO run $run and file $file is a data run (key="$runkey")"
    6663      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`
    6767      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run $inputfile"
    6868      printprocesslog "INFO executing "$command
     
    7171      ;;
    7272   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`
    7377      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run pedestal"
    7478      printprocesslog "INFO executing "$command
     
    7781      ;;
    7882   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`
    7987      command="./ceres -b -q -f --config=$setupfile --out=$outpath --log=$log.log --html=$log.html --run-number=$run calibration"
    8088      printprocesslog "INFO executing "$command
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r9605 r9610  
    274274function subquerypart()
    275275{
    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'`
    279288   for (( j=1 ; j < ${#prims[@]} ; j++ ))
    280289   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'`
    282291   done
    283292}
     
    309318   counter=0
    310319   specialneedjoin=
     320   specialinfljoin=
    311321   for need in $needs
    312322   do
     
    316326      fi
    317327      specialneedjoin=$specialneedjoin" "`getjoin $need "SpecialNeed"`
     328      specialinfljoin=$specialinfljoin" "`getjoin $need "SpecialInfluence"`
    318329      if [ "$specialneedjoin" = " " ]
    319330      then
     
    323334         query=$query" ISNULL("$need"Status.fReturnCode) "
    324335         specialneedjoin=
     336         specialinfljoin=
    325337      else
    326338         # special query to check steps which
     
    334346         query=$query" ) = ( "
    335347         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)) "
    339351      fi
    340352      counter=`echo $counter + 1 | bc -l`
     
    504516         query=$query" LEFT JOIN "$influence"Status USING (${inflprims[@]}) "
    505517      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
    507524      fi
    508525   done
Note: See TracChangeset for help on using the changeset viewer.