Пример #1
0
runtype = options.runtype

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
Пример #2
0
    dprint('Running with')
    dprint('runtype', runtype)
    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],