1 import FWCore.ParameterSet.Config
as cms
8 depends = collections.defaultdict(list)
10 def _branchName(productType, moduleLabel, instanceLabel=""):
11 return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())
13 for name, module
in six.iteritems(process.producers_()):
14 cppType = module._TypedParameterizable__type
15 if cppType ==
"HitPairEDProducer":
16 if module.produceSeedingHitSets:
17 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
18 if module.produceIntermediateHitDoublets:
19 products[name].
append(_branchName(
"IntermediateHitDoublets", name))
20 elif cppType
in [
"PixelTripletHLTEDProducer",
"PixelTripletLargeTipEDProducer"]:
21 if module.produceSeedingHitSets:
22 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
23 if module.produceIntermediateHitTriplets:
24 products[name].
append(_branchName(
"IntermediateHitTriplets", name))
27 depends[name].
append(module.doublets.getModuleLabel())
28 elif cppType
in [
"MultiHitFromChi2EDProducer"]:
29 products[name].extend([
30 _branchName(
"RegionsSeedingHitSets", name),
31 _branchName(
"BaseTrackerRecHitsOwned", name)
33 elif cppType
in [
"CAHitQuadrupletEDProducer",
"CAHitTripletEDProducer"]:
34 products[name].
append(_branchName(
"RegionsSeedingHitSets", name))
36 if len(products) == 0:
43 def _resolve(keys, name):
44 for dependsOn
in depends[name]:
46 _resolve(keys, dependsOn)
47 keys.remove(dependsOn)
48 products[name].extend(products[dependsOn])
50 keys = set(depends.keys())