CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
inputfiles.py
Go to the documentation of this file.
1 rootfiles=[
2  # Collisions at 900 GeV
3  # /ExpressPhysics/BeamCommissioning09-Express-v2/FEVT --- run = 124022 and lumi>35 and lumi<100 #
4  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/FC89901D-FFE6-DE11-AA38-001D09F25401.root',
5  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/FC0FBE28-FAE6-DE11-9C39-0030487A3232.root',
6  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/FA34E8C3-F8E6-DE11-8690-000423D99F1E.root',
7  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/F411ED8A-00E7-DE11-ADD6-001D09F24259.root',
8  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/EED37FD3-FFE6-DE11-A920-001D09F27003.root',
9  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/EA8BC9C3-F8E6-DE11-B5E7-000423D98BC4.root',
10  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/DEFC94D2-FFE6-DE11-8C5D-001D09F29597.root',
11  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/DAE9A81C-FFE6-DE11-A9C0-001D09F290CE.root',
12  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/D61F55D4-FFE6-DE11-8F08-001D09F24763.root',
13  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/D4E246DB-FAE6-DE11-B1EC-001D09F244BB.root',
14  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/CCF8E65B-FEE6-DE11-9C60-001D09F2915A.root',
15  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/CC426156-F9E6-DE11-BC44-000423D9890C.root',
16  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/CC2FEB24-FAE6-DE11-AF03-0019DB29C614.root',
17  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/BE88DA89-00E7-DE11-8AFB-001D09F290BF.root',
18  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/B6B98DB0-FDE6-DE11-B68A-000423D98EA8.root',
19  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/B4A63547-FCE6-DE11-BC18-001D09F29321.root',
20  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/AC966147-FCE6-DE11-9B12-0019B9F730D2.root',
21  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/A8D5D1FA-FCE6-DE11-8104-000423D9890C.root',
22  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/A85FA1C3-F8E6-DE11-9426-000423D9A212.root',
23  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/A4DD025B-FEE6-DE11-AAD0-001D09F24F1F.root',
24  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/A414A5FB-FCE6-DE11-86FC-001617E30D12.root',
25  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/9C9305B0-FDE6-DE11-B7FE-001D09F24259.root',
26  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/982ACE88-00E7-DE11-A8BC-001D09F24D8A.root',
27  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/94777646-FCE6-DE11-AEFD-001D09F24FBA.root',
28  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/846EAA3F-01E7-DE11-8AE4-0030487D0D3A.root',
29  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/749CEAFE-FCE6-DE11-B341-001617DBCF6A.root',
30  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/6A72D340-01E7-DE11-A1AF-0030487D1BCC.root',
31  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/66BC1FB2-FDE6-DE11-806D-000423D952C0.root',
32  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/5ACD66B1-FDE6-DE11-A8DD-001D09F27003.root',
33  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/5A7DD1F6-FCE6-DE11-BD0F-000423D9997E.root',
34  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/5432D247-FCE6-DE11-87FD-001D09F2516D.root',
35  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/46FAE4DB-FAE6-DE11-9152-001D09F24303.root',
36  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/421BA7B3-FDE6-DE11-9931-001D09F24353.root',
37  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/2C32DCC3-F8E6-DE11-B256-000423D33970.root',
38  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/2AB9A18A-FBE6-DE11-8759-001617E30F50.root',
39  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/285060B2-FDE6-DE11-9DA2-001D09F2AF96.root',
40  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/24DB2A8B-FBE6-DE11-AA05-000423D98EC8.root',
41  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/22AAB44C-F7E6-DE11-91B4-001D09F2906A.root',
42  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/22A5551C-FFE6-DE11-B7C3-001D09F25393.root',
43  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/1A563723-FAE6-DE11-9887-000423D60FF6.root',
44  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/167E685B-FEE6-DE11-8E02-0019B9F72F97.root',
45  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/0CDBF14E-F7E6-DE11-B9E1-001D09F26509.root',
46  '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/124/022/06B52B97-FBE6-DE11-A989-001617E30E28.root'
47  ]
48 
49 
50 datfiles=[
51 'file:/tmp/temple/inputfiles/Data.00128766.0001.A.storageManager.00.0000.dat',
52 'file:/tmp/temple/inputfiles/Data.00128766.0021.A.storageManager.01.0000.dat',
53 'file:/tmp/temple/inputfiles/Data.00128766.0041.A.storageManager.02.0000.dat',
54 'file:/tmp/temple/inputfiles/Data.00128766.0061.A.storageManager.03.0000.dat',
55 'file:/tmp/temple/inputfiles/Data.00128766.0081.A.storageManager.04.0000.dat',
56 'file:/tmp/temple/inputfiles/Data.00128766.0101.A.storageManager.05.0000.dat',
57 'file:/tmp/temple/inputfiles/Data.00128766.0121.A.storageManager.06.0000.dat',
58 'file:/tmp/temple/inputfiles/Data.00128766.0141.A.storageManager.07.0000.dat',
59 'file:/tmp/temple/inputfiles/Data.00128766.0161.A.storageManager.08.0000.dat',
60 'file:/tmp/temple/inputfiles/Data.00128766.0181.A.storageManager.09.0000.dat',
61 'file:/tmp/temple/inputfiles/Data.00128766.0201.A.storageManager.10.0000.dat',
62 'file:/tmp/temple/inputfiles/Data.00128766.0221.A.storageManager.11.0000.dat',
63 'file:/tmp/temple/inputfiles/Data.00128766.0241.A.storageManager.12.0000.dat',
64 'file:/tmp/temple/inputfiles/Data.00128766.0261.A.storageManager.13.0000.dat',
65 'file:/tmp/temple/inputfiles/Data.00128766.0281.A.storageManager.14.0000.dat',
66  ]
67 
68 def copyfiles(filelist,args=None):
69  import string
70  import os
71  dir="/tmp/temple/inputfiles"
72  if len(args)>0:
73  dir=args[0]
74  if not os.path.isdir(dir):
75  print "Sorry, dir '%s' does not exist"%dir
76  return
77  startcount=-1
78  endcount=9999999999
79  if (len(args)>1):
80  startcount=string.atoi(args[1])
81  if (len(args)>2):
82  endcount=string.atoi(args[2])
83 
84  print "startcount = ",startcount
85  print "endcount = ",endcount
86  counter=0
87  for i in filelist:
88  if not i.startswith("/store/"):
89  continue
90  counter=counter+1
91  if (counter<startcount):
92  continue
93  temp=string.replace(i,"/store/","/castor/cern.ch/cms/store/")
94  cmd="rfcp %s /tmp/temple/inputfiles"%temp
95  print cmd
96  os.system(cmd)
97  if (counter>=endcount):
98  break
99 
100 def makelocal(filelist,dir):
101  import string
102  import os
103 
104  newfilelist=[]
105  for i in range(len(filelist)):
106  temp=os.path.basename(filelist[i])
107  temp=os.path.join(dir,temp)
108  if os.path.isfile(temp):
109  newfilelist.append("file:%s"%temp)
110  return newfilelist
111 
112 if __name__=="__main__":
113  import string
114  import os
115  import sys
116  outdir="/tmp/temple/inputfiles/"
117  if len(sys.argv)>1:
118  outdir=sys.argv[1]
119  if not os.path.isdir(outdir):
120  print "Sorry, output directory '%s' does not exist!"%outdir
121  copyfiles(rootfiles,sys.argv[1:])
def makelocal
Definition: inputfiles.py:100
def copyfiles
Definition: inputfiles.py:68