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) else: print "ERROR: I can't understand the dataset named {}".format(options.dataset) ### Output: if options.outFile:
options.suffix = "pt{0}".format(options.cutPtFilter) ### Input: if options.subprocess: miniaod = dataset.fetch_miniaod(options.subprocess, options.generation) sample = miniaod.get_sample() sigma = sample.sigma if sigma == None: # 161013: Added after removing sigma from jetht datasets. sigma = -1 weight = miniaod.weight if options.weight < 0: factor = 1 if not options.crab: if options.maxEvents > 0: # If maxEvents is -1, run over everything factor = miniaod.n/options.maxEvents options.weight = weight*factor else: miniaod = False sigma = -1 if options.weight < 0: options.weight = 1 if options.data: options.weight = 1 #print "Weight:", options.weight #in_files = ["{0}/{1}".format(options.inDir, f) for f in options.inFile] in_files = options.inFile print "User defined input files: {}".format(in_files) if (not in_files) and (not options.crab): assert miniaod if miniaod.files: