IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2012, 12:02:48 PM (14 years ago)
Author:
rhenders
Message:

Big changes to support a new Config class that encapuslates the xml config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/detectionbatch.py

    r33235 r33259  
    3333    def __init__(self,
    3434                 logger,
    35                  configPath,
    36                  configDoc,
     35                 config,
    3736                 gpc1Db,
    3837                 ippToPspsDb,
     
    4342       super(DetectionBatch, self).__init__(
    4443               logger,
    45                configPath,
    46                configDoc,
     44               config,
    4745               gpc1Db,
    4846               ippToPspsDb,
     
    7573
    7674       # if test mode
    77        if self.testMode:
     75       if self.config.test:
    7876           self.startX = 3
    7977           self.endX = 4
     
    221219        self.scratchDb.updateFilterID("FrameMeta", self.filter)
    222220        self.scratchDb.updateAllRows("FrameMeta", "calibModNum", str(self.calibModNum))
    223         self.scratchDb.updateAllRows("FrameMeta", "dataRelease", str(self.dataRelease))
     221        self.scratchDb.updateAllRows("FrameMeta", "dataRelease", str(self.config.dataRelease))
    224222
    225223    '''
     
    368366        self.scratchDb.updateFilterID(tableName, self.filter)
    369367        self.scratchDb.updateAllRows(tableName, "calibModNum", str(self.calibModNum))
    370         self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.dataRelease))
     368        self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.config.dataRelease))
    371369        if 'NASTRO' in header: self.totalNumPhotoRef = self.totalNumPhotoRef + int(header['NASTRO'])
    372370        self.scratchDb.replaceNullsInThisColumn(tableName, "polyOrder", "0")
     
    455453               , '" + self.dateStr + "' \
    456454               , 0 \
    457                , " + str(self.dataRelease) + "\
     455               , " + str(self.config.dataRelease) + "\
    458456               FROM " + ippTableName
    459457        self.scratchDb.execute(sql)
     
    499497        self.scratchDb.execute(sql)
    500498
    501         self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.dataRelease))
     499        self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.config.dataRelease))
    502500
    503501    '''
     
    528526
    529527        self.scratchDb.updateAllRows(tableName, "calibModNum", str(self.calibModNum))
    530         self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.dataRelease))
     528        self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.config.dataRelease))
    531529
    532530
     
    752750    def importIppTables(self, filter=""):
    753751
    754        if self.testMode: regex = "XY33.psf"
     752       if self.config.test: regex = "XY33.psf"
    755753       else : regex = ".*.psf"
    756754 
Note: See TracChangeset for help on using the changeset viewer.