Esempio n. 1
0
    def RunJob(self, dataset):

        # Getting the dataset name
        name = InstanceName.Get(dataset.name)

        # Creating Output folder is not defined
        if not os.path.isdir(self.path + "/Output/" + name):
            os.mkdir(self.path + "/Output/" + name)

        # folder where the program is launched
        folder = self.path + '/Build/'

        # shell command
        commands = ['./MadAnalysis5job']

        # Weighted events
        if not dataset.weighted_events:
            commands.append('--no_event_weight')

        # Release
        commands.append('--ma5_version="'+\
                        self.main.archi_info.ma5_version+';'+\
                        self.main.archi_info.ma5_date+'"')

        # Inputs
        commands.append('../Input/' + name + '.list')

        # Running SampleAnalyzer
        if self.main.redirectSAlogger:
            result = ShellCommand.ExecuteWithMA5Logging(commands, folder)
        else:
            result = ShellCommand.Execute(commands, folder)

        return result