parameters: (event)
return_statement: return files
docstring: Return files for given DAS query via das_client
docstring_summary: Return files for given DAS query via das_client
docstring_tokens: Return files for given DAS query via das_client
function: def getFileNames_das_client(event):
      """Return files for given DAS query via das_client"""
      files = []
  
      query = "file dataset=%(dataset)s run=%(run)i lumi=%(lumi)i | grep file.name" % event
      jsondict = das_client.get_data(query)
      status = jsondict['status']
      if status != 'ok':
          print("DAS query status: %s"%(status))
          return files
  
      mongo_query = jsondict['mongo_query']
      filters = mongo_query['filters']
      data = jsondict['data']
  
      files = []
      for row in data:
          file = [r for r in das_client.get_value(row, filters['grep'])][0]
          if len(file) > 0 and not file in files:
              files.append(file)
  
      return files
function_tokens: def getFileNames_das_client ( event ) : files = [ ] query = "file dataset=%(dataset)s run=%(run)i lumi=%(lumi)i | grep file.name" % event jsondict = das_client . get_data ( query ) status = jsondict [ 'status' ] if status != 'ok' : print ( "DAS query status: %s" % ( status ) ) return files mongo_query = jsondict [ 'mongo_query' ] filters = mongo_query [ 'filters' ] data = jsondict [ 'data' ] files = [ ] for row in data : file = [ r for r in das_client . get_value ( row , filters [ 'grep' ] ) ] [ 0 ] if len ( file ) > 0 and not file in files : files . append ( file ) return files