- Timestamp:
- 02/07/06 10:53:42 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7481 r7482 18 18 19 19 -*-*- 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 20 38 2006/02/06 Daniela Dorner 21 39 … … 41 59 - replaced corresponding pieces of code by the functions getdolist 42 60 and finish 43 - moved variable $date to function get status61 - moved variable $date to function getdolist 44 62 - improved logging 45 63 - generalized variables $lockfile and $todofile -
trunk/MagicSoft/Mars/datacenter/macros/getdolist.C
r7480 r7482 130 130 rc.GetValue(table+".TimerTable", ""), 131 131 rc.GetValue(table+".Primary", "")); 132 query+=Form(" WHERE ISNULL(%s) AND ISNULL(f FailedCode) 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()); 133 133 134 134 TIter Next(&l); -
trunk/MagicSoft/Mars/datacenter/macros/setstatus.C
r7480 r7482 116 116 } 117 117 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)118 Int_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) 119 119 { 120 cout << "set influen es for " << table << "." << column << endl;120 cout << "set influences for " << table << "." << column << endl; 121 121 122 122 //build query and set step and influences for the step 123 123 TString influences = rc.GetValue(table+"."+column+".Influences", ""); 124 124 125 TString query(Form("UPDATE %s SET %s=%s, f FailedCode=%s, fFailedComment=%s, fFailedTime=%s ",126 table.Data(), column.Data(), statustime.Data(), failedcode.Data(),127 failedco mment.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())); 128 128 if (starttime.CompareTo("noreset")) 129 129 query += Form(", fStartTime=%s", starttime.Data()); … … 163 163 } 164 164 165 int setstatus(TString primary, TString table, TString column, TString statustime, TString failedcode, TString failedcomment, TString starttime, TString failedtime, Bool_t resetall=kTRUE)165 int setstatus(TString primary, TString table, TString column, TString statustime, TString returncode, TString failedcode, TString failedcodeadd, TString starttime, TString failedtime, Bool_t resetall=kTRUE) 166 166 { 167 167 TEnv env("sql.rc"); … … 182 182 183 183 //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); 185 185 186 186 } -
trunk/MagicSoft/Mars/datacenter/macros/setupdb.C
r7468 r7482 606 606 " fFailedTime DATETIME NULL," 607 607 " fFailedCode SMALLINT UNSIGNED NULL," 608 " fFailedComment VARCHAR(255) NULL" 608 " fReturnCode SMALLINT UNSIGNED NULL," 609 " fFailedCodeAdd INT UNSIGNED NULL" 609 610 ")"; 610 611 … … 618 619 " fFailedTime DATETIME NULL," 619 620 " fFailedCode SMALLINT UNSIGNED NULL," 620 " fFailedComment VARCHAR(255) NULL" 621 " fReturnCode SMALLINT UNSIGNED NULL," 622 " fFailedCodeAdd INT UNSIGNED NULL" 621 623 ")"; 622 624 … … 636 638 " fFailedTime DATETIME NULL," 637 639 " fFailedCode SMALLINT UNSIGNED NULL," 638 " fFailedComment VARCHAR(255) NULL" 640 " fReturnCode SMALLINT UNSIGNED NULL," 641 " fFailedCodeAdd INT UNSIGNED NULL" 639 642 ")"; 640 643 … … 651 654 " fFailedTime DATETIME NULL," 652 655 " fFailedCode SMALLINT UNSIGNED NULL," 653 " fFailedComment VARCHAR(255) NULL" 656 " fReturnCode SMALLINT UNSIGNED NULL," 657 " fFailedCodeAdd INT UNSIGNED NULL" 654 658 ")"; 655 659 -
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7476 r7482 98 98 1) echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1;; 99 99 *) 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 101 101 check=$check1 102 102 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r7476 r7482 99 99 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;; 100 100 *) 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 102 102 check=$check1 103 103 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7476 r7482 112 112 *) echo "check1=$check1 -> ERROR " >> $scriptlog 2>&1 113 113 echo "starfiles not available for sequence -> continue" >> $scriptlog 2>&1 114 com="starfile missing for sequence $sequence" 114 com=$Fstardone 115 comadd=$sequence 115 116 check=$check1 116 117 break -
trunk/MagicSoft/Mars/datacenter/scripts/correcttime
r7476 r7482 96 96 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;; 97 97 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; 98 com= "time correction for run $run failed"98 com=$Ftimecorr 99 99 check=$check1 100 100 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck
r7476 r7482 156 156 ;; 157 157 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 158 com= "filldotraw for run $run failed"158 com=$Ffillraw 159 159 check=$check1 160 160 setstatus "stop" >> $scriptlog 2>&1 … … 181 181 ;; 182 182 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 183 com="sinope for run $run failed" 183 com=$Fsinope 184 # comadd= 184 185 check=$check2 185 186 setstatus "stop" >> $scriptlog 2>&1 … … 201 202 ;; 202 203 *) echo "check3=$check3 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 203 com= "fillsinope for run $run failed"204 com=$Ffillsinope 204 205 check=$check3 205 206 setstatus "stop" >> $scriptlog 2>&1 … … 219 220 ;; 220 221 *) 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'` 222 224 check=$check5 223 225 setstatus "stop" >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7476 r7482 98 98 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;; 99 99 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; 100 com= "doing exclusions for date $date failed"100 com=$Fdoexcl 101 101 check=$check1 102 102 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
r7476 r7482 105 105 1) echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;; 106 106 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 107 com= "fillcalib for sequence $sequence failed"107 com=$Ffillcalib 108 108 check=$check1 109 109 setstatus "stop" >> $scriptlog 2>&1 … … 115 115 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; 116 116 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 117 com= "fillsignal for sequencec $sequence failed"117 com=$Ffillsignal 118 118 check=$check2 119 119 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
r7476 r7482 101 101 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; 102 102 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 103 com= "fillganymed for dataset $dataset failed"103 com=$Ffillganymed 104 104 check=$check2 105 105 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/fillstar
r7480 r7482 102 102 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; 103 103 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 104 com= "fillstar for sequence $sequence failed"104 com=$Ffillstar 105 105 check=$check2 106 106 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7477 r7482 194 194 then 195 195 echo "no ccfile found for run "$runno >> $scriptlog 2>&1 196 com="no ccfile for run $runno" 196 com=$Fnoccfile 197 comadd=$runno 197 198 check=0 198 199 break … … 216 217 then 217 218 echo "no cacofile found" >> $scriptlog 2>&1 218 com="no cacofile for run $runno" 219 com=$Fnocacofile 220 comadd=$runno 219 221 check=0 220 222 fi … … 231 233 0) echo "check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;; 232 234 *) echo "check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1 233 com="merppccupdate failed for run $runno" 235 com=$Fmerppcc 236 comadd=$runno 234 237 check=$check2 235 238 break ;; … … 240 243 0) echo "check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;; 241 244 *) echo "check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1 242 com="merppcacoupdate failed for run $runno" 245 com=$Fmerppcaco 246 comadd=$runno 243 247 check=$check3 244 248 break ;; … … 247 251 ;; 248 252 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 249 com= "calibration failed"253 com=$Fcallisto 250 254 check=$check1 251 255 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7477 r7482 155 155 0) echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;; 156 156 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 157 com= "ganymed failed"157 com=$Fganymed 158 158 check=$check1 159 159 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7478 r7482 147 147 0) echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1;; 148 148 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 149 com= "star failed"149 com=$Fstar 150 150 check=$check1 151 151 ;; -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7479 r7482 50 50 51 51 52 #failed codes 53 #sequence build status 54 Fbuildsequ=1 55 Fdoexcl=2 56 #run process status 57 Ftimecorr=3 58 Ffillraw=4 59 Fsinope=5 60 Ffillsinope=6 61 Fresetexcl=7 62 #sequence process status 63 Fwritesequfile=8 64 Ffilesavail=9 65 Fnoccfile=10 66 Fnocacofile=11 67 Fmerppcc=12 68 Fmerppcaco=13 69 Fcallisto=14 70 Ffillcalib=15 71 Ffillsignal=16 72 Fstar=17 73 Ffillstar=18 74 #dataset process status 75 Fstardone=19 76 Fganymed=20 77 Ffillganymed=21 78 79 80 52 81 function finish() 53 82 { … … 97 126 statustime=NULL 98 127 starttime=NULL 128 returncode=NULL 99 129 failedcode=NULL 100 failedco mment=NULL130 failedcodeadd=NULL 101 131 failedtime=NULL 102 132 } … … 107 137 echo " statustime=$statustime" 108 138 echo " starttime=$starttime" 139 echo " returncode=$returncode" 109 140 echo " failedcode=$failedcode" 110 echo " failedco mment=$failedcomment"141 echo " failedcodeadd=$failedcodeadd" 111 142 echo " failedtime=$failedtime" 112 143 echo "-- check: -$check-" … … 129 160 *) echo " failed" 130 161 starttime=noreset 131 failedcode=$check 132 failedcomment=$com 162 returncode=$check 163 failedcode=$com 164 failedcodeadd=$comadd 133 165 failedtime="Now()" 134 166 ;; … … 145 177 makedir $setstatuslogpath 146 178 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)//'` 148 180 case $checkstatus in 149 181 1) echo "checkstatus=$checkstatus -> everything ok, status has been set";; -
trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
r7477 r7482 101 101 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; 102 102 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 103 com= "writing of sequencefile for sequence $sequence failed"103 com=$Fwritesequfile 104 104 check=$check2 105 105 ;;
Note:
See TracChangeset
for help on using the changeset viewer.