IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2008, 12:16:38 PM (18 years ago)
Author:
Paul Price
Message:

Changing use of psDB* to pmConfig* so that the database handle only has to be set up when required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAWrite.c

    r18027 r18163  
    128128static bool cellWrite(pmCell *cell,     // Cell to write
    129129                      psFits *fits,     // FITS file to which to write
    130                       psDB *db,         // Database handle for "concepts" update
     130                      pmConfig *config, // Configuration
    131131                      bool blank,       // Write a blank PHU?
    132132                      fpaWriteType type // Type to write
     
    178178static bool chipWrite(pmChip *chip,     // Chip to write
    179179                      psFits *fits,     // FITS file to which to write
    180                       psDB *db,         // Database handle for "concepts" update
     180                      pmConfig *config, // Configuration
    181181                      bool blank,       // Write a blank PHU?
    182182                      bool recurse,     // Recurse to lower levels?
     
    228228        for (int i = 0; i < cells->n; i++) {
    229229            pmCell *cell = cells->data[i];  // The cell of interest
    230             if (!cellWrite(cell, fits, db, false, type)) {
     230            if (!cellWrite(cell, fits, config, false, type)) {
    231231                psError(PS_ERR_IO, false, "Unable to write Chip.\n");
    232232                return false;
     
    242242static bool fpaWrite(pmFPA *fpa,        // FPA to write
    243243                     psFits *fits,      // FITS file to which to write
    244                      psDB *db,          // Database handle for "concepts" update
     244                     pmConfig *config,  // Configuration
    245245                     bool blank,        // Write a blank PHU?
    246246                     bool recurse,      // Recurse to lower levels?
     
    291291        for (int i = 0; i < chips->n; i++) {
    292292            pmChip *chip = chips->data[i];  // The chip of interest
    293             if (!chipWrite(chip, fits, db, false, true, type)) {
     293            if (!chipWrite(chip, fits, config, false, true, type)) {
    294294                psError(PS_ERR_IO, false, "Unable to write FPA.\n");
    295295                return false;
     
    372372
    373373
    374 bool pmCellWrite(pmCell *cell, psFits *fits, psDB *db, bool blank)
     374bool pmCellWrite(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    375375{
    376376    PS_ASSERT_PTR_NON_NULL(cell, false);
    377377    PS_ASSERT_PTR_NON_NULL(fits, false);
    378     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_IMAGE);
    379 }
    380 
    381 bool pmChipWrite(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     378    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_IMAGE);
     379}
     380
     381bool pmChipWrite(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    382382{
    383383    PS_ASSERT_PTR_NON_NULL(chip, false);
    384384    PS_ASSERT_PTR_NON_NULL(fits, false);
    385     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_IMAGE);
    386 }
    387 
    388 bool pmFPAWrite(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     385    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_IMAGE);
     386}
     387
     388bool pmFPAWrite(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    389389{
    390390    PS_ASSERT_PTR_NON_NULL(fpa, false);
    391391    PS_ASSERT_PTR_NON_NULL(fits, false);
    392     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_IMAGE);
    393 }
    394 
    395 
    396 bool pmCellWriteMask(pmCell *cell, psFits *fits, psDB *db, bool blank)
     392    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_IMAGE);
     393}
     394
     395
     396bool pmCellWriteMask(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    397397{
    398398    PS_ASSERT_PTR_NON_NULL(cell, false);
    399399    PS_ASSERT_PTR_NON_NULL(fits, false);
    400     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_MASK);
    401 }
    402 
    403 bool pmChipWriteMask(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     400    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_MASK);
     401}
     402
     403bool pmChipWriteMask(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    404404{
    405405    PS_ASSERT_PTR_NON_NULL(chip, false);
    406406    PS_ASSERT_PTR_NON_NULL(fits, false);
    407     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_MASK);
    408 }
    409 
    410 bool pmFPAWriteMask(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     407    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_MASK);
     408}
     409
     410bool pmFPAWriteMask(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    411411{
    412412    PS_ASSERT_PTR_NON_NULL(fpa, false);
    413413    PS_ASSERT_PTR_NON_NULL(fits, false);
    414     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_MASK);
    415 }
    416 
    417 
    418 bool pmCellWriteWeight(pmCell *cell, psFits *fits, psDB *db, bool blank)
     414    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_MASK);
     415}
     416
     417
     418bool pmCellWriteWeight(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    419419{
    420420    PS_ASSERT_PTR_NON_NULL(cell, false);
    421421    PS_ASSERT_PTR_NON_NULL(fits, false);
    422     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_WEIGHT);
    423 }
    424 
    425 bool pmChipWriteWeight(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     422    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_WEIGHT);
     423}
     424
     425bool pmChipWriteWeight(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    426426{
    427427    PS_ASSERT_PTR_NON_NULL(chip, false);
    428428    PS_ASSERT_PTR_NON_NULL(fits, false);
    429     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
    430 }
    431 
    432 bool pmFPAWriteWeight(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     429    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
     430}
     431
     432bool pmFPAWriteWeight(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    433433{
    434434    PS_ASSERT_PTR_NON_NULL(fpa, false);
    435435    PS_ASSERT_PTR_NON_NULL(fits, false);
    436     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
     436    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
    437437}
    438438
Note: See TracChangeset for help on using the changeset viewer.