Changeset 7482 for trunk


Ignore:
Timestamp:
02/07/06 10:53:42 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7481 r7482  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/02/07 Daniela Dorner, Daniel Hoehne
     21
     22   * datacenter/scripts/sourcefile:
     23     - added failure code variables
     24     - changed calling of setstatus.C accordingly
     25
     26   * datacenter/scripts/buildsequenceentries, checkfilesforsequenceavail,
     27     checkstardone, correcttime, dodatacheck, doexclusions, fillcallisto,
     28     fillganymed, fillstar, runcallisto, runganymed, runstar,
     29     writesequencefiles:
     30     - implemented failure variable
     31
     32   * datacenter/macros/getdolist.C, setstatus.C, setupdb.C:
     33     - added new/changed columns (fReturnCode, fFailedCode,
     34       fFailedCodeAdd)
     35
     36
     37
    2038 2006/02/06 Daniela Dorner
    2139
     
    4159     - replaced corresponding pieces of code by the functions getdolist
    4260       and finish
    43      - moved variable $date to function getstatus
     61     - moved variable $date to function getdolist
    4462     - improved logging
    4563     - generalized variables $lockfile and $todofile
  • trunk/MagicSoft/Mars/datacenter/macros/getdolist.C

    r7480 r7482  
    130130                    rc.GetValue(table+".TimerTable", ""),
    131131                    rc.GetValue(table+".Primary", ""));
    132     query+=Form(" WHERE ISNULL(%s) AND ISNULL(fFailedCode) AND ISNULL(fFailedComment) AND ISNULL(fStartTime) AND ISNULL(fFailedTime) ", column.Data());
     132    query+=Form(" WHERE ISNULL(%s) AND ISNULL(fReturnCode) AND ISNULL(fFailedCode) AND ISNULL(fFailedCodeAdd) AND ISNULL(fStartTime) AND ISNULL(fFailedTime) ", column.Data());
    133133
    134134    TIter Next(&l);
  • trunk/MagicSoft/Mars/datacenter/macros/setstatus.C

    r7480 r7482  
    116116}
    117117
    118 Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString statustime, TString failedcode, TString failedcomment, TString starttime, TString failedtime, Bool_t resetall)
     118Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString statustime, TString returncode, TString failedcode, TString failedcodeadd, TString starttime, TString failedtime, Bool_t resetall)
    119119{
    120     cout << "set influenes for " << table << "." << column << endl;
     120    cout << "set influences for " << table << "." << column << endl;
    121121
    122122    //build query and set step and influences for the step
    123123    TString influences  = rc.GetValue(table+"."+column+".Influences", "");
    124124
    125     TString query(Form("UPDATE %s SET %s=%s, fFailedCode=%s, fFailedComment=%s, fFailedTime=%s ",
    126                        table.Data(), column.Data(), statustime.Data(), failedcode.Data(),
    127                        failedcomment.Data(), failedtime.Data()));
     125    TString query(Form("UPDATE %s SET %s=%s, fReturnCode=%s, fFailedCode=%s, fFailedCodeAdd=%s, fFailedTime=%s ",
     126                       table.Data(), column.Data(), statustime.Data(), returncode.Data(), failedcode.Data(),
     127                       failedcodeadd.Data(), failedtime.Data()));
    128128    if (starttime.CompareTo("noreset"))
    129129        query += Form(", fStartTime=%s", starttime.Data());
     
    163163}
    164164
    165 int setstatus(TString primary, TString table, TString column, TString statustime, TString failedcode, TString failedcomment, TString starttime, TString failedtime, Bool_t resetall=kTRUE)
     165int setstatus(TString primary, TString table, TString column, TString statustime, TString returncode, TString failedcode, TString failedcodeadd, TString starttime, TString failedtime, Bool_t resetall=kTRUE)
    166166{
    167167    TEnv env("sql.rc");
     
    182182
    183183    //if reset is needed and/or can be done, set new values
    184     return !CheckReset(rc, table, column, statustime) ? 0 : SetInfluences(serv, rc, primary, table, column, statustime, failedcode, failedcomment, starttime, failedtime, resetall);
     184    return !CheckReset(rc, table, column, statustime) ? 0 : SetInfluences(serv, rc, primary, table, column, statustime, returncode, failedcode, failedcodeadd, starttime, failedtime, resetall);
    185185
    186186}
  • trunk/MagicSoft/Mars/datacenter/macros/setupdb.C

    r7468 r7482  
    606606         "  fFailedTime       DATETIME             NULL,"
    607607         "  fFailedCode       SMALLINT UNSIGNED    NULL,"
    608          "  fFailedComment    VARCHAR(255)         NULL"
     608         "  fReturnCode       SMALLINT UNSIGNED    NULL,"
     609         "  fFailedCodeAdd    INT      UNSIGNED    NULL"
    609610         ")";
    610611
     
    618619         "  fFailedTime            DATETIME             NULL,"
    619620         "  fFailedCode            SMALLINT UNSIGNED    NULL,"
    620          "  fFailedComment         VARCHAR(255)         NULL"
     621         "  fReturnCode            SMALLINT UNSIGNED    NULL,"
     622         "  fFailedCodeAdd         INT      UNSIGNED    NULL"
    621623         ")";
    622624
     
    636638         "  fFailedTime            DATETIME             NULL,"
    637639         "  fFailedCode            SMALLINT UNSIGNED    NULL,"
    638          "  fFailedComment         VARCHAR(255)         NULL"
     640         "  fReturnCode            SMALLINT UNSIGNED    NULL,"
     641         "  fFailedCodeAdd         INT      UNSIGNED    NULL"
    639642         ")";
    640643
     
    651654         "  fFailedTime            DATETIME             NULL,"
    652655         "  fFailedCode            SMALLINT UNSIGNED    NULL,"
    653          "  fFailedComment         VARCHAR(255)         NULL"
     656         "  fReturnCode            SMALLINT UNSIGNED    NULL,"
     657         "  fFailedCodeAdd         INT      UNSIGNED    NULL"
    654658         ")";
    655659
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7476 r7482  
    9898      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1;;
    9999      *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1
    100            com="building of sequences for date $date failed"
     100           com=$Fbuildsequ
    101101           check=$check1
    102102           ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail

    r7476 r7482  
    9999      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
    100100      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    101            com="checking availability of files for sequence $sequence failed"
     101           com=$Ffilesavail
    102102           check=$check1
    103103           ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/checkstardone

    r7476 r7482  
    112112         *)   echo "check1=$check1 -> ERROR " >> $scriptlog 2>&1
    113113              echo "starfiles not available for sequence -> continue" >> $scriptlog 2>&1
    114               com="starfile missing for sequence $sequence"
     114              com=$Fstardone
     115              comadd=$sequence
    115116              check=$check1
    116117              break
  • trunk/MagicSoft/Mars/datacenter/scripts/correcttime

    r7476 r7482  
    9696     1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
    9797     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
    98           com="time correction for run $run failed"
     98          com=$Ftimecorr
    9999          check=$check1
    100100          ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck

    r7476 r7482  
    156156            ;;
    157157       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    158             com="filldotraw for run $run failed"
     158            com=$Ffillraw
    159159            check=$check1
    160160            setstatus "stop" >> $scriptlog 2>&1
     
    181181               ;;
    182182          *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    183                com="sinope for run $run failed"
     183               com=$Fsinope
     184#               comadd=
    184185               check=$check2
    185186               setstatus "stop" >> $scriptlog 2>&1
     
    201202            ;;
    202203       *)   echo "check3=$check3 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    203             com="fillsinope for run $run failed"
     204            com=$Ffillsinope
    204205            check=$check3
    205206            setstatus "stop" >> $scriptlog 2>&1
     
    219220           ;;
    220221      *)   echo "check5=$check5 -> ERROR -> step could not be resetted -> repeat step " >> $scriptlog 2>&1
    221            com="reset status for fExclusionsDone for date $date2 failed"
     222           com=$Fresetexcl
     223           comadd=`echo $date2 | sed -e 's/-//g'`
    222224           check=$check5
    223225           setstatus "stop" >> $scriptlog 2>&1
  • trunk/MagicSoft/Mars/datacenter/scripts/doexclusions

    r7476 r7482  
    9898      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
    9999      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
    100            com="doing exclusions for date $date failed"
     100           com=$Fdoexcl
    101101           check=$check1
    102102           ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto

    r7476 r7482  
    105105      1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;;
    106106      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    107            com="fillcalib for sequence $sequence failed"
     107           com=$Ffillcalib
    108108           check=$check1
    109109           setstatus "stop" >> $scriptlog 2>&1
     
    115115      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    116116      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    117            com="fillsignal for sequencec $sequence failed"
     117           com=$Ffillsignal
    118118           check=$check2
    119119           ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillganymed

    r7476 r7482  
    101101      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    102102      *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    103           com="fillganymed for dataset $dataset failed"
     103          com=$Ffillganymed
    104104          check=$check2
    105105          ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillstar

    r7480 r7482  
    102102      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    103103      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    104            com="fillstar for sequence $sequence failed"
     104           com=$Ffillstar
    105105           check=$check2
    106106           ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r7477 r7482  
    194194             then
    195195                echo "no ccfile found for run "$runno >> $scriptlog 2>&1
    196                 com="no ccfile for run $runno"
     196                com=$Fnoccfile
     197                comadd=$runno
    197198                check=0
    198199                break
     
    216217                      then
    217218                         echo "no cacofile found" >> $scriptlog 2>&1
    218                          com="no cacofile for run $runno"
     219                         com=$Fnocacofile
     220                         comadd=$runno
    219221                         check=0
    220222                      fi   
     
    231233                     0)   echo "check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;;
    232234                     *)   echo "check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1
    233                           com="merppccupdate failed for run $runno"
     235                          com=$Fmerppcc
     236                          comadd=$runno
    234237                          check=$check2
    235238                          break ;;
     
    240243                     0)   echo "check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;;
    241244                     *)   echo "check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1
    242                           com="merppcacoupdate failed for run $runno"
     245                          com=$Fmerppcaco
     246                          comadd=$runno
    243247                          check=$check3
    244248                          break ;;
     
    247251          ;;
    248252     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    249           com="calibration failed"
     253          com=$Fcallisto
    250254          check=$check1
    251255          ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runganymed

    r7477 r7482  
    155155     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;;
    156156     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    157           com="ganymed failed"
     157          com=$Fganymed
    158158          check=$check1
    159159          ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runstar

    r7478 r7482  
    147147     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1;;
    148148     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    149           com="star failed"
     149          com=$Fstar
    150150          check=$check1
    151151          ;;
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7479 r7482  
    5050
    5151
     52#failed codes
     53#sequence build status
     54Fbuildsequ=1
     55Fdoexcl=2
     56#run process status
     57Ftimecorr=3
     58Ffillraw=4
     59Fsinope=5
     60Ffillsinope=6
     61Fresetexcl=7
     62#sequence process status
     63Fwritesequfile=8
     64Ffilesavail=9
     65Fnoccfile=10
     66Fnocacofile=11
     67Fmerppcc=12
     68Fmerppcaco=13
     69Fcallisto=14
     70Ffillcalib=15
     71Ffillsignal=16
     72Fstar=17
     73Ffillstar=18
     74#dataset process status
     75Fstardone=19
     76Fganymed=20
     77Ffillganymed=21
     78
     79
     80
    5281function finish()
    5382{
     
    97126   statustime=NULL
    98127   starttime=NULL
     128   returncode=NULL
    99129   failedcode=NULL
    100    failedcomment=NULL
     130   failedcodeadd=NULL
    101131   failedtime=NULL
    102132}
     
    107137   echo " statustime=$statustime"
    108138   echo " starttime=$starttime"
     139   echo " returncode=$returncode"
    109140   echo " failedcode=$failedcode"
    110    echo " failedcomment=$failedcomment"
     141   echo " failedcodeadd=$failedcodeadd"
    111142   echo " failedtime=$failedtime"
    112143   echo "-- check: -$check-"
     
    129160                  *)  echo " failed"
    130161                      starttime=noreset
    131                       failedcode=$check
    132                       failedcomment=$com
     162                      returncode=$check
     163                      failedcode=$com
     164                      failedcodeadd=$comadd
    133165                      failedtime="Now()"
    134166                      ;;
     
    145177   makedir $setstatuslogpath
    146178   setstatuslog=$setstatuslogpath/setstatus-$@-$program-$var2.log
    147    checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$failedcode\""\,"\"$failedcomment\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
     179   checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$returncode\""\,"\"$failedcode\""\,"\"$failedcodeadd\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    148180   case $checkstatus in
    149181      1)   echo "checkstatus=$checkstatus -> everything ok, status has been set";;
  • trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles

    r7477 r7482  
    101101      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    102102      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    103            com="writing of sequencefile for sequence $sequence failed"
     103           com=$Fwritesequfile
    104104           check=$check2
    105105           ;;
Note: See TracChangeset for help on using the changeset viewer.