CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
inputfiles Namespace Reference

Functions

def copyfiles
 
def makelocal
 

Variables

list datfiles
 
string outdir = "/tmp/temple/inputfiles/"
 
list rootfiles
 

Function Documentation

def inputfiles.copyfiles (   filelist,
  args = None 
)

Definition at line 68 of file inputfiles.py.

68 
69 def copyfiles(filelist,args=None):
70  import string
71  import os
72  dir="/tmp/temple/inputfiles"
73  if len(args)>0:
74  dir=args[0]
75  if not os.path.isdir(dir):
76  print "Sorry, dir '%s' does not exist"%dir
77  return
78  startcount=-1
79  endcount=9999999999
80  if (len(args)>1):
81  startcount=string.atoi(args[1])
82  if (len(args)>2):
83  endcount=string.atoi(args[2])
84 
85  print "startcount = ",startcount
86  print "endcount = ",endcount
87  counter=0
88  for i in filelist:
89  if not i.startswith("/store/"):
90  continue
91  counter=counter+1
92  if (counter<startcount):
93  continue
94  temp=string.replace(i,"/store/","/castor/cern.ch/cms/store/")
95  cmd="rfcp %s /tmp/temple/inputfiles"%temp
96  print cmd
97  os.system(cmd)
98  if (counter>=endcount):
99  break
def copyfiles
Definition: inputfiles.py:68
def inputfiles.makelocal (   filelist,
  dir 
)

Definition at line 100 of file inputfiles.py.

101 def makelocal(filelist,dir):
102  import string
103  import os
104 
105  newfilelist=[]
106  for i in range(len(filelist)):
107  temp=os.path.basename(filelist[i])
108  temp=os.path.join(dir,temp)
109  if os.path.isfile(temp):
110  newfilelist.append("file:%s"%temp)
111  return newfilelist
def makelocal
Definition: inputfiles.py:100

Variable Documentation

list inputfiles.datfiles
Initial value:
1 = [
2 'file:/tmp/temple/inputfiles/Data.00128766.0001.A.storageManager.00.0000.dat',
3 'file:/tmp/temple/inputfiles/Data.00128766.0021.A.storageManager.01.0000.dat',
4 'file:/tmp/temple/inputfiles/Data.00128766.0041.A.storageManager.02.0000.dat',
5 'file:/tmp/temple/inputfiles/Data.00128766.0061.A.storageManager.03.0000.dat',
6 'file:/tmp/temple/inputfiles/Data.00128766.0081.A.storageManager.04.0000.dat',
7 'file:/tmp/temple/inputfiles/Data.00128766.0101.A.storageManager.05.0000.dat',
8 'file:/tmp/temple/inputfiles/Data.00128766.0121.A.storageManager.06.0000.dat',
9 'file:/tmp/temple/inputfiles/Data.00128766.0141.A.storageManager.07.0000.dat',
10 'file:/tmp/temple/inputfiles/Data.00128766.0161.A.storageManager.08.0000.dat',
11 'file:/tmp/temple/inputfiles/Data.00128766.0181.A.storageManager.09.0000.dat',
12 'file:/tmp/temple/inputfiles/Data.00128766.0201.A.storageManager.10.0000.dat',
13 'file:/tmp/temple/inputfiles/Data.00128766.0221.A.storageManager.11.0000.dat',
14 'file:/tmp/temple/inputfiles/Data.00128766.0241.A.storageManager.12.0000.dat',
15 'file:/tmp/temple/inputfiles/Data.00128766.0261.A.storageManager.13.0000.dat',
16 'file:/tmp/temple/inputfiles/Data.00128766.0281.A.storageManager.14.0000.dat',
17  ]

Definition at line 50 of file inputfiles.py.

list inputfiles.outdir = "/tmp/temple/inputfiles/"

Definition at line 116 of file inputfiles.py.

list inputfiles.rootfiles

Definition at line 1 of file inputfiles.py.