7 depends = collections.defaultdict(list)
9 def _branchName(productType, moduleLabel, instanceLabel=""):
10 return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())
12 for name, module
in process.producers_().iteritems():
13 cppType = module._TypedParameterizable__type
14 if cppType ==
"HitPairEDProducer":
15 if module.produceSeedingHitSets:
16 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
17 if module.produceIntermediateHitDoublets:
18 products[name].
append(_branchName(
"IntermediateHitDoublets", name))
19 elif cppType
in [
"PixelTripletHLTEDProducer",
"PixelTripletLargeTipEDProducer"]:
20 if module.produceSeedingHitSets:
21 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
22 if module.produceIntermediateHitTriplets:
23 products[name].
append(_branchName(
"IntermediateHitTriplets", name))
26 depends[name].
append(module.doublets.getModuleLabel())
27 elif cppType
in [
"MultiHitFromChi2EDProducer"]:
28 products[name].extend([
29 _branchName(
"RegionsSeedingHitSets", name),
30 _branchName(
"BaseTrackerRecHitsOwned", name)
32 elif cppType
in [
"PixelQuadrupletEDProducer",
"CAHitQuadrupletEDProducer",
"CAHitTripletEDProducer"]:
33 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
34 elif cppType ==
"PixelQuadrupletMergerEDProducer":
35 products[name].extend([
36 _branchName(
"RegionsSeedingHitSets", name),
37 _branchName(
"TrajectorySeeds", name)
40 if len(products) == 0:
47 def _resolve(keys, name):
48 for dependsOn
in depends[name]:
50 _resolve(keys, dependsOn)
51 keys.remove(dependsOn)
52 products[name].extend(products[dependsOn])
54 keys = set(depends.keys())
60 def customiseEarlyDeleteForSeeding(process, products)