コード例 #1
0
    def submit_batch_for_peds_scan(self):
        self.exportLocalPars()

        if not self.job_can_be_submitted(self.job_id_scan_str,
                                         self.time_scan_job_submitted, 'scan'):
            return
        self.time_scan_job_submitted = gu.get_time_sec()

        cfg.make_psana_cfg_file_for_peds_scan()

        command = 'psana -c ' + fnm.path_peds_scan_psana_cfg(
        ) + ' ' + fnm.path_to_xtc_files_for_run()  # fnm.path_dark_xtc_cond()
        queue = self.queue.value()
        bat_log_file = fnm.path_peds_scan_batch_log()

        #print 'command     :', command
        #print 'queue       :', queue
        #print 'bat_log_file:', bat_log_file

        self.job_id_scan_str, out, err = gu.batch_job_submit(
            command, queue, bat_log_file)
        self.procDarkStatus ^= 1  # set bit to 1

        if err != '':
            self.stop_auto_processing(is_stop_on_button_click=False)
            logger.warning(
                'Autoprocessing for run %s is stopped due to batch submission error!!!'
                % self.str_run_number, __name__)
コード例 #2
0
    def command_for_peds_scan(self) :

        cfg.make_psana_cfg_file_for_peds_scan()

        #command = 'env'
        command = 'psana -c ' + fnm.path_peds_scan_psana_cfg() + self.opt 
        command_seq = command.split()

        msg = 'Scan xtc file(s) using command:\n%s' % command \
            + '\nand save results in the log-file: %s' % fnm.path_peds_scan_batch_log()
        logger.info(msg, __name__)
        
        err = gu.subproc_in_log(command_seq, fnm.path_peds_scan_batch_log()) # , shell=True)
        if err != '' :
            logger.error('\nerr: %s' % (err), __name__)
            self.stop_auto_processing(is_stop_on_button_click=False)
            logger.warning('Autoprocessing for run %s is stopped due to error at execution of the scan command' % self.str_run_number, __name__)
        else :
            logger.info('Scan for run %s is completed' % self.str_run_number, __name__)
コード例 #3
0
    def command_for_peds_scan(self) :

        cfg.make_psana_cfg_file_for_peds_scan()

        #command = 'env'
        command = 'psana -c ' + fnm.path_peds_scan_psana_cfg() + self.opt 
        command_seq = command.split()

        msg = 'Scan xtc file(s) using command:\n%s' % command \
            + '\nand save results in the log-file: %s' % fnm.path_peds_scan_batch_log()
        logger.info(msg, __name__)
        
        err = gu.subproc_in_log(command_seq, fnm.path_peds_scan_batch_log()) # , shell=True)
        if err != '' :
            logger.error('\nerr: %s' % (err), __name__)
            self.stop_auto_processing(is_stop_on_button_click=False)
            logger.warning('Autoprocessing for run %s is stopped due to error at execution of the scan command' % self.str_run_number, __name__)
        else :
            logger.info('Scan for run %s is completed' % self.str_run_number, __name__)
コード例 #4
0
    def submit_batch_for_peds_scan(self) :
        self.exportLocalPars()

        if not self.job_can_be_submitted(self.job_id_scan_str, self.time_scan_job_submitted, 'scan') : return
        self.time_scan_job_submitted = gu.get_time_sec()

        cfg.make_psana_cfg_file_for_peds_scan()

        command      = 'psana -c ' + fnm.path_peds_scan_psana_cfg() + ' ' + fnm.path_to_xtc_files_for_run() # fnm.path_dark_xtc_cond()
        queue        = self.queue.value()
        bat_log_file = fnm.path_peds_scan_batch_log()

        #print 'command     :', command
        #print 'queue       :', queue
        #print 'bat_log_file:', bat_log_file

        self.job_id_scan_str, out, err = gu.batch_job_submit(command, queue, bat_log_file)
        self.procDarkStatus ^= 1 # set bit to 1

        if err != '' :
            self.stop_auto_processing(is_stop_on_button_click=False)        
            logger.warning('Autoprocessing for run %s is stopped due to batch submission error!!!' % self.str_run_number, __name__)
コード例 #5
0
 def     make_psana_cfg_file_for_peds_scan(self) :
     cfg.make_psana_cfg_file_for_peds_scan()
コード例 #6
0
 def make_psana_cfg_file_for_peds_scan(self):
     cfg.make_psana_cfg_file_for_peds_scan()