44parser.add_argument(
'--maxEvents', type=int, default=50, help=
"Propaged to the maxEvents of the Reco_tf commands")
93 if not os.path.exists(inputFile)
and not arg.noRun:
94 print (
'ERROR input file ', inputFile ,
' missing')
98 transform=
"Reco_tf.py"
100 inputFileBase = os.path.basename(inputFile)
102 if 'HITS' in inputFileBase:
108 elif "RDO" in inputFileBase:
110 inputDataType=inputType
112 preExec=
'''flags.Reco.EnableTrigger=False; flags.Reco.EnableBTagging=False'''
114 elif "RAW" in inputFileBase:
118 preExec=
'''flags.Reco.EnableTrigger=False'''
120 elif 'ESD' in inputFileBase:
122 inputDataType=inputType
124 preExec=
'''flags.Reco.EnableTrigger=False'''
127 print (
"ERROR RunStep: Input file does not appear to be a supported type (RAW, HITS, RDO, ESD)")
128 print (
' -> got', inputFileBase)
131 print (
"Starting ",inputType,
' to ', outputType)
134 runDir = arg.outputDir +
'/' + inputType+
'to'+outputType +
'/'
135 if not os.path.exists(runDir):
137 outputFile = runDir + inputFileBase.replace(inputType, outputType)
138 if arg.overWrite
and os.path.exists(outputFile):
139 os.remove(outputFile)
141 outputLog = runDir+
'log'
143 comandArgs = [
'--preExec='+preExec,
144 '--input%sFile=%s'%(inputDataType, inputFile),
145 '--output%sFile=%s'%(outputType, outputFile),
146 '--maxEvents='+str(maxEvents),
147 '--skipEvents='+str(skipEvents),
148 '--autoConfiguration=everything',
152 print (transform,
' '.join(comandArgs))
158 logfile = open(outputLog,
'w')
159 res = subprocess.call( [transform] + comandArgs, stdout=logfile, stderr=logfile)
163 print (
'ERROR RunStep: Transform appears to have failed - exiting. Check ', outputLog)
168 print (
'Done %s to %s step'%(inputType, outputType))