ATLAS Offline Software
Functions
python.GetInputFiles Namespace Reference

Functions

def GetInputFiles (inputPath, filePattern)
 
def GetInputFilesFromTokens (inputPath, runnumber, prefix=".*", trigger=".*")
 
def GetInputFilesFromPattern (inputPath, prefix=".*", trigger=".*")
 
def GetInputFilesFromPrefix (inputPath, prefix=".*")
 

Function Documentation

◆ GetInputFiles()

def python.GetInputFiles.GetInputFiles (   inputPath,
  filePattern 
)

Definition at line 5 of file GetInputFiles.py.

5 def GetInputFiles(inputPath,filePattern):
6  print("Searching for files with pattern '",filePattern,"' in ",inputPath)
7  fileList=[]
8  cmd='ls -1'
9 
10  for f in popen("%(cmd)s %(path)s | grep '%(pattern)s'" \
11  % {'cmd':cmd,'path':inputPath,'pattern':filePattern}):
12  if f[len(f)-1:]=='\n':
13  f=f[0:len(f)-1]
14  if (inputPath[0:11]=='/eos/atlas/'):
15  fileList+=['root://eosatlas.cern.ch/'+inputPath+'/'+f]
16  elif (inputPath[0:10]=='/eos/user/'):
17  fileList+=['root://eosuser.cern.ch/'+inputPath+'/'+f]
18  elif (inputPath[0:12]=='/eos/project'):
19  fileList+=['root://eosproject.cern.ch/'+inputPath+'/'+f]
20  else:
21  fileList+=[inputPath+'/'+f]
22  print ("Found ",len(fileList), " files")
23  return fileList
24 
25 

◆ GetInputFilesFromPattern()

def python.GetInputFiles.GetInputFilesFromPattern (   inputPath,
  prefix = ".*",
  trigger = ".*" 
)

Definition at line 32 of file GetInputFiles.py.

32 def GetInputFilesFromPattern(inputPath,prefix=".*",trigger=".*"):
33  pattern="%(prefix)s.*%(trig)s.*" % {'prefix' : prefix ,'trig' : trigger}
34 
35  return GetInputFiles(inputPath,pattern)
36 

◆ GetInputFilesFromPrefix()

def python.GetInputFiles.GetInputFilesFromPrefix (   inputPath,
  prefix = ".*" 
)

Definition at line 37 of file GetInputFiles.py.

37 def GetInputFilesFromPrefix(inputPath,prefix=".*"):
38  pattern="%(prefix)s.*" % {'prefix' : prefix }
39 
40  return GetInputFiles(inputPath,pattern)

◆ GetInputFilesFromTokens()

def python.GetInputFiles.GetInputFilesFromTokens (   inputPath,
  runnumber,
  prefix = ".*",
  trigger = ".*" 
)

Definition at line 26 of file GetInputFiles.py.

26 def GetInputFilesFromTokens(inputPath,runnumber,prefix=".*",trigger=".*"):
27  #pattern=prefix+"\.00"+str(runnumber)+"\..*"
28  pattern="%(prefix)s.*%(rn)07d.%(trig)s.*" % {'prefix' : prefix ,'rn' : runnumber,'trig' : trigger}
29 
30  return GetInputFiles(inputPath,pattern)
31 
python.GetInputFiles.GetInputFilesFromTokens
def GetInputFilesFromTokens(inputPath, runnumber, prefix=".*", trigger=".*")
Definition: GetInputFiles.py:26
python.GetInputFiles.GetInputFiles
def GetInputFiles(inputPath, filePattern)
Definition: GetInputFiles.py:5
python.GetInputFiles.GetInputFilesFromPrefix
def GetInputFilesFromPrefix(inputPath, prefix=".*")
Definition: GetInputFiles.py:37
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.GetInputFiles.GetInputFilesFromPattern
def GetInputFilesFromPattern(inputPath, prefix=".*", trigger=".*")
Definition: GetInputFiles.py:32