IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 15, 2006, 4:31:35 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.h

    r8325 r8368  
    62796279    bool            mdcf                ///< format as mdconfig or simple
    62806280);
     6281/** detNormalizedStatImfileRow data structure
     6282 *
     6283 * Structure for representing a single row of detNormalizedStatImfile table data.
     6284 */
     6285
     6286typedef struct {
     6287    psS32           det_id;
     6288    psS32           iteration;
     6289    char            *class_id;
     6290    psF32           norm;
     6291} detNormalizedStatImfileRow;
     6292
     6293/** Creates a new detNormalizedStatImfileRow object
     6294 *
     6295 *  @return A new detNormalizedStatImfileRow object or NULL on failure.
     6296 */
     6297
     6298detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(
     6299    psS32           det_id,
     6300    psS32           iteration,
     6301    const char      *class_id,
     6302    psF32           norm
     6303);
     6304
     6305/** Creates a new detNormalizedStatImfile table
     6306 *
     6307 * @return true on success
     6308 */
     6309
     6310bool detNormalizedStatImfileCreateTable(
     6311    psDB            *dbh                ///< Database handle
     6312);
     6313
     6314/** Deletes a detNormalizedStatImfile table
     6315 *
     6316 * @return true on success
     6317 */
     6318
     6319bool detNormalizedStatImfileDropTable(
     6320    psDB            *dbh                ///< Database handle
     6321);
     6322
     6323/** Insert a single row into a table
     6324 *
     6325 * This function constructs and inserts a single row based on it's parameters.
     6326 *
     6327 * @return true on success
     6328 */
     6329
     6330bool detNormalizedStatImfileInsert(
     6331    psDB            *dbh,               ///< Database handle
     6332    psS32           det_id,
     6333    psS32           iteration,
     6334    const char      *class_id,
     6335    psF32           norm
     6336);
     6337
     6338/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     6339 *
     6340 * @return A The number of rows removed or a negative value on error
     6341 */
     6342
     6343long long detNormalizedStatImfileDelete(
     6344    psDB            *dbh,               ///< Database handle
     6345    const psMetadata *where,            ///< Row match criteria
     6346    unsigned long long limit            ///< Maximum number of elements to delete
     6347);
     6348
     6349/** Removes the last row from the database and returns it
     6350 *
     6351 * @return true on success
     6352 */
     6353
     6354bool detNormalizedStatImfilePop(
     6355    psDB            *dbh,               ///< Database handle
     6356    psS32           *det_id,
     6357    psS32           *iteration,
     6358    char            **class_id,
     6359    psF32           *norm
     6360);
     6361
     6362/** Insert a single detNormalizedStatImfileRow object into a table
     6363 *
     6364 * This function constructs and inserts a single row based on it's parameters.
     6365 *
     6366 * @return true on success
     6367 */
     6368
     6369bool detNormalizedStatImfileInsertObject(
     6370    psDB            *dbh,               ///< Database handle
     6371    detNormalizedStatImfileRow *object             ///< detNormalizedStatImfileRow object
     6372);
     6373
     6374/** Insert an array of detNormalizedStatImfileRow object into a table
     6375 *
     6376 * This function constructs and inserts multiple rows based on it's parameters.
     6377 *
     6378 * @return true on success
     6379 */
     6380
     6381bool detNormalizedStatImfileInsertObjects(
     6382    psDB            *dbh,               ///< Database handle
     6383    psArray         *objects            ///< array of detNormalizedStatImfileRow objects
     6384);
     6385
     6386/** Removes the last row from the database and returns it
     6387 *
     6388 * @return A new detNormalizedStatImfileRow on success or NULL on failure.
     6389 */
     6390
     6391detNormalizedStatImfileRow *detNormalizedStatImfilePopObject(
     6392    psDB            *dbh                ///< Database handle
     6393);
     6394
     6395/** Insert data from a binary FITS table detNormalizedStatImfileRow into the database
     6396 *
     6397 * This function expects a psFits object with a FITS table as the first
     6398 * extension.  The table must have at least one row of data in it, that is of
     6399 * the appropriate format (number of columns and their type).  All other
     6400 * extensions are ignored.
     6401 *
     6402 * @return true on success
     6403 */
     6404
     6405bool detNormalizedStatImfileInsertFits(
     6406    psDB            *dbh,               ///< Database handle
     6407    const psFits    *fits               ///< psFits object
     6408);
     6409
     6410/** Removes the last limit row from the database and returns them in a binary FITS table.
     6411 *
     6412 * This function assumes an empty psFits object and will create a FITS table as
     6413 * the first extension.
     6414 *
     6415 * @return true on success
     6416 */
     6417
     6418bool detNormalizedStatImfilePopFits(
     6419    psDB            *dbh,               ///< Database handle
     6420    psFits          *fits,              ///< psFits object
     6421    unsigned long long limit            ///< Maximum number of elements to return
     6422);
     6423
     6424/** Selects up to limit from the database and returns them in a binary FITS table
     6425 *
     6426 * This function assumes an empty psFits object and will create a FITS table
     6427 * as the first extension.
     6428 *
     6429 *  See psDBSelectRows() for documentation on the format of where.
     6430 *
     6431 * @return true on success
     6432 */
     6433
     6434bool detNormalizedStatImfileSelectRowsFits(
     6435    psDB            *dbh,               ///< Database handle
     6436    psFits          *fits,              ///< psFits object
     6437    const psMetadata *where,            ///< Row match criteria
     6438    unsigned long long limit            ///< Maximum number of elements to return
     6439);
     6440
     6441/** Convert a detNormalizedStatImfileRow into an equivalent psMetadata
     6442 *
     6443 * @return A psMetadata pointer or NULL on error
     6444 */
     6445
     6446psMetadata *detNormalizedStatImfileMetadataFromObject(
     6447    const detNormalizedStatImfileRow *object             ///< fooRow to convert into a psMetadata
     6448);
     6449
     6450/** Convert a psMetadata into an equivalent fooRow
     6451 *
     6452 * @return A detNormalizedStatImfileRow pointer or NULL on error
     6453 */
     6454
     6455detNormalizedStatImfileRow *detNormalizedStatImfileObjectFromMetadata(
     6456    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     6457);
     6458/** Selects up to limit rows from the database and returns as detNormalizedStatImfileRow objects in a psArray
     6459 *
     6460 *  See psDBSelectRows() for documentation on the format of where.
     6461 *
     6462 * @return A psArray pointer or NULL on error
     6463 */
     6464
     6465psArray *detNormalizedStatImfileSelectRowObjects(
     6466    psDB            *dbh,               ///< Database handle
     6467    const psMetadata *where,            ///< Row match criteria
     6468    unsigned long long limit            ///< Maximum number of elements to return
     6469);
     6470/** Deletes a row from the database coresponding to an detNormalizedStatImfile
     6471 *
     6472 *  Note that a 'where' search psMetadata is constructed from each object and
     6473 *  used to find rows to delete.
     6474 *
     6475 * @return A The number of rows removed or a negative value on error
     6476 */
     6477
     6478bool detNormalizedStatImfileDeleteObject(
     6479    psDB            *dbh,               ///< Database handle
     6480    const detNormalizedStatImfileRow *object    ///< Object to delete
     6481);
     6482/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     6483 *
     6484 *  Note that a 'where' search psMetadata is constructed from each object and
     6485 *  used to find rows to delete.
     6486 *
     6487 * @return A The number of rows removed or a negative value on error
     6488 */
     6489
     6490long long detNormalizedStatImfileDeleteRowObjects(
     6491    psDB            *dbh,               ///< Database handle
     6492    const psArray   *objects,           ///< Array of objects to delete
     6493    unsigned long long limit            ///< Maximum number of elements to delete
     6494);
     6495/** Formats and prints an array of detNormalizedStatImfileRow objects
     6496 *
     6497 * When mdcf is set the formated output is in psMetadataConfig
     6498 * format, otherwise it is in a simple tabular format.
     6499 *
     6500 * @return true on success
     6501 */
     6502
     6503bool detNormalizedStatImfilePrintObjects(
     6504    FILE            *stream,            ///< a stream
     6505    psArray         *objects,           ///< An array of detNormalizedStatImfileRow objects
     6506    bool            mdcf                ///< format as mdconfig or simple
     6507);
    62816508/** detNormalizedImfileRow data structure
    62826509 *
Note: See TracChangeset for help on using the changeset viewer.