in_files = ["file:{0}/{1}".format(options.inDir, f) for f in options.inFile] else: in_files = ["file:{0}".format(f) for f in options.inFile] #### Auto: out_file = "" nevents = options.maxEvents if options.dataset: in_files = [] result = dataset.get_datasets(name=options.dataset, generation=options.generation, set_info=True) if result: if len(result) == 1: # Only one process dss = result.values()[0] if len(dss) == 1: # Only one subprocess (there should be only one corresponding to each dataset name). ds = dss[0] if options.sigma < 0: options.sigma = ds.sigma if nevents > 0: # If maxEvents is -1, run over everything factor = ds.jets_n/nevents else: factor = 1 options.weight = ds.weight*factor print "Sigma = {0}".format(options.sigma) # in_files.extend(["file:{0}".format(f) for f in ds.jets_path]) # in_files.extend(["root://cmsxrootd.fnal.gov/{0}".format(f) for f in ds.jets_path]) in_files.extend(["root://cmseos.fnal.gov/{0}".format(f) for f in ds.jets_path]) # print in_files out_file = "{0}_tuple.root".format(options.dataset) else: print "ERROR: There were multiple datasets found for the name {}. They are listed below:\n{}".format(options.dataset, dss) else: print "ERROR: There were multiple processes returned for the dataset name of {}:\n{}".format(options.dataset, result)