Пример #1
0
 def __init__(self,
              files,
              events=-1,
              load_emu_trees=False,
              load_reco_trees=True):
     from cmsl1t.utils.root_glob import glob
     input_files = []
     for f in files:
         if '*' in f:
             input_files.extend(glob(f))
         else:
             input_files.append(f)
     # this is not efficient
     self._trees = []
     self._names = []
     load_ROOT_library('L1TAnalysisDataformats.so')
     allTrees = get_trees(load_emu_trees, load_reco_trees)
     for name, path in allTrees.iteritems():
         try:
             chain = TreeChain(path, input_files, cache=True, events=events)
         except RuntimeError:
             logger.warn("Cannot find tree: {0} in input file".format(path))
             continue
         self._names.append(name)
         self._trees.append(chain)
Пример #2
0
def _get_input_files(paths):
    # TODO: move this replacement into cmsl1t.config
    input_files = []
    for p in paths:
        if '*' in p:
            input_files.extend(glob(p))
        else:
            input_files.append(p)
    return input_files
Пример #3
0
 def __init__(self, files, events=-1):
     from cmsl1t.utils.root_glob import glob
     input_files = []
     for f in files:
         if '*' in f:
             input_files.extend(glob(f))
         else:
             input_files.append(f)
     # this is not efficient
     self._trees = []
     self._names = []
     for name, path in ALL_TREE.iteritems():
         try:
             chain = TreeChain(path, input_files, cache=True, events=events)
         except RuntimeError:
             logger.warn("Cannot find tree: {0} in input file".format(path))
             continue
         self._names.append(name)
         self._trees.append(chain)
Пример #4
0
def resolve_file_paths(paths):
    from cmsl1t.utils.root_glob import glob
    all_files = []
    for p in paths:
        all_files.extend(glob(p))
    return all_files