Skip to content

Commit 02fa1bc

Browse files
committed
AnchorMC: Allow more option overwrites
1 parent 04c9dae commit 02fa1bc

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
567567
GRP_TASK = createTask(name='grpcreate', needs=["geomprefetch"], cpu='0')
568568
GRP_TASK['cmd'] = 'o2-grp-simgrp-tool createGRPs --timestamp ' + str(args.timestamp) + ' --run ' + str(args.run) + ' --publishto ${ALICEO2_CCDB_LOCALCACHE:-.ccdb} -o grp --hbfpertf ' + str(orbitsPerTF) + ' --field ' + args.field
569569
GRP_TASK['cmd'] += ' --detectorList ' + args.detectorList + ' --readoutDets ' + " ".join(activeDetectors) + ' --print ' + ('','--lhcif-CCDB')[args.run_anchored]
570-
if (not args.run_anchored == True) and len(args.bcPatternFile) > 0:
570+
if len(args.bcPatternFile) > 0:
571571
GRP_TASK['cmd'] += ' --bcPatternFile ' + str(args.bcPatternFile)
572572
if len(CONFKEYMV) > 0:
573573
# this is allowing the possibility to setup/use a different MeanVertex object than the one from CCDB

MC/bin/o2dpg_sim_workflow_anchored.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,19 @@ def main():
582582
forwardargs += ' --ctp-scaler ' + str(ctp_local_rate_raw)
583583

584584
# we finally pass forward to the unanchored MC workflow creation
585-
# TODO: this needs to be done in a pythonic way clearly
586-
# NOTE: forwardargs can - in principle - contain some of the arguments that are appended here. However, the last passed argument wins, so they would be overwritten.
585+
# NOTE: forwardargs can - in principle - contain some of the arguments that are appended here.
586+
# However, the last passed argument wins, so they would be overwritten. If this should not happen, the option
587+
# needs to be handled as further below:
587588
energyarg = (" -eCM " + str(eCM)) if A1 == A2 else (" -eA " + str(eA) + " -eB " + str(eB))
588589
forwardargs += " -tf " + str(args.tf) + " --sor " + str(run_start) + " --timestamp " + str(timestamp) + " --production-offset " + str(prod_offset) + " -run " + str(args.run_number) + " --run-anchored --first-orbit " \
589-
+ str(GLOparams["FirstOrbit"]) + " -field ccdb -bcPatternFile ccdb" + " --orbitsPerTF " + str(GLOparams["OrbitsPerTF"]) + " -col " + str(ColSystem) + str(energyarg)
590+
+ str(GLOparams["FirstOrbit"]) + " --orbitsPerTF " + str(GLOparams["OrbitsPerTF"]) + " -col " + str(ColSystem) + str(energyarg)
591+
# the following options can be overwritten/influence from the outside
590592
if not '--readoutDets' in forwardargs:
591593
forwardargs += ' --readoutDets ' + GLOparams['detList']
594+
if not '-field' in forwardargs:
595+
forwardargs += ' -field ccdb '
596+
if not '-bcPatternFile' in forwardargs:
597+
forwardargs += ' -bcPatternFile ccdb '
592598
print ("forward args ", forwardargs)
593599
cmd = "${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py " + forwardargs
594600

0 commit comments

Comments
 (0)