Esempio n. 1
0
def getFiles(dataset,
             cache=True,
             user='******',
             basedir='/store/cmst3/user/cbern/CMG'):
    ds = createDataset(user,
                       dataset,
                       '.*root',
                       readcache=cache,
                       basedir=basedir)
    filenames = ds.listOfGoodFiles()
    return [
        'root://eoscms.cern.ch//eos/cms{fname}'.format(fname=fname)
        for fname in filenames
    ]
Esempio n. 2
0
def getFiles(dataset, cache=True, user="******", basedir="/store/cmst3/user/cbern/CMG"):
    ds = createDataset(user, dataset, ".*root", readcache=cache, basedir=basedir)
    filenames = ds.listOfGoodFiles()
    return ["root://eoscms.cern.ch//eos/cms{fname}".format(fname=fname) for fname in filenames]
Esempio n. 3
0
                      type=int,
                      help='When querying DBS, require runs >= than this run')
    parser.add_option("--max-run",
                      dest="max_run",
                      default=-1,
                      type=int,
                      help='When querying DBS, require runs <= than this run')

    (options, args) = parser.parse_args()

    if len(args) != 1:
        parser.print_help()
        sys.exit(1)

    user = options.user
    name = args[0]
    info = not options.noinfo

    run_range = (options.min_run, options.max_run)
    data = createDataset(user,
                         name,
                         fnmatch.translate(options.wildcard),
                         options.readcache,
                         options.basedir,
                         run_range=run_range)
    data.printInfo()
    data.printFiles(abspath=options.abspath, info=info)
    pprint.pprint(data.filesAndSizes)
    if options.report:
        pprint.pprint(data.report)
Esempio n. 4
0
                      action = 'store_true',
                      default=False,
                      help='Read from the cache.')
    parser.add_option("--min-run", dest="min_run", default=-1, type=int, help='When querying DBS, require runs >= than this run')
    parser.add_option("--max-run", dest="max_run", default=-1, type=int, help='When querying DBS, require runs <= than this run')

    (options,args) = parser.parse_args()

    if len(args)!=1:
        parser.print_help()
        sys.exit(1)

    user = options.user
    name = args[0]
    info = not options.noinfo

    run_range = (options.min_run,options.max_run)
    data = createDataset(user, name,
                         fnmatch.translate( options.wildcard ),
                         options.readcache,
                         options.basedir,
                         run_range=run_range)
    data.printInfo()
    data.printFiles(abspath = options.abspath,
                    info = info)
    pprint.pprint( data.filesAndSizes )
    if options.report:
        pprint.pprint( data.report )