IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2006, 1:55:03 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.32

File:
1 edited

Legend:

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

    r8380 r8528  
    55845584    char            *exp_id;
    55855585    bool            include;
    5586     bool            accept;
    55875586} detInputExpRow;
    55885587
     
    55965595    psS32           iteration,
    55975596    const char      *exp_id,
    5598     bool            include,
    5599     bool            accept
     5597    bool            include
    56005598);
    56015599
     
    56305628    psS32           iteration,
    56315629    const char      *exp_id,
    5632     bool            include,
    5633     bool            accept
     5630    bool            include
    56345631);
    56355632
     
    56555652    psS32           *iteration,
    56565653    char            **exp_id,
    5657     bool            *include,
    5658     bool            *accept
     5654    bool            *include
    56595655);
    56605656
     
    60596055    char            *uri;
    60606056    char            *recipe;
     6057    psF64           bg;
     6058    psF64           bg_stdev;
     6059    psF64           bg_mean_stdev;
    60616060} detStackedImfileRow;
    60626061
     
    60716070    const char      *class_id,
    60726071    const char      *uri,
    6073     const char      *recipe
     6072    const char      *recipe,
     6073    psF64           bg,
     6074    psF64           bg_stdev,
     6075    psF64           bg_mean_stdev
    60746076);
    60756077
     
    61056107    const char      *class_id,
    61066108    const char      *uri,
    6107     const char      *recipe
     6109    const char      *recipe,
     6110    psF64           bg,
     6111    psF64           bg_stdev,
     6112    psF64           bg_mean_stdev
    61086113);
    61096114
     
    61306135    char            **class_id,
    61316136    char            **uri,
    6132     char            **recipe
     6137    char            **recipe,
     6138    psF64           *bg,
     6139    psF64           *bg_stdev,
     6140    psF64           *bg_mean_stdev
    61336141);
    61346142
     
    71937201    char            *exp_id;
    71947202    char            *class_id;
     7203    char            *uri;
    71957204    char            *recipe;
    7196     char            *uri;
     7205    psF64           bg;
     7206    psF64           bg_stdev;
     7207    psF64           bg_mean_stdev;
    71977208    char            *b1_uri;
    71987209    char            *b2_uri;
     
    72097220    const char      *exp_id,
    72107221    const char      *class_id,
     7222    const char      *uri,
    72117223    const char      *recipe,
    7212     const char      *uri,
     7224    psF64           bg,
     7225    psF64           bg_stdev,
     7226    psF64           bg_mean_stdev,
    72137227    const char      *b1_uri,
    72147228    const char      *b2_uri
     
    72467260    const char      *exp_id,
    72477261    const char      *class_id,
     7262    const char      *uri,
    72487263    const char      *recipe,
    7249     const char      *uri,
     7264    psF64           bg,
     7265    psF64           bg_stdev,
     7266    psF64           bg_mean_stdev,
    72507267    const char      *b1_uri,
    72517268    const char      *b2_uri
     
    72747291    char            **exp_id,
    72757292    char            **class_id,
     7293    char            **uri,
    72767294    char            **recipe,
    7277     char            **uri,
     7295    psF64           *bg,
     7296    psF64           *bg_stdev,
     7297    psF64           *bg_mean_stdev,
    72787298    char            **b1_uri,
    72797299    char            **b2_uri
     
    74367456    char            *exp_id;
    74377457    char            *recipe;
    7438     bool            keep;
     7458    psF64           bg;
     7459    psF64           bg_stdev;
     7460    psF64           bg_mean_stdev;
     7461    char            *b1_uri;
     7462    char            *b2_uri;
    74397463    bool            accept;
    74407464} detResidExpRow;
     
    74507474    const char      *exp_id,
    74517475    const char      *recipe,
    7452     bool            keep,
     7476    psF64           bg,
     7477    psF64           bg_stdev,
     7478    psF64           bg_mean_stdev,
     7479    const char      *b1_uri,
     7480    const char      *b2_uri,
    74537481    bool            accept
    74547482);
     
    74857513    const char      *exp_id,
    74867514    const char      *recipe,
    7487     bool            keep,
     7515    psF64           bg,
     7516    psF64           bg_stdev,
     7517    psF64           bg_mean_stdev,
     7518    const char      *b1_uri,
     7519    const char      *b2_uri,
    74887520    bool            accept
    74897521);
     
    75117543    char            **exp_id,
    75127544    char            **recipe,
    7513     bool            *keep,
     7545    psF64           *bg,
     7546    psF64           *bg_stdev,
     7547    psF64           *bg_mean_stdev,
     7548    char            **b1_uri,
     7549    char            **b2_uri,
    75147550    bool            *accept
    75157551);
     
    76617697    bool            mdcf                ///< format as mdconfig or simple
    76627698);
     7699/** detRunSummaryRow data structure
     7700 *
     7701 * Structure for representing a single row of detRunSummary table data.
     7702 */
     7703
     7704typedef struct {
     7705    psS32           det_id;
     7706    psS32           iteration;
     7707    psF64           bg;
     7708    psF64           bg_stdev;
     7709    psF64           bg_mean_stdev;
     7710    bool            accept;
     7711} detRunSummaryRow;
     7712
     7713/** Creates a new detRunSummaryRow object
     7714 *
     7715 *  @return A new detRunSummaryRow object or NULL on failure.
     7716 */
     7717
     7718detRunSummaryRow *detRunSummaryRowAlloc(
     7719    psS32           det_id,
     7720    psS32           iteration,
     7721    psF64           bg,
     7722    psF64           bg_stdev,
     7723    psF64           bg_mean_stdev,
     7724    bool            accept
     7725);
     7726
     7727/** Creates a new detRunSummary table
     7728 *
     7729 * @return true on success
     7730 */
     7731
     7732bool detRunSummaryCreateTable(
     7733    psDB            *dbh                ///< Database handle
     7734);
     7735
     7736/** Deletes a detRunSummary table
     7737 *
     7738 * @return true on success
     7739 */
     7740
     7741bool detRunSummaryDropTable(
     7742    psDB            *dbh                ///< Database handle
     7743);
     7744
     7745/** Insert a single row into a table
     7746 *
     7747 * This function constructs and inserts a single row based on it's parameters.
     7748 *
     7749 * @return true on success
     7750 */
     7751
     7752bool detRunSummaryInsert(
     7753    psDB            *dbh,               ///< Database handle
     7754    psS32           det_id,
     7755    psS32           iteration,
     7756    psF64           bg,
     7757    psF64           bg_stdev,
     7758    psF64           bg_mean_stdev,
     7759    bool            accept
     7760);
     7761
     7762/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     7763 *
     7764 * @return A The number of rows removed or a negative value on error
     7765 */
     7766
     7767long long detRunSummaryDelete(
     7768    psDB            *dbh,               ///< Database handle
     7769    const psMetadata *where,            ///< Row match criteria
     7770    unsigned long long limit            ///< Maximum number of elements to delete
     7771);
     7772
     7773/** Removes the last row from the database and returns it
     7774 *
     7775 * @return true on success
     7776 */
     7777
     7778bool detRunSummaryPop(
     7779    psDB            *dbh,               ///< Database handle
     7780    psS32           *det_id,
     7781    psS32           *iteration,
     7782    psF64           *bg,
     7783    psF64           *bg_stdev,
     7784    psF64           *bg_mean_stdev,
     7785    bool            *accept
     7786);
     7787
     7788/** Insert a single detRunSummaryRow object into a table
     7789 *
     7790 * This function constructs and inserts a single row based on it's parameters.
     7791 *
     7792 * @return true on success
     7793 */
     7794
     7795bool detRunSummaryInsertObject(
     7796    psDB            *dbh,               ///< Database handle
     7797    detRunSummaryRow *object             ///< detRunSummaryRow object
     7798);
     7799
     7800/** Insert an array of detRunSummaryRow object into a table
     7801 *
     7802 * This function constructs and inserts multiple rows based on it's parameters.
     7803 *
     7804 * @return true on success
     7805 */
     7806
     7807bool detRunSummaryInsertObjects(
     7808    psDB            *dbh,               ///< Database handle
     7809    psArray         *objects            ///< array of detRunSummaryRow objects
     7810);
     7811
     7812/** Removes the last row from the database and returns it
     7813 *
     7814 * @return A new detRunSummaryRow on success or NULL on failure.
     7815 */
     7816
     7817detRunSummaryRow *detRunSummaryPopObject(
     7818    psDB            *dbh                ///< Database handle
     7819);
     7820
     7821/** Insert data from a binary FITS table detRunSummaryRow into the database
     7822 *
     7823 * This function expects a psFits object with a FITS table as the first
     7824 * extension.  The table must have at least one row of data in it, that is of
     7825 * the appropriate format (number of columns and their type).  All other
     7826 * extensions are ignored.
     7827 *
     7828 * @return true on success
     7829 */
     7830
     7831bool detRunSummaryInsertFits(
     7832    psDB            *dbh,               ///< Database handle
     7833    const psFits    *fits               ///< psFits object
     7834);
     7835
     7836/** Removes the last limit row from the database and returns them in a binary FITS table.
     7837 *
     7838 * This function assumes an empty psFits object and will create a FITS table as
     7839 * the first extension.
     7840 *
     7841 * @return true on success
     7842 */
     7843
     7844bool detRunSummaryPopFits(
     7845    psDB            *dbh,               ///< Database handle
     7846    psFits          *fits,              ///< psFits object
     7847    unsigned long long limit            ///< Maximum number of elements to return
     7848);
     7849
     7850/** Selects up to limit from the database and returns them in a binary FITS table
     7851 *
     7852 * This function assumes an empty psFits object and will create a FITS table
     7853 * as the first extension.
     7854 *
     7855 *  See psDBSelectRows() for documentation on the format of where.
     7856 *
     7857 * @return true on success
     7858 */
     7859
     7860bool detRunSummarySelectRowsFits(
     7861    psDB            *dbh,               ///< Database handle
     7862    psFits          *fits,              ///< psFits object
     7863    const psMetadata *where,            ///< Row match criteria
     7864    unsigned long long limit            ///< Maximum number of elements to return
     7865);
     7866
     7867/** Convert a detRunSummaryRow into an equivalent psMetadata
     7868 *
     7869 * @return A psMetadata pointer or NULL on error
     7870 */
     7871
     7872psMetadata *detRunSummaryMetadataFromObject(
     7873    const detRunSummaryRow *object             ///< fooRow to convert into a psMetadata
     7874);
     7875
     7876/** Convert a psMetadata into an equivalent fooRow
     7877 *
     7878 * @return A detRunSummaryRow pointer or NULL on error
     7879 */
     7880
     7881detRunSummaryRow *detRunSummaryObjectFromMetadata(
     7882    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     7883);
     7884/** Selects up to limit rows from the database and returns as detRunSummaryRow objects in a psArray
     7885 *
     7886 *  See psDBSelectRows() for documentation on the format of where.
     7887 *
     7888 * @return A psArray pointer or NULL on error
     7889 */
     7890
     7891psArray *detRunSummarySelectRowObjects(
     7892    psDB            *dbh,               ///< Database handle
     7893    const psMetadata *where,            ///< Row match criteria
     7894    unsigned long long limit            ///< Maximum number of elements to return
     7895);
     7896/** Deletes a row from the database coresponding to an detRunSummary
     7897 *
     7898 *  Note that a 'where' search psMetadata is constructed from each object and
     7899 *  used to find rows to delete.
     7900 *
     7901 * @return A The number of rows removed or a negative value on error
     7902 */
     7903
     7904bool detRunSummaryDeleteObject(
     7905    psDB            *dbh,               ///< Database handle
     7906    const detRunSummaryRow *object    ///< Object to delete
     7907);
     7908/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     7909 *
     7910 *  Note that a 'where' search psMetadata is constructed from each object and
     7911 *  used to find rows to delete.
     7912 *
     7913 * @return A The number of rows removed or a negative value on error
     7914 */
     7915
     7916long long detRunSummaryDeleteRowObjects(
     7917    psDB            *dbh,               ///< Database handle
     7918    const psArray   *objects,           ///< Array of objects to delete
     7919    unsigned long long limit            ///< Maximum number of elements to delete
     7920);
     7921/** Formats and prints an array of detRunSummaryRow objects
     7922 *
     7923 * When mdcf is set the formated output is in psMetadataConfig
     7924 * format, otherwise it is in a simple tabular format.
     7925 *
     7926 * @return true on success
     7927 */
     7928
     7929bool detRunSummaryPrintObjects(
     7930    FILE            *stream,            ///< a stream
     7931    psArray         *objects,           ///< An array of detRunSummaryRow objects
     7932    bool            mdcf                ///< format as mdconfig or simple
     7933);
    76637934
    76647935/// @}
     
    76687939#endif
    76697940
    7670 #endif // DETRESIDEXP_DB_H
     7941#endif // DETRUNSUMMARY_DB_H
Note: See TracChangeset for help on using the changeset viewer.