def getFilesFromEOS(path):
    '''Give path in form /store/relval/CMSSW_9_4_0_pre2/...'''
    dirs = eostools.listFiles('/eos/cms' + path)
    files = []
    for sub_path in dirs:
        files += [
            'root://eoscms.cern.ch/' + x for x in eostools.listFiles(sub_path)
            if re.match('.*root', x)
        ]
    return files
def getFilesFromEOS(path, cmseospath=True):
    '''Give path in form /store/relval/CMSSW_9_4_0_pre2/...'''
    if path[-1] == "/":
        path = path[:-1]
    dirs = eostools.listFiles(cmseospath * '/eos/cms' + path)
    print "getFilesFromEOS::path:", path
    print "getFilesFromEOS::dirs: ", dirs

    files = []
    for sub_path in dirs:
        print "\tsub_path:", sub_path
        files += [cmseospath * 'root://eoscms.cern.ch/' + x for x in eostools.listFiles(sub_path) if re.match('.*root', x)]

    print "files:", files
    return files
示例#3
0
 def listFiles(self,dir):
     """Recursively list a file or directory on castor"""
     return castortools.listFiles(dir,self.options.resursive)
示例#4
0
 def listFiles(self, dir):
     """Recursively list a file or directory on castor"""
     return castortools.listFiles(dir, self.options.resursive)