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


Python BatchJobPedestals.status_batch_job_for_peds_aver方法代码示例

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


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

示例1: CommandLineCalib

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

#.........这里部分代码省略.........
        self.bjpeds.command_for_peds_scan()

        self.print_list_of_types_and_sources_from_xtc()

        if not self.bjpeds.command_for_peds_aver() :
            msg = self.sep + 'Subprocess for averaging is completed with warning/error message(s);'\
                  +'\nsee details in the logfile(s).'
            self.log(msg,4)
            #return

        self.print_dark_ave_batch_log()
        return

#------------------------------

    def proc_dark_run_in_batch(self) :

        if self.process :
            self.log(self.sep + 'Begin dark run data processing in batch queue %s' % self.queue,1)
        else :
            self.log(self.sep + '\nWARNING: FILE PROCESSING OPTION IS TURNED OFF...'\
                  + '\nAdd "-P" option in the command line to process files\n',4)
            return

        self.bjpeds = BatchJobPedestals(self.runnum)
        self.bjpeds.start_auto_processing()

        sum_dt=0
        dt = 10 # sec
        for i in range(50) :
            sleep(dt)
            sum_dt += dt
            status = self.bjpeds.status_for_peds_files_essential()
            str_bj_stat, msg_bj_stat = self.bjpeds.status_batch_job_for_peds_aver() 

            self.log('%3d sec: Files %s available. %s' % (sum_dt, {False:'ARE NOT', True:'ARE'}[status], msg_bj_stat), 1)

            if status :
                self.print_dark_ave_batch_log()
                return

        print 'WARNING: Too many check cycles. Probably LSF is dead...'
        
        #if self.bjpeds.autoRunStage :            
        #self.bjpeds.stop_auto_processing()


#------------------------------

    def deploy_calib_files(self) :
        #list_of_deploy_commands, list_of_sources = fdmets.get_list_of_deploy_commands_and_sources_dark(self.str_run_number, self.str_run_range)
        #msg = self.sep + 'Tentative deployment commands:\n' + '\n'.join(list_of_deploy_commands)
        #self.log(msg,1)

        if self.deploy :
            self.log(self.sep + 'Begin deployment of calibration files',1) 
            fdmets.deploy_calib_files(self.str_run_number, self.str_run_range, mode='calibrun-dark', ask_confirm=False)
            self.log('\nDeployment of calibration files is completed',1)
        else :
            self.log(self.sep + '\nWARNING: FILE DEPLOYMENT OPTION IS TURNED OFF...'\
                     +'\nAdd "-D" option in the command line to deploy files\n',4)

#------------------------------
#------------------------------

    def save_log_file(self) :
开发者ID:FilipeMaia,项目名称:psdmrepo,代码行数:70,代码来源:CommandLineCalib.py


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