Skip to content

Commit 18495d8

Browse files
committed
Remove SwitchProducer remnant from HLT common.py
1 parent da54c6d commit 18495d8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

HLTrigger/Configuration/python/common.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
def producers_by_type(process, *types):
55
"Find all EDProducers in the Process that are instances of the given C++ type."
6-
switches = (module for module in (getattr(switchproducer, case) \
7-
for switchproducer in process._Process__switchproducers.values() \
8-
for case in switchproducer.parameterNames_()) \
9-
if isinstance(module, cms.EDProducer))
10-
return (module for module in itertools.chain(process._Process__producers.values(), switches) \
6+
return (module for module in process._Process__producers.values() \
117
if module._TypedParameterizable__type in types)
128

139
def filters_by_type(process, *types):
@@ -24,10 +20,7 @@ def esproducers_by_type(process, *types):
2420

2521
def modules_by_type(process, *types):
2622
"Find all modiles or other components in the Process that are instances of the given C++ type."
27-
switches = (module for module in (getattr(switchproducer, case) \
28-
for switchproducer in process._Process__switchproducers.values() \
29-
for case in switchproducer.parameterNames_()))
30-
return (module for module in itertools.chain(process.__dict__.values(), switches) \
23+
return (module for module in process.__dict__.values() \
3124
if hasattr(module, '_TypedParameterizable__type') and module._TypedParameterizable__type in types)
3225

3326

0 commit comments

Comments
 (0)