コード例 #1
0
    def do_check_events(self, line):
        """MadWeight Function: check that the events are valid
        and write the events to MG mapping"""
        self.configure()
        evt_file = pjoin(self.me_dir, 'Events', 'input.lhco')
        if not os.path.exists(evt_file):
            question = 'Which LHCO file do you want to use?'
            default = ''
            if os.path.exists('%s.gz' % evt_file):
                input_file = '%s.gz' % evt_file
            else:
                input_file = self.ask(question, default, path_msg='valid path')

            if not input_file:
                raise self.InvalidCmd('Please specify a valid LHCO File')

            if input_file.endswith('.gz'):
                misc.gunzip(input_file, keep=True, stdout=evt_file)
            else:
                files.cp(input_file, evt_file)

        verif_event.verif_event(self.MWparam)
コード例 #2
0
 def do_check_events(self, line):
     """MadWeight Function: check that the events are valid
     and write the events to MG mapping"""
     self.configure()
     evt_file = pjoin(self.me_dir,'Events','input.lhco')
     if not os.path.exists(evt_file):
         question = 'Which LHCO file do you want to use?'
         default = ''            
         if os.path.exists('%s.gz' % evt_file):
             input_file =  '%s.gz' % evt_file
         else:
             input_file = self.ask(question, default, path_msg='valid path')
         
         if not input_file:
             raise self.InvalidCmd('Please specify a valid LHCO File')
         
         if input_file.endswith('.gz'):
             misc.gunzip(input_file, keep=True, stdout=evt_file)
         else:
             files.cp(input_file, evt_file)
         
     verif_event.verif_event(self.MWparam)