Skip to content

Commit

Permalink
Explicitly state which Associations need Trajectories
Browse files Browse the repository at this point in the history
Avoid early delete of Trajectories if a module reads an Association
which uses the Trajectory.
  • Loading branch information
Dr15Jones committed Sep 26, 2022
1 parent 9859340 commit 50c3d20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def customiseEarlyDelete(process):

(products, references) = customiseEarlyDeleteForSeeding(process, products)
products = customiseEarlyDeleteForMkFit(process, products)
products = customiseEarlyDeleteForCKF(process, products)
(products, newReferences) = customiseEarlyDeleteForCKF(process, products)
references.update(newReferences)

products = customiseEarlyDeleteForCandIsoDeposits(process, products)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

def customiseEarlyDeleteForCKF(process, products):

references = collections.defaultdict(list)

if "trackExtenderWithMTD" not in process.producerNames():
return products
return (products, references)

def _branchName(productType, moduleLabel, instanceLabel=""):
return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())
Expand All @@ -15,6 +17,7 @@ def _branchName(productType, moduleLabel, instanceLabel=""):
def _addProduct(name):
products[name].append(_branchName("Trajectorys", name))
products[name].append(_branchName("TrajectorysToOnerecoTracksAssociation", name))
references[_branchName("TrajectorysToOnerecoTracksAssociation", name)] = [_branchName("Trajectorys", name)]
trajectoryLabels.append(name)

for name, module in process.producers_().items():
Expand Down Expand Up @@ -53,4 +56,4 @@ def _containsTrajectory(vinputtag):
noTrajectoryYet.append(tlm)
trackListMergers = noTrajectoryYet

return products
return (products, references)

0 comments on commit 50c3d20

Please sign in to comment.