IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 11:32:26 AM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.47

File:
1 edited

Legend:

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

    r9242 r9301  
    53995399    bool            mdcf                ///< format as mdconfig or simple
    54005400);
     5401/** p3ProcessedExpRow data structure
     5402 *
     5403 * Structure for representing a single row of p3ProcessedExp table data.
     5404 */
     5405
     5406typedef struct {
     5407    char            *exp_tag;
     5408    char            *uri;
     5409    char            *recipe;
     5410    psF64           bg;
     5411    psF64           bg_stdev;
     5412    psF64           bg_mean_stdev;
     5413    psF32           sigma_ra;
     5414    psF32           sigma_dec;
     5415    psS32           nastro;
     5416    char            *b1_uri;
     5417    char            *b2_uri;
     5418    psS32           p2_version;
     5419    psS32           p3_version;
     5420} p3ProcessedExpRow;
     5421
     5422/** Creates a new p3ProcessedExpRow object
     5423 *
     5424 *  @return A new p3ProcessedExpRow object or NULL on failure.
     5425 */
     5426
     5427p3ProcessedExpRow *p3ProcessedExpRowAlloc(
     5428    const char      *exp_tag,
     5429    const char      *uri,
     5430    const char      *recipe,
     5431    psF64           bg,
     5432    psF64           bg_stdev,
     5433    psF64           bg_mean_stdev,
     5434    psF32           sigma_ra,
     5435    psF32           sigma_dec,
     5436    psS32           nastro,
     5437    const char      *b1_uri,
     5438    const char      *b2_uri,
     5439    psS32           p2_version,
     5440    psS32           p3_version
     5441);
     5442
     5443/** Creates a new p3ProcessedExp table
     5444 *
     5445 * @return true on success
     5446 */
     5447
     5448bool p3ProcessedExpCreateTable(
     5449    psDB            *dbh                ///< Database handle
     5450);
     5451
     5452/** Deletes a p3ProcessedExp table
     5453 *
     5454 * @return true on success
     5455 */
     5456
     5457bool p3ProcessedExpDropTable(
     5458    psDB            *dbh                ///< Database handle
     5459);
     5460
     5461/** Insert a single row into a table
     5462 *
     5463 * This function constructs and inserts a single row based on it's parameters.
     5464 *
     5465 * @return true on success
     5466 */
     5467
     5468bool p3ProcessedExpInsert(
     5469    psDB            *dbh,               ///< Database handle
     5470    const char      *exp_tag,
     5471    const char      *uri,
     5472    const char      *recipe,
     5473    psF64           bg,
     5474    psF64           bg_stdev,
     5475    psF64           bg_mean_stdev,
     5476    psF32           sigma_ra,
     5477    psF32           sigma_dec,
     5478    psS32           nastro,
     5479    const char      *b1_uri,
     5480    const char      *b2_uri,
     5481    psS32           p2_version,
     5482    psS32           p3_version
     5483);
     5484
     5485/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     5486 *
     5487 * @return A The number of rows removed or a negative value on error
     5488 */
     5489
     5490long long p3ProcessedExpDelete(
     5491    psDB            *dbh,               ///< Database handle
     5492    const psMetadata *where,            ///< Row match criteria
     5493    unsigned long long limit            ///< Maximum number of elements to delete
     5494);
     5495
     5496/** Removes the last row from the database and returns it
     5497 *
     5498 * @return true on success
     5499 */
     5500
     5501bool p3ProcessedExpPop(
     5502    psDB            *dbh,               ///< Database handle
     5503    char            **exp_tag,
     5504    char            **uri,
     5505    char            **recipe,
     5506    psF64           *bg,
     5507    psF64           *bg_stdev,
     5508    psF64           *bg_mean_stdev,
     5509    psF32           *sigma_ra,
     5510    psF32           *sigma_dec,
     5511    psS32           *nastro,
     5512    char            **b1_uri,
     5513    char            **b2_uri,
     5514    psS32           *p2_version,
     5515    psS32           *p3_version
     5516);
     5517
     5518/** Insert a single p3ProcessedExpRow object into a table
     5519 *
     5520 * This function constructs and inserts a single row based on it's parameters.
     5521 *
     5522 * @return true on success
     5523 */
     5524
     5525bool p3ProcessedExpInsertObject(
     5526    psDB            *dbh,               ///< Database handle
     5527    p3ProcessedExpRow *object             ///< p3ProcessedExpRow object
     5528);
     5529
     5530/** Insert an array of p3ProcessedExpRow object into a table
     5531 *
     5532 * This function constructs and inserts multiple rows based on it's parameters.
     5533 *
     5534 * @return true on success
     5535 */
     5536
     5537bool p3ProcessedExpInsertObjects(
     5538    psDB            *dbh,               ///< Database handle
     5539    psArray         *objects            ///< array of p3ProcessedExpRow objects
     5540);
     5541
     5542/** Removes the last row from the database and returns it
     5543 *
     5544 * @return A new p3ProcessedExpRow on success or NULL on failure.
     5545 */
     5546
     5547p3ProcessedExpRow *p3ProcessedExpPopObject(
     5548    psDB            *dbh                ///< Database handle
     5549);
     5550
     5551/** Insert data from a binary FITS table p3ProcessedExpRow into the database
     5552 *
     5553 * This function expects a psFits object with a FITS table as the first
     5554 * extension.  The table must have at least one row of data in it, that is of
     5555 * the appropriate format (number of columns and their type).  All other
     5556 * extensions are ignored.
     5557 *
     5558 * @return true on success
     5559 */
     5560
     5561bool p3ProcessedExpInsertFits(
     5562    psDB            *dbh,               ///< Database handle
     5563    const psFits    *fits               ///< psFits object
     5564);
     5565
     5566/** Removes the last limit row from the database and returns them in a binary FITS table.
     5567 *
     5568 * This function assumes an empty psFits object and will create a FITS table as
     5569 * the first extension.
     5570 *
     5571 * @return true on success
     5572 */
     5573
     5574bool p3ProcessedExpPopFits(
     5575    psDB            *dbh,               ///< Database handle
     5576    psFits          *fits,              ///< psFits object
     5577    unsigned long long limit            ///< Maximum number of elements to return
     5578);
     5579
     5580/** Selects up to limit from the database and returns them in a binary FITS table
     5581 *
     5582 * This function assumes an empty psFits object and will create a FITS table
     5583 * as the first extension.
     5584 *
     5585 *  See psDBSelectRows() for documentation on the format of where.
     5586 *
     5587 * @return true on success
     5588 */
     5589
     5590bool p3ProcessedExpSelectRowsFits(
     5591    psDB            *dbh,               ///< Database handle
     5592    psFits          *fits,              ///< psFits object
     5593    const psMetadata *where,            ///< Row match criteria
     5594    unsigned long long limit            ///< Maximum number of elements to return
     5595);
     5596
     5597/** Convert a p3ProcessedExpRow into an equivalent psMetadata
     5598 *
     5599 * @return A psMetadata pointer or NULL on error
     5600 */
     5601
     5602psMetadata *p3ProcessedExpMetadataFromObject(
     5603    const p3ProcessedExpRow *object             ///< fooRow to convert into a psMetadata
     5604);
     5605
     5606/** Convert a psMetadata into an equivalent fooRow
     5607 *
     5608 * @return A p3ProcessedExpRow pointer or NULL on error
     5609 */
     5610
     5611p3ProcessedExpRow *p3ProcessedExpObjectFromMetadata(
     5612    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     5613);
     5614/** Selects up to limit rows from the database and returns as p3ProcessedExpRow objects in a psArray
     5615 *
     5616 *  See psDBSelectRows() for documentation on the format of where.
     5617 *
     5618 * @return A psArray pointer or NULL on error
     5619 */
     5620
     5621psArray *p3ProcessedExpSelectRowObjects(
     5622    psDB            *dbh,               ///< Database handle
     5623    const psMetadata *where,            ///< Row match criteria
     5624    unsigned long long limit            ///< Maximum number of elements to return
     5625);
     5626/** Deletes a row from the database coresponding to an p3ProcessedExp
     5627 *
     5628 *  Note that a 'where' search psMetadata is constructed from each object and
     5629 *  used to find rows to delete.
     5630 *
     5631 * @return A The number of rows removed or a negative value on error
     5632 */
     5633
     5634bool p3ProcessedExpDeleteObject(
     5635    psDB            *dbh,               ///< Database handle
     5636    const p3ProcessedExpRow *object    ///< Object to delete
     5637);
     5638/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     5639 *
     5640 *  Note that a 'where' search psMetadata is constructed from each object and
     5641 *  used to find rows to delete.
     5642 *
     5643 * @return A The number of rows removed or a negative value on error
     5644 */
     5645
     5646long long p3ProcessedExpDeleteRowObjects(
     5647    psDB            *dbh,               ///< Database handle
     5648    const psArray   *objects,           ///< Array of objects to delete
     5649    unsigned long long limit            ///< Maximum number of elements to delete
     5650);
     5651/** Formats and prints an array of p3ProcessedExpRow objects
     5652 *
     5653 * When mdcf is set the formated output is in psMetadataConfig
     5654 * format, otherwise it is in a simple tabular format.
     5655 *
     5656 * @return true on success
     5657 */
     5658
     5659bool p3ProcessedExpPrintObjects(
     5660    FILE            *stream,            ///< a stream
     5661    psArray         *objects,           ///< An array of p3ProcessedExpRow objects
     5662    bool            mdcf                ///< format as mdconfig or simple
     5663);
    54015664/** detRunRow data structure
    54025665 *
Note: See TracChangeset for help on using the changeset viewer.