Changeset 9107 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Oct 2, 2006, 1:49:11 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r9054 r9107 6084 6084 bool mdcf ///< format as mdconfig or simple 6085 6085 ); 6086 /** detProcessedExpRow data structure 6087 * 6088 * Structure for representing a single row of detProcessedExp table data. 6089 */ 6090 6091 typedef struct { 6092 psS32 det_id; 6093 char *exp_tag; 6094 char *recipe; 6095 psF64 bg; 6096 psF64 bg_stdev; 6097 psF64 bg_mean_stdev; 6098 char *b1_uri; 6099 char *b2_uri; 6100 } detProcessedExpRow; 6101 6102 /** Creates a new detProcessedExpRow object 6103 * 6104 * @return A new detProcessedExpRow object or NULL on failure. 6105 */ 6106 6107 detProcessedExpRow *detProcessedExpRowAlloc( 6108 psS32 det_id, 6109 const char *exp_tag, 6110 const char *recipe, 6111 psF64 bg, 6112 psF64 bg_stdev, 6113 psF64 bg_mean_stdev, 6114 const char *b1_uri, 6115 const char *b2_uri 6116 ); 6117 6118 /** Creates a new detProcessedExp table 6119 * 6120 * @return true on success 6121 */ 6122 6123 bool detProcessedExpCreateTable( 6124 psDB *dbh ///< Database handle 6125 ); 6126 6127 /** Deletes a detProcessedExp table 6128 * 6129 * @return true on success 6130 */ 6131 6132 bool detProcessedExpDropTable( 6133 psDB *dbh ///< Database handle 6134 ); 6135 6136 /** Insert a single row into a table 6137 * 6138 * This function constructs and inserts a single row based on it's parameters. 6139 * 6140 * @return true on success 6141 */ 6142 6143 bool detProcessedExpInsert( 6144 psDB *dbh, ///< Database handle 6145 psS32 det_id, 6146 const char *exp_tag, 6147 const char *recipe, 6148 psF64 bg, 6149 psF64 bg_stdev, 6150 psF64 bg_mean_stdev, 6151 const char *b1_uri, 6152 const char *b2_uri 6153 ); 6154 6155 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 6156 * 6157 * @return A The number of rows removed or a negative value on error 6158 */ 6159 6160 long long detProcessedExpDelete( 6161 psDB *dbh, ///< Database handle 6162 const psMetadata *where, ///< Row match criteria 6163 unsigned long long limit ///< Maximum number of elements to delete 6164 ); 6165 6166 /** Removes the last row from the database and returns it 6167 * 6168 * @return true on success 6169 */ 6170 6171 bool detProcessedExpPop( 6172 psDB *dbh, ///< Database handle 6173 psS32 *det_id, 6174 char **exp_tag, 6175 char **recipe, 6176 psF64 *bg, 6177 psF64 *bg_stdev, 6178 psF64 *bg_mean_stdev, 6179 char **b1_uri, 6180 char **b2_uri 6181 ); 6182 6183 /** Insert a single detProcessedExpRow object into a table 6184 * 6185 * This function constructs and inserts a single row based on it's parameters. 6186 * 6187 * @return true on success 6188 */ 6189 6190 bool detProcessedExpInsertObject( 6191 psDB *dbh, ///< Database handle 6192 detProcessedExpRow *object ///< detProcessedExpRow object 6193 ); 6194 6195 /** Insert an array of detProcessedExpRow object into a table 6196 * 6197 * This function constructs and inserts multiple rows based on it's parameters. 6198 * 6199 * @return true on success 6200 */ 6201 6202 bool detProcessedExpInsertObjects( 6203 psDB *dbh, ///< Database handle 6204 psArray *objects ///< array of detProcessedExpRow objects 6205 ); 6206 6207 /** Removes the last row from the database and returns it 6208 * 6209 * @return A new detProcessedExpRow on success or NULL on failure. 6210 */ 6211 6212 detProcessedExpRow *detProcessedExpPopObject( 6213 psDB *dbh ///< Database handle 6214 ); 6215 6216 /** Insert data from a binary FITS table detProcessedExpRow into the database 6217 * 6218 * This function expects a psFits object with a FITS table as the first 6219 * extension. The table must have at least one row of data in it, that is of 6220 * the appropriate format (number of columns and their type). All other 6221 * extensions are ignored. 6222 * 6223 * @return true on success 6224 */ 6225 6226 bool detProcessedExpInsertFits( 6227 psDB *dbh, ///< Database handle 6228 const psFits *fits ///< psFits object 6229 ); 6230 6231 /** Removes the last limit row from the database and returns them in a binary FITS table. 6232 * 6233 * This function assumes an empty psFits object and will create a FITS table as 6234 * the first extension. 6235 * 6236 * @return true on success 6237 */ 6238 6239 bool detProcessedExpPopFits( 6240 psDB *dbh, ///< Database handle 6241 psFits *fits, ///< psFits object 6242 unsigned long long limit ///< Maximum number of elements to return 6243 ); 6244 6245 /** Selects up to limit from the database and returns them in a binary FITS table 6246 * 6247 * This function assumes an empty psFits object and will create a FITS table 6248 * as the first extension. 6249 * 6250 * See psDBSelectRows() for documentation on the format of where. 6251 * 6252 * @return true on success 6253 */ 6254 6255 bool detProcessedExpSelectRowsFits( 6256 psDB *dbh, ///< Database handle 6257 psFits *fits, ///< psFits object 6258 const psMetadata *where, ///< Row match criteria 6259 unsigned long long limit ///< Maximum number of elements to return 6260 ); 6261 6262 /** Convert a detProcessedExpRow into an equivalent psMetadata 6263 * 6264 * @return A psMetadata pointer or NULL on error 6265 */ 6266 6267 psMetadata *detProcessedExpMetadataFromObject( 6268 const detProcessedExpRow *object ///< fooRow to convert into a psMetadata 6269 ); 6270 6271 /** Convert a psMetadata into an equivalent fooRow 6272 * 6273 * @return A detProcessedExpRow pointer or NULL on error 6274 */ 6275 6276 detProcessedExpRow *detProcessedExpObjectFromMetadata( 6277 psMetadata *md ///< psMetadata to convert into a fooRow 6278 ); 6279 /** Selects up to limit rows from the database and returns as detProcessedExpRow objects in a psArray 6280 * 6281 * See psDBSelectRows() for documentation on the format of where. 6282 * 6283 * @return A psArray pointer or NULL on error 6284 */ 6285 6286 psArray *detProcessedExpSelectRowObjects( 6287 psDB *dbh, ///< Database handle 6288 const psMetadata *where, ///< Row match criteria 6289 unsigned long long limit ///< Maximum number of elements to return 6290 ); 6291 /** Deletes a row from the database coresponding to an detProcessedExp 6292 * 6293 * Note that a 'where' search psMetadata is constructed from each object and 6294 * used to find rows to delete. 6295 * 6296 * @return A The number of rows removed or a negative value on error 6297 */ 6298 6299 bool detProcessedExpDeleteObject( 6300 psDB *dbh, ///< Database handle 6301 const detProcessedExpRow *object ///< Object to delete 6302 ); 6303 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 6304 * 6305 * Note that a 'where' search psMetadata is constructed from each object and 6306 * used to find rows to delete. 6307 * 6308 * @return A The number of rows removed or a negative value on error 6309 */ 6310 6311 long long detProcessedExpDeleteRowObjects( 6312 psDB *dbh, ///< Database handle 6313 const psArray *objects, ///< Array of objects to delete 6314 unsigned long long limit ///< Maximum number of elements to delete 6315 ); 6316 /** Formats and prints an array of detProcessedExpRow objects 6317 * 6318 * When mdcf is set the formated output is in psMetadataConfig 6319 * format, otherwise it is in a simple tabular format. 6320 * 6321 * @return true on success 6322 */ 6323 6324 bool detProcessedExpPrintObjects( 6325 FILE *stream, ///< a stream 6326 psArray *objects, ///< An array of detProcessedExpRow objects 6327 bool mdcf ///< format as mdconfig or simple 6328 ); 6086 6329 /** detStackedImfileRow data structure 6087 6330 * … … 6098 6341 psF64 bg_stdev; 6099 6342 psF64 bg_mean_stdev; 6100 bool normalize;6101 6343 } detStackedImfileRow; 6102 6344 … … 6114 6356 psF64 bg, 6115 6357 psF64 bg_stdev, 6116 psF64 bg_mean_stdev, 6117 bool normalize 6358 psF64 bg_mean_stdev 6118 6359 ); 6119 6360 … … 6152 6393 psF64 bg, 6153 6394 psF64 bg_stdev, 6154 psF64 bg_mean_stdev, 6155 bool normalize 6395 psF64 bg_mean_stdev 6156 6396 ); 6157 6397 … … 6181 6421 psF64 *bg, 6182 6422 psF64 *bg_stdev, 6183 psF64 *bg_mean_stdev, 6184 bool *normalize 6423 psF64 *bg_mean_stdev 6185 6424 ); 6186 6425
Note:
See TracChangeset
for help on using the changeset viewer.
