120 |
|
firstLumi = int(elem.getAttribute("FirstLumi")) |
121 |
|
|
122 |
|
generator = str(elem.getAttribute('Generator')) |
123 |
+ |
inputBlocks = str(elem.getAttribute('InputBlocks')) |
124 |
|
inputFiles = str(elem.getAttribute('InputFiles')) |
125 |
|
parentFiles = str(elem.getAttribute('ParentFiles')) |
126 |
|
lumis = str(elem.getAttribute('Lumis')) |
127 |
|
|
128 |
+ |
report(inputBlocks,inputFiles,parentFiles,lumis) |
129 |
+ |
|
130 |
|
# Read Input python config file |
131 |
|
|
132 |
|
handle = open(fileName, 'r') |
236 |
|
print cmsProcess.dumpPython() |
237 |
|
|
238 |
|
|
239 |
+ |
def report( inputBlocks='', inputFiles='', parentFiles='', lumis='' ): |
240 |
+ |
""" |
241 |
+ |
Writes the 4 parameters to a file, one parameter per line. |
242 |
+ |
""" |
243 |
+ |
outFile = open('inputsReport.txt',"a") |
244 |
+ |
|
245 |
+ |
# InputFileList=inputFiles.split(',') |
246 |
+ |
# parentFilesList= parentFiles.split(',') |
247 |
+ |
# lumisList= lumis.split(',') |
248 |
+ |
|
249 |
+ |
## replacing , with ; otherwise report.py will split it as a new parameter |
250 |
+ |
txt = '' |
251 |
+ |
txt += 'inputBlocks='+inputBlocks.replace(',',';')+'\n' |
252 |
+ |
txt += 'inputFiles='+inputFiles.replace(',',';')+'\n' |
253 |
+ |
txt += 'parentFiles='+parentFiles.replace(',',';')+'\n' |
254 |
+ |
txt += 'lumisRange='+lumis.replace(',',';')+'\n' |
255 |
+ |
print txt |
256 |
+ |
outFile.write(str(txt)) |
257 |
+ |
outFile.close() |
258 |
+ |
return |
259 |
+ |
|
260 |
+ |
|
261 |
|
if __name__ == '__main__' : |
262 |
|
exit_status = main(sys.argv[1:]) |
263 |
|
sys.exit(exit_status) |