File indexing completed on 2024-04-06 12:22:32
0001
0002
0003 from __future__ import print_function
0004 import os
0005
0006
0007 INPUTPATH = '/afs/cern.ch/cms/OO/mag_field/versions_new/version_18l_160812_3_8t_v9_small_fin'
0008
0009
0010
0011
0012
0013 f = open('tableList.txt', 'w')
0014 for part in range (1, 3) :
0015 for sector in range (1, 13) :
0016 subdir = 's'+str(sector).zfill(2)
0017 os.system('mkdir -p '+subdir)
0018 for volume in range (1, 465) :
0019 volNo=str(volume+1000*part)
0020 type='rpz'
0021 if (volume>=138 and volume <= 402) :
0022 type = 'xyz'
0023 fullpath = INPUTPATH+'/'+subdir+'_'+str(part)+'/v-'+type+'-'+volNo+'.table'
0024 f.write(fullpath+'\n')
0025 status = os.system('${CMSSW_BASE}/test/${SCRAM_ARCH}/prepareFieldTable '+fullpath +' '+ subdir+'/grid.'+volNo+'.bin '+ str(sector))
0026 if status != 0 :
0027 print('ERROR table not processed:', fullpath)
0028
0029 f.close()