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