5 import FWCore.ParameterSet.Config
as cms
7 from RecoTracker.Configuration.customiseEarlyDeleteForSeeding
import customiseEarlyDeleteForSeeding
8 from CommonTools.ParticleFlow.Isolation.customiseEarlyDeleteForCandIsoDeposits
import customiseEarlyDeleteForCandIsoDeposits
11 for name
in pset.parameterNames_():
12 value = getattr(pset,name)
13 if isinstance(value, cms.PSet):
15 elif isinstance(value, cms.VPSet):
18 elif isinstance(value, cms.VInputTag):
21 if not isinstance(t, cms.InputTag):
23 for i,moduleLabel
in enumerate(moduleLabels):
24 if result[i]:
continue 25 if t2.getModuleLabel() == moduleLabel:
27 elif isinstance(value, cms.InputTag):
28 for i,moduleLabel
in enumerate(moduleLabels):
29 if result[i]:
continue 30 if value.getModuleLabel() == moduleLabel:
32 elif isinstance(value, cms.string)
and name ==
"refToPSet_":
39 products = collections.defaultdict(list)
46 if not hasattr(process.options,
"canDeleteEarly"):
47 process.options.canDeleteEarly = cms.untracked.vstring()
50 for branches
in products.itervalues():
51 for branch
in branches:
53 process.options.canDeleteEarly.extend(
list(branchSet))
58 for producer, branches
in products.iteritems():
59 producers.append(producer)
60 branchesList.append(branches)
62 for moduleType
in [process.producers_(), process.filters_(), process.analyzers_()]:
63 for name, module
in moduleType.iteritems():
65 for producer
in producers:
69 for i
in range(len(result)):
71 if hasattr(module,
"mightGet"):
72 module.mightGet.extend(branchesList[i])
74 module.mightGet = cms.untracked.vstring(branchesList[i])
78 if __name__==
"__main__":
87 p.pset = cms.PSet(a=cms.InputTag(
"a"),a2=cms.untracked.InputTag(
"a2"))
88 p.prod = cms.EDProducer(
"Producer",
89 foo = cms.InputTag(
"foo"),
90 foo2 = cms.InputTag(
"foo2",
"instance"),
91 foo3 = cms.InputTag(
"foo3",
"instance",
"PROCESS"),
92 foo4 = cms.untracked.InputTag(
"foo4"),
94 bar = cms.InputTag(
"bar"),
95 bar2 = cms.untracked.InputTag(
"bar2"),
97 nested2 = cms.untracked.PSet(
98 bar3 = cms.untracked.InputTag(
"bar3"),
100 flintstones = cms.VPSet(
101 cms.PSet(fred=cms.InputTag(
"fred")),
102 cms.PSet(wilma=cms.InputTag(
"wilma"))
104 flintstones2 = cms.VPSet(
105 cms.PSet(fred2=cms.untracked.InputTag(
"fred2")),
106 cms.PSet(wilma2=cms.InputTag(
"wilma2"))
109 refToPSet_ = cms.string(
"pset")
111 ref2 = cms.untracked.PSet(
112 refToPSet_ = cms.string(
"pset")
116 result=[
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False]
117 _hasInputTagModuleLabel(p, p.prod, [
"foo",
"foo2",
"foo3",
"bar",
"fred",
"wilma",
"a",
"foo4",
"bar2",
"bar3",
"fred2",
"wilma2",
"a2",
"joe"],result)
118 for i
in range (0,13):
119 self.assert_(result[i])
120 self.assert_(
not result[13])
def _hasInputTagModuleLabel(process, pset, moduleLabels, result)
def customiseEarlyDelete(process)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run