IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2006, 12:09:49 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.40

File:
1 edited

Legend:

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

    r9107 r9149  
    70247024    bool            mdcf                ///< format as mdconfig or simple
    70257025);
     7026/** detNormalizedExpRow data structure
     7027 *
     7028 * Structure for representing a single row of detNormalizedExp table data.
     7029 */
     7030
     7031typedef struct {
     7032    psS32           det_id;
     7033    psS32           iteration;
     7034    char            *recipe;
     7035    psF64           bg;
     7036    psF64           bg_stdev;
     7037    psF64           bg_mean_stdev;
     7038    char            *b1_uri;
     7039    char            *b2_uri;
     7040} detNormalizedExpRow;
     7041
     7042/** Creates a new detNormalizedExpRow object
     7043 *
     7044 *  @return A new detNormalizedExpRow object or NULL on failure.
     7045 */
     7046
     7047detNormalizedExpRow *detNormalizedExpRowAlloc(
     7048    psS32           det_id,
     7049    psS32           iteration,
     7050    const char      *recipe,
     7051    psF64           bg,
     7052    psF64           bg_stdev,
     7053    psF64           bg_mean_stdev,
     7054    const char      *b1_uri,
     7055    const char      *b2_uri
     7056);
     7057
     7058/** Creates a new detNormalizedExp table
     7059 *
     7060 * @return true on success
     7061 */
     7062
     7063bool detNormalizedExpCreateTable(
     7064    psDB            *dbh                ///< Database handle
     7065);
     7066
     7067/** Deletes a detNormalizedExp table
     7068 *
     7069 * @return true on success
     7070 */
     7071
     7072bool detNormalizedExpDropTable(
     7073    psDB            *dbh                ///< Database handle
     7074);
     7075
     7076/** Insert a single row into a table
     7077 *
     7078 * This function constructs and inserts a single row based on it's parameters.
     7079 *
     7080 * @return true on success
     7081 */
     7082
     7083bool detNormalizedExpInsert(
     7084    psDB            *dbh,               ///< Database handle
     7085    psS32           det_id,
     7086    psS32           iteration,
     7087    const char      *recipe,
     7088    psF64           bg,
     7089    psF64           bg_stdev,
     7090    psF64           bg_mean_stdev,
     7091    const char      *b1_uri,
     7092    const char      *b2_uri
     7093);
     7094
     7095/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     7096 *
     7097 * @return A The number of rows removed or a negative value on error
     7098 */
     7099
     7100long long detNormalizedExpDelete(
     7101    psDB            *dbh,               ///< Database handle
     7102    const psMetadata *where,            ///< Row match criteria
     7103    unsigned long long limit            ///< Maximum number of elements to delete
     7104);
     7105
     7106/** Removes the last row from the database and returns it
     7107 *
     7108 * @return true on success
     7109 */
     7110
     7111bool detNormalizedExpPop(
     7112    psDB            *dbh,               ///< Database handle
     7113    psS32           *det_id,
     7114    psS32           *iteration,
     7115    char            **recipe,
     7116    psF64           *bg,
     7117    psF64           *bg_stdev,
     7118    psF64           *bg_mean_stdev,
     7119    char            **b1_uri,
     7120    char            **b2_uri
     7121);
     7122
     7123/** Insert a single detNormalizedExpRow object into a table
     7124 *
     7125 * This function constructs and inserts a single row based on it's parameters.
     7126 *
     7127 * @return true on success
     7128 */
     7129
     7130bool detNormalizedExpInsertObject(
     7131    psDB            *dbh,               ///< Database handle
     7132    detNormalizedExpRow *object             ///< detNormalizedExpRow object
     7133);
     7134
     7135/** Insert an array of detNormalizedExpRow object into a table
     7136 *
     7137 * This function constructs and inserts multiple rows based on it's parameters.
     7138 *
     7139 * @return true on success
     7140 */
     7141
     7142bool detNormalizedExpInsertObjects(
     7143    psDB            *dbh,               ///< Database handle
     7144    psArray         *objects            ///< array of detNormalizedExpRow objects
     7145);
     7146
     7147/** Removes the last row from the database and returns it
     7148 *
     7149 * @return A new detNormalizedExpRow on success or NULL on failure.
     7150 */
     7151
     7152detNormalizedExpRow *detNormalizedExpPopObject(
     7153    psDB            *dbh                ///< Database handle
     7154);
     7155
     7156/** Insert data from a binary FITS table detNormalizedExpRow into the database
     7157 *
     7158 * This function expects a psFits object with a FITS table as the first
     7159 * extension.  The table must have at least one row of data in it, that is of
     7160 * the appropriate format (number of columns and their type).  All other
     7161 * extensions are ignored.
     7162 *
     7163 * @return true on success
     7164 */
     7165
     7166bool detNormalizedExpInsertFits(
     7167    psDB            *dbh,               ///< Database handle
     7168    const psFits    *fits               ///< psFits object
     7169);
     7170
     7171/** Removes the last limit row from the database and returns them in a binary FITS table.
     7172 *
     7173 * This function assumes an empty psFits object and will create a FITS table as
     7174 * the first extension.
     7175 *
     7176 * @return true on success
     7177 */
     7178
     7179bool detNormalizedExpPopFits(
     7180    psDB            *dbh,               ///< Database handle
     7181    psFits          *fits,              ///< psFits object
     7182    unsigned long long limit            ///< Maximum number of elements to return
     7183);
     7184
     7185/** Selects up to limit from the database and returns them in a binary FITS table
     7186 *
     7187 * This function assumes an empty psFits object and will create a FITS table
     7188 * as the first extension.
     7189 *
     7190 *  See psDBSelectRows() for documentation on the format of where.
     7191 *
     7192 * @return true on success
     7193 */
     7194
     7195bool detNormalizedExpSelectRowsFits(
     7196    psDB            *dbh,               ///< Database handle
     7197    psFits          *fits,              ///< psFits object
     7198    const psMetadata *where,            ///< Row match criteria
     7199    unsigned long long limit            ///< Maximum number of elements to return
     7200);
     7201
     7202/** Convert a detNormalizedExpRow into an equivalent psMetadata
     7203 *
     7204 * @return A psMetadata pointer or NULL on error
     7205 */
     7206
     7207psMetadata *detNormalizedExpMetadataFromObject(
     7208    const detNormalizedExpRow *object             ///< fooRow to convert into a psMetadata
     7209);
     7210
     7211/** Convert a psMetadata into an equivalent fooRow
     7212 *
     7213 * @return A detNormalizedExpRow pointer or NULL on error
     7214 */
     7215
     7216detNormalizedExpRow *detNormalizedExpObjectFromMetadata(
     7217    psMetadata      *md                 ///< psMetadata to convert into a fooRow
     7218);
     7219/** Selects up to limit rows from the database and returns as detNormalizedExpRow objects in a psArray
     7220 *
     7221 *  See psDBSelectRows() for documentation on the format of where.
     7222 *
     7223 * @return A psArray pointer or NULL on error
     7224 */
     7225
     7226psArray *detNormalizedExpSelectRowObjects(
     7227    psDB            *dbh,               ///< Database handle
     7228    const psMetadata *where,            ///< Row match criteria
     7229    unsigned long long limit            ///< Maximum number of elements to return
     7230);
     7231/** Deletes a row from the database coresponding to an detNormalizedExp
     7232 *
     7233 *  Note that a 'where' search psMetadata is constructed from each object and
     7234 *  used to find rows to delete.
     7235 *
     7236 * @return A The number of rows removed or a negative value on error
     7237 */
     7238
     7239bool detNormalizedExpDeleteObject(
     7240    psDB            *dbh,               ///< Database handle
     7241    const detNormalizedExpRow *object    ///< Object to delete
     7242);
     7243/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     7244 *
     7245 *  Note that a 'where' search psMetadata is constructed from each object and
     7246 *  used to find rows to delete.
     7247 *
     7248 * @return A The number of rows removed or a negative value on error
     7249 */
     7250
     7251long long detNormalizedExpDeleteRowObjects(
     7252    psDB            *dbh,               ///< Database handle
     7253    const psArray   *objects,           ///< Array of objects to delete
     7254    unsigned long long limit            ///< Maximum number of elements to delete
     7255);
     7256/** Formats and prints an array of detNormalizedExpRow objects
     7257 *
     7258 * When mdcf is set the formated output is in psMetadataConfig
     7259 * format, otherwise it is in a simple tabular format.
     7260 *
     7261 * @return true on success
     7262 */
     7263
     7264bool detNormalizedExpPrintObjects(
     7265    FILE            *stream,            ///< a stream
     7266    psArray         *objects,           ///< An array of detNormalizedExpRow objects
     7267    bool            mdcf                ///< format as mdconfig or simple
     7268);
    70267269/** detMasterFrameRow data structure
    70277270 *
Note: See TracChangeset for help on using the changeset viewer.