Skip to content

Commit 2abd639

Browse files
Benedikt Volkelchiarazampolli
authored andcommitted
Small fixes
* make cmd args and timestamp of type int consistently * extend and actually make tuple
1 parent 487ae09 commit 2abd639

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
parser = argparse.ArgumentParser(description='Create an ALICE (Run3) MC simulation workflow')
3838

3939
# the run-number of data taking or default if unanchored
40-
parser.add_argument('-run',help="Run number for this MC", default=300000)
40+
parser.add_argument('-run', type=int, help="Run number for this MC", default=300000)
4141
parser.add_argument('-productionTag',help="Production tag for this MC", default='unknown')
4242
# the timestamp at which this MC workflow will be run
4343
# - in principle it should be consistent with the time of the "run" number above
4444
# - some external tool should sample it within
4545
# - we can also sample it ourselfs here
46-
parser.add_argument('--timestamp',help="Anchoring timestamp (defaults to now)", default=-1)
46+
parser.add_argument('--timestamp', type=int, help="Anchoring timestamp (defaults to now)", default=-1)
4747
parser.add_argument('--anchor-config',help="JSON file to contextualise workflow with external configs (config values etc.) for instance comping from data reco workflows.", default='')
4848
parser.add_argument('-ns',help='number of signal events / timeframe', default=20)
4949
parser.add_argument('-gen',help='generator: pythia8, extgen', default='')
@@ -206,7 +206,7 @@ def retrieve_sor(run_number):
206206
SOR=match_object[2]
207207
break
208208

209-
return SOR
209+
return int(SOR)
210210

211211

212212
# ----------- START WORKFLOW CONSTRUCTION -----------------------------
@@ -516,7 +516,7 @@ def getDPL_global_options(bigshm=False):
516516
+ ' --field ' + str(BFIELD) + ' -j ' + str(NWORKERS) + ' -g ' + str(GENERATOR) \
517517
+ ' ' + str(TRIGGER) + ' ' + str(CONFKEY) + ' ' + str(INIFILE) \
518518
+ ' -o ' + signalprefix + ' ' + embeddinto \
519-
+ (' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + args.run
519+
+ ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + str(args.run)
520520
if not "all" in activeDetectors:
521521
SGNtask['cmd'] += ' --readoutDetectors ' + " ".join(activeDetectors)
522522
workflow['stages'].append(SGNtask)
@@ -901,7 +901,7 @@ def getDigiTaskName(det):
901901
if isActive("MID"):
902902
pvfinder_matching_sources += ",MID"
903903
pvfinderneeds += [MIDRECOtask['name']]
904-
904+
905905
PVFINDERtask = createTask(name='pvfinder_'+str(tf), needs=pvfinderneeds, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS, mem='4000')
906906
PVFINDERtask['cmd'] = '${O2_ROOT}/bin/o2-primary-vertexing-workflow ' \
907907
+ getDPL_global_options() + putConfigValuesNew(['ITSAlpideParam','MFTAlpideParam', 'pvertexer', 'TPCGasParam'], {"NameConf.mDirMatLUT" : ".."})

0 commit comments

Comments
 (0)