CMS 3D CMS Logo

Functions
earlyDeleteSettings_cff Namespace Reference

Functions

def customiseEarlyDelete (process)
 

Function Documentation

◆ customiseEarlyDelete()

def earlyDeleteSettings_cff.customiseEarlyDelete (   process)

Definition at line 12 of file earlyDeleteSettings_cff.py.

References contentValuesCheck.values.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

12 def customiseEarlyDelete(process):
13  # Mapping label -> [branches]
14  # for the producers whose products are to be deleted early
15  products = collections.defaultdict(list)
16 
17  (products, references) = customiseEarlyDeleteForSeeding(process, products)
18  products = customiseEarlyDeleteForMkFit(process, products)
19  (products, newReferences) = customiseEarlyDeleteForCKF(process, products)
20  references.update(newReferences)
21 
22  products = customiseEarlyDeleteForCandIsoDeposits(process, products)
23 
24  branchSet = set()
25  for branches in products.values():
26  for branch in branches:
27  branchSet.add(branch)
28  branchList = sorted(branchSet)
29  process.options.canDeleteEarly.extend(branchList)
30 
31  for prod, refs in references.items():
32  process.options.holdsReferencesToDeleteEarly.append(cms.PSet(product=cms.string(prod), references=cms.vstring(refs)))
33 
34  # LogErrorHarvester should not wait for deleted items
35  for prod in process.producers_().values():
36  if prod.type_() == "LogErrorHarvester":
37  if not hasattr(prod,'excludeModules'):
38  prod.excludeModules = cms.untracked.vstring()
39  t = prod.excludeModules.value()
40  t.extend([b.split('_')[1] for b in branchList])
41  prod.excludeModules = t
42 
43  return process