当前位置: 首页>>代码示例>>Python>>正文


Python BatchJobPedestals.stop_auto_processing方法代码示例

本文整理汇总了Python中BatchJobPedestals.stop_auto_processing方法的典型用法代码示例。如果您正苦于以下问题:Python BatchJobPedestals.stop_auto_processing方法的具体用法?Python BatchJobPedestals.stop_auto_processing怎么用?Python BatchJobPedestals.stop_auto_processing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BatchJobPedestals的用法示例。


在下文中一共展示了BatchJobPedestals.stop_auto_processing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: GUIDarkListItemRun

# 需要导入模块: import BatchJobPedestals [as 别名]
# 或者: from BatchJobPedestals import stop_auto_processing [as 别名]

#.........这里部分代码省略.........
 
    def onEdiTo(self):
        logger.debug('onEdiTo', __name__ )
        self.str_run_to = str( self.edi_to.displayText() )        
        msg = 'Set the run validity range up to %s' % self.str_run_to
        logger.info(msg, __name__ )
        self.setStatusMessage()


    def exportLocalPars(self):
        """Export local parameters to configuration current"""
        cp.str_run_number.setValue(self.str_run_number)
        #cp.str_run_from  .setValue(self.str_run_from  )
        #cp.str_run_to    .setValue(self.str_run_to    )

 

    def onButGo(self):
        self.exportLocalPars()
        self.but_depl.setVisible(False)

        but = self.but_go
        but.setStyleSheet(cp.styleDefault)

        if   but.text() == 'Go' : 
            logger.info('onButGo for run %s' % self.str_run_number, __name__ )
            but.setEnabled(False)
            self.bjpeds.start_auto_processing()
            but.setText('Stop')
            but.setEnabled(True)

        elif but.text() == 'Stop' : 
            logger.info('onButStop for run %s' % self.str_run_number, __name__ )
            self.bjpeds.stop_auto_processing()
            but.setEnabled(True)
            but.setText('Go')

        but.setStyleSheet(cp.styleButtonWarning)


    def onStop(self):
        msg = 'onStop - buttons status should be updated now for %s' % (self.str_run_number)
        logger.info(msg, __name__)
        self.but_go.setEnabled(True)
        self.but_go.setText('Go')
        #self.setStatusStyleOfButtons()
        self.updateButtons()


    def setStatusMessage(self):
        pass
        #if cp.guistatus is None : return
        #cp.guistatus.setStatusMessage(msg)


    def onButDeploy(self):
        """Deploys the calibration file(s)"""
        list_of_deploy_commands, list_of_sources = self.get_list_of_deploy_commands_and_sources()
        msg = 'Deploy calibration file(s):'

        if list_of_deploy_commands == [] :
            msg += 'List of commands IS EMPTY !!!'  
            logger.info(msg, __name__)
            return

开发者ID:FilipeMaia,项目名称:psdmrepo,代码行数:68,代码来源:GUIDarkListItemRun.py

示例2: GUIDarkListItemRun

# 需要导入模块: import BatchJobPedestals [as 别名]
# 或者: from BatchJobPedestals import stop_auto_processing [as 别名]

#.........这里部分代码省略.........
        #self.box_txt.setGeometry(self.contentsRect())

        
    def moveEvent(self, e):
        #logger.debug('moveEvent', __name__) 
        #cp.posGUIMain = (self.pos().x(),self.pos().y())
        pass


    def closeEvent(self, event):
        logger.debug('closeEvent', __name__)
        #self.saveLogTotalInFile() # It will be saved at closing of GUIMain

        #try    : cp.guimain.butLogger.setStyleSheet(cp.styleButtonBad)
        #except : pass

        #self.box_txt.close()

        #try    : del cp.guistatus # GUIDarkListItemRun
        #except : pass


    def onClose(self):
        logger.info('onClose', __name__)
        self.close()



    def exportLocalPars(self):
        """Export local parameters to configuration current"""
        cp.str_run_number.setValue(self.str_run_number)
        #cp.str_run_from  .setValue(self.str_run_from  )
        #cp.str_run_to    .setValue(self.str_run_to    )

 

    def onButGo(self):
        self.exportLocalPars()
        self.but_depl.setVisible(False)

        logger.info('onButGo', __name__)

        but = self.but_go
        but.setStyleSheet(cp.styleDefault)

        if   but.text() == 'Go' : 
            logger.info('onButGo for run %s' % self.str_run_number, __name__ )
            but.setEnabled(False)
            self.bjpeds.start_auto_processing()
            if self.bjpeds.autoRunStage :            
                but.setText('Stop')
            but.setEnabled(True)

        elif but.text() == 'Stop' : 
            logger.info('onButStop for run %s' % self.str_run_number, __name__ )
            self.bjpeds.stop_auto_processing()
            but.setEnabled(True)
            but.setText('Go')

        but.setStyleSheet(cp.styleButtonWarning)


    def onStop(self):
        msg = 'onStop - buttons status should be updated now for %s' % (self.str_run_number)
        logger.info(msg, __name__)
        self.but_go.setEnabled(True)        
        self.but_go.setText('Go')
        self.updateButtons()


    def setStatusMessage(self):
        pass
        #if cp.guistatus is None : return
        #cp.guistatus.setStatusMessage(msg)


    def onButDeploy(self):
        logger.debug('onButDeploy', __name__ )

        fdmets.deploy_calib_files(self.str_run_number, self.strRunRange(), mode='calibman-dark', ask_confirm=True)

        if cp.guistatus is not None : cp.guistatus.updateStatusInfo()


    def strRunRange(self):
        return self.guirunrange.getRunRange()


#---------
# deployment stuff from here moved to FileDeployer
#---------

    def updateButtons(self, str_run_type='', comment='', xtc_in_dir=True) :
        #logger.info('update', __name__)
        self.str_run_type = str_run_type
        self.comment = comment
        self.xtc_in_dir = xtc_in_dir
        self.lab_type.setText(str_run_type + '  ' + comment)

        self.setFieldsEnabled(cp.det_name.value() != '' and self.xtc_in_dir)
开发者ID:FilipeMaia,项目名称:psdmrepo,代码行数:104,代码来源:GUIDarkListItemRun.py

示例3: GUIDarkListItemRun

# 需要导入模块: import BatchJobPedestals [as 别名]
# 或者: from BatchJobPedestals import stop_auto_processing [as 别名]

#.........这里部分代码省略.........
        logger.info(msg, __name__ )
        self.setStatusMessage()

 
    def onEdiTo(self):
        logger.debug('onEdiTo', __name__ )
        self.str_run_to = str( self.edi_to.displayText() )        
        msg = 'Set the run validity range up to %s' % self.str_run_to
        logger.info(msg, __name__ )
        self.setStatusMessage()


    def exportLocalPars(self):
        """Export local parameters to configuration current"""
        cp.str_run_number.setValue(self.str_run_number)
        #cp.str_run_from  .setValue(self.str_run_from  )
        #cp.str_run_to    .setValue(self.str_run_to    )

 

    def onButGo(self):
        self.exportLocalPars()
        self.but_depl.setVisible(False)

        but = self.but_go
        but.setStyleSheet(cp.styleDefault)

        if   but.text() == 'Go' : 
            logger.info('onButGo for run %s' % self.str_run_number, __name__ )
            self.bjpeds.start_auto_processing()
            but.setText('Stop')
            
        elif but.text() == 'Stop' : 
            logger.info('onButStop for run %s' % self.str_run_number, __name__ )
            self.bjpeds.stop_auto_processing()
            but.setText('Go')

        but.setStyleSheet(cp.styleButtonBad)


    def onStop(self):
        self.but_go.setText('Go')
        self.setStatusStyleOfButtons()


    def setStatusMessage(self):
        pass
        #if cp.guistatus is None : return
        #msg = 'From %s to %s use dark run %s' % (self.str_run_from.value(), self.str_run_to.value(), self.str_run_number.value())
        #msg = gu.get_text_content_of_calib_dir_for_detector(path=self.calib_dir.value(), det=self.det_name.value(), calib_type='pedestals')
        #cp.guistatus.setStatusMessage(msg)


    def onButDeploy(self):
        """Deploys the calibration file(s)"""
        list_of_deploy_commands = self.get_list_of_deploy_commands()
        msg = 'Deploy calibration file(s):'

        if list_of_deploy_commands == [] :
            msg += 'List of commands IS EMPTY !!!'  
            logger.info(msg, __name__)
            return

        #for cmd in list_of_deploy_commands :
        #    msg += '\n' + cmd            
        #logger.info(msg, __name__)

        for cmd in list_of_deploy_commands :
            fd.procDeployCommand(cmd)


    def get_list_of_deploy_commands(self):
        """Get list of deploy commands for all detectors of the same type"""
        self.exportLocalPars()
        cp.blsp.parse_batch_log_peds_scan()
        #cp.blsp.print_list_of_types_and_sources()

        list_of_sources = cp.blsp.get_list_of_sources()
        list_of_types   = cp.blsp.get_list_of_types()
        list_of_files   = cp.blsp.get_list_of_files_for_all_sources(fnm.path_peds_ave())

        list_of_deploy_commands = []

        for file, type, source in zip(list_of_files, list_of_types, list_of_sources) :

            pos1 = source.find('DetInfo(') + 8
            src  = source[pos1:-1]

            pos1 = type.find('::')
            typ  = type[:pos1] + '::CalibV1'

            fname = '%s-%s.data' % ( self.str_run_from.lstrip('0'),
                                     self.str_run_to  .lstrip('0') )

            calib_path = os.path.join(self.calib_dir.value(), typ, src, 'pedestals', fname)
            cmd = 'cp %s  %s' % (file, calib_path)

            list_of_deploy_commands.append(cmd)

        return list_of_deploy_commands
开发者ID:FilipeMaia,项目名称:psdmrepo,代码行数:104,代码来源:GUIDarkListItemRun.py


注:本文中的BatchJobPedestals.stop_auto_processing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。