dprint('RelVal', RelVal) dprint('globalTag', globalTag) dprint('storageSite', storageSite) filelist = [] if inputfiles: filelist = inputfiles else: path = '/store/relval/{}/{}/MINIAODSIM/{}'.format( RelVal, runtype_to_sample[runtype], globalTag) if storageSite == "eos": filelist = getFilesFromEOS(path) elif storageSite == "das": filelist = getFilesFromDAS(RelVal, runtype_to_sample[runtype], globalTag, exact) elif storageSite == 'loc': filelist = getFilesFromEOS(localdir + runtype_to_sample[runtype] + "/" + RelVal + '-' + globalTag + '/', cmseospath=False) if not filelist: print 'Sample', RelVal, runtype, 'does not exist in', path sys.exit(0) events = Events(filelist) if maxEvents < 0 and storageSite == "das": maxEvents = getNeventsFromDAS(RelVal, runtype_to_sample[runtype], globalTag, exact) print len( filelist
key = options.key if len(key) == 0: key = runtype_to_sample[runtype] + "_" + RelVal + "_" + globalTag if len(localdir) > 1 and localdir[-1] is not "/": localdir += "/" ######## Input files ######## inputfile = options.inputfile if inputfile != "": filelist = [inputfile] else: path = '/store/relval/{}/{}/MINIAODSIM/{}'.format(RelVal, runtype_to_sample[runtype], globalTag) if storageSite == "eos": filelist = getFilesFromEOS(path) elif storageSite == "das": filelist = getFilesFromDAS(RelVal, runtype_to_sample[runtype], globalTag) elif storageSite == 'loc': filelist = getFilesFromEOS(localdir + runtype_to_sample[runtype] + "/" + RelVal + '-' + globalTag + '/', cmseospath=False) if len(filelist) == 0: print 'Sample', RelVal, runtype, 'does not exist in', path sys.exit(0) if storageSite == 'loc': filelist = ['file:' + x for x in filelist] if key not in test_files.keys(): test_files[key] = { 'file' : filelist } else: print "!Warning! Such key already in the default list:", key print "filelist:", filelist
if len(localdir) > 1 and localdir[-1] is not "/": localdir += "/" ######## Input files ######## inputfile = options.inputfile if inputfile != "": filelist = [inputfile] else: path = '/store/relval/{}/{}/MINIAODSIM/{}'.format( RelVal, runtype_to_sample[runtype], globalTag) if storageSite == "eos": filelist = getFilesFromEOS(path) elif storageSite == "das": filelist = getFilesFromDAS( RelVal, runtype_to_sample[runtype], globalTag, exact= "/{PROCESS}/{RELEASE}-{GT}_HLTTDRPU200MINIv2-v1/GEN-SIM-DIGI-RAW-MINIAOD" .format(PROCESS=runtype_to_sample[runtype], RELEASE=RelVal, GT=globalTag)) elif storageSite == 'loc': filelist = getFilesFromEOS(localdir + runtype_to_sample[runtype] + "/" + RelVal + '-' + globalTag + '/', cmseospath=False) if len(filelist) == 0: print 'Sample', RelVal, runtype, 'does not exist in', path sys.exit(0) if storageSite == 'loc': filelist = ['file:' + x for x in filelist]