Changeset 8849
- Timestamp:
- Sep 19, 2006, 5:20:04 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 10 edited
-
. (modified) (1 prop)
-
.cvsignore (modified) (1 diff)
-
chiptool.c (modified) (8 diffs)
-
dettool.c (modified) (1 diff)
-
pxtables.c (modified) (1 diff)
-
pzgetexp.c (modified) (5 diffs)
-
pzgetexpConfig.c (modified) (1 diff)
-
pzgetimfiles.c (modified) (4 diffs)
-
pzgetimfilesConfig.c (modified) (1 diff)
-
pztool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src
- Property svn:ignore
-
old new 10 10 *.lo 11 11 p0tool 12 p1 search13 p2 search12 p1tool 13 p2tool 14 14 pxadmin 15 15 pzgetexp 16 16 pzgetimfiles 17 pz search17 pztool 18 18 dettool 19 19 pxinject
-
- Property svn:ignore
-
trunk/ippTools/src/.cvsignore
r8323 r8849 10 10 *.lo 11 11 p0tool 12 p1 search13 p2 search12 p1tool 13 p2tool 14 14 pxadmin 15 15 pzgetexp 16 16 pzgetimfiles 17 pz search17 pztool 18 18 dettool 19 19 pxinject -
trunk/ippTools/src/chiptool.c
r8667 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 5 7 #include <stdlib.h> 6 8 … … 81 83 } 82 84 psArray *pendingFrames = p2PendingFrameSearch(config); 83 // XXX compare raw frames to pending frames and remove duplicate 85 // XXX compare raw frames to pending frames and remove duplicate 84 86 // frames from the raw set. This may not be quiet right as it's 85 87 // possible (likely?) that a rawScienceExp is inserted into the … … 97 99 i--; 98 100 break; 99 } 101 } 100 102 } 101 103 } … … 116 118 i--; 117 119 break; 118 } 120 } 119 121 } 120 122 } … … 181 183 // the p2ProcessedeImfile tables 182 184 // remove corresponding entries from the 183 // p2PendingImfile table 185 // p2PendingImfile table 184 186 // check to see if any p2PendingExps have no 185 // associated p2PendingImfiles 187 // associated p2PendingImfiles 186 188 // if so move the p2PendingExp(s) to p2ProcessedExp 187 189 188 190 psString query = psStringCopy( 189 191 "SELECT DISTINCT" … … 198 200 { 199 201 psMetadata *where = psMetadataAlloc(); 200 bool status = false; 202 bool status = false; 201 203 psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id"); if (!status) { 202 204 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id"); … … 319 321 } 320 322 321 // point of no return for p2PendingImfile -> p2ProcessedImfile 323 // point of no return for p2PendingImfile -> p2ProcessedImfile 322 324 // point of no return for p2PendingExp -> p2ProcessedExp 323 325 if (!psDBCommit(config->dbh)) { … … 333 335 PS_ASSERT_PTR_NON_NULL(config, false); 334 336 335 // look for completed p2PendingExp 337 // look for completed p2PendingExp 336 338 // migrate them to p2ProccessedExp & p3PendingExp 337 339 338 340 // select * from p2PendingExp 339 // where exp_id is not in p2ProcessedExp 341 // where exp_id is not in p2ProcessedExp 340 342 // where exp_id is not in p2PendingImfile 341 343 // where the number of entries in p2ProccessedImfile matches the .imfiles -
trunk/ippTools/src/dettool.c
r8657 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 5 7 #include <stdlib.h> 6 8 #include <ippdb.h> -
trunk/ippTools/src/pxtables.c
r8661 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <pslib.h> 5 8 #include "pxtools.h" 6 9 -
trunk/ippTools/src/pzgetexp.c
r8733 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 5 7 #include <stdlib.h> 6 #include <stdio.h>7 8 8 9 #include "pxtools.h" … … 23 24 // a metadatadb function to retrun the last entry without removing it from 24 25 // the database 25 psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0); 26 psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0); 26 27 if (summitExps) { 27 28 haveLastFileSet = true; … … 31 32 32 33 // invoke dsproductls 33 // dsproductls --uri <> --last_fileset <> 34 // dsproductls --uri <> --last_fileset <> 34 35 bool status = false; 35 36 psString uri = psMetadataLookupStr(&status, config->args, "-uri"); … … 138 139 char *uri = psListGetAndIncrement(tokenCursor); 139 140 char *exp_id = psListGetAndIncrement(tokenCursor); // fileset 140 char *time = psListGetAndIncrement(tokenCursor); // datetime 141 char *time = psListGetAndIncrement(tokenCursor); // datetime 141 142 char *exp_type = psListGetAndIncrement(tokenCursor); // type 142 143 … … 162 163 psArrayAdd(summitExps, 0, row); 163 164 } 164 165 165 166 psFree(lineCursor); 166 167 psFree(doc); -
trunk/ippTools/src/pzgetexpConfig.c
r7027 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <pslib.h> 5 8 #include <pmConfig.h> 6 9 -
trunk/ippTools/src/pzgetimfiles.c
r7365 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 5 7 #include <stdlib.h> 6 #include <stdio.h>7 8 8 9 #include "pxtools.h" … … 47 48 if (!newImfiles) { 48 49 // XXX not nessicarily an error 49 psError(PS_ERR_UNKNOWN, true, "no new files/imfiles"); 50 psError(PS_ERR_UNKNOWN, true, "no new files/imfiles"); 50 51 goto FAIL; 51 52 } … … 110 111 "failed to find summitExp with exp_id %s (should not happen)" 111 112 , exp_id); 112 goto FAIL; 113 goto FAIL; 113 114 } 114 115 } 115 116 116 117 // insert a new pzPendingExp 117 summitExpRow *summitExp = summitExps->data[0]; 118 summitExpRow *summitExp = summitExps->data[0]; 118 119 pzPendingExpRow *pzPendingExp = pzPendingExpRowAlloc( 119 120 summitExp->exp_id, … … 121 122 summitExp->telescope, 122 123 summitExp->exp_type, 123 nImfiles 124 nImfiles 124 125 ); 125 126 psFree(summitExps); -
trunk/ippTools/src/pzgetimfilesConfig.c
r7027 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <pslib.h> 5 8 #include <pmConfig.h> 6 9 -
trunk/ippTools/src/pztool.c
r8536 r8849 3 3 #endif 4 4 5 #include <stdio.h> 6 #include <string.h> 5 7 #include <stdlib.h> 6 8 … … 59 61 psArray *summit = summitExpSelectRowObjects(config->dbh, 60 62 config->where, MAX_ROWS); 61 if (!summit) { 63 if (!summit) { 62 64 psError(PS_ERR_UNKNOWN, false, "no summitExp rows found"); \ 63 return false; 64 } 65 return false; 66 } 65 67 66 68 psArray *new = newExpSelectRowObjects(config->dbh, 67 69 config->where, MAX_ROWS); 68 if (!new) { 70 if (!new) { 69 71 psError(PS_ERR_UNKNOWN, false, "no newExp rows found"); \ 70 } 72 } 71 73 72 74 if (new) { … … 138 140 139 141 if (!newImfileInsert( 140 config->dbh, 142 config->dbh, 141 143 pendingImfile->exp_id, 142 144 pendingImfile->class, … … 147 149 psError(PS_ERR_UNKNOWN, false, "dbh access failed"); 148 150 psFree(pending); 149 goto ROLLBACK; 151 goto ROLLBACK; 150 152 } 151 153 } … … 154 156 psError(PS_ERR_UNKNOWN, false, "dbh access failed"); 155 157 psFree(pending); 156 goto ROLLBACK; 158 goto ROLLBACK; 157 159 } 158 160 psFree(pending); … … 161 163 if (!pztoolFlushPendingExp(config)) { 162 164 psError(PS_ERR_UNKNOWN, false, "pztoolFlushPendingExp() failed"); 163 goto ROLLBACK; 164 } 165 166 // point of no return 165 goto ROLLBACK; 166 } 167 168 // point of no return 167 169 if (!psDBCommit(config->dbh)) { 168 170 psError(PS_ERR_UNKNOWN, false, "database error"); 169 171 // XXX is this the right thing to do after a commit failure? 170 goto ROLLBACK; 172 goto ROLLBACK; 171 173 } 172 174
Note:
See TracChangeset
for help on using the changeset viewer.
