CMS 3D CMS Logo

Classes | Functions
earlyDeleteSettings_cff Namespace Reference

Classes

class  TestHasInputTagModuleLabel
 

Functions

def _hasInputTagModuleLabel (process, pset, moduleLabels, result)
 
def customiseEarlyDelete (process)
 

Function Documentation

def earlyDeleteSettings_cff._hasInputTagModuleLabel (   process,
  pset,
  moduleLabels,
  result 
)
private

Definition at line 10 of file earlyDeleteSettings_cff.py.

Referenced by customiseEarlyDelete().

10 def _hasInputTagModuleLabel(process, pset, moduleLabels,result):
11  for name in pset.parameterNames_():
12  value = getattr(pset,name)
13  if isinstance(value, cms.PSet):
14  _hasInputTagModuleLabel(process, value, moduleLabels,result)
15  elif isinstance(value, cms.VPSet):
16  for ps in value:
17  _hasInputTagModuleLabel(process, ps, moduleLabels,result)
18  elif isinstance(value, cms.VInputTag):
19  for t in value:
20  t2 = t
21  if not isinstance(t, cms.InputTag):
22  t2 = cms.InputTag(t2)
23  for i,moduleLabel in enumerate(moduleLabels):
24  if result[i]: continue #no need
25  if t2.getModuleLabel() == moduleLabel:
26  result[i]=True
27  elif isinstance(value, cms.InputTag):
28  for i,moduleLabel in enumerate(moduleLabels):
29  if result[i]: continue #no need
30  if value.getModuleLabel() == moduleLabel:
31  result[i]=True
32  elif isinstance(value, cms.string) and name == "refToPSet_":
33  _hasInputTagModuleLabel(process, getattr(process, value.value()), moduleLabels,result)
34 
35 
def _hasInputTagModuleLabel(process, pset, moduleLabels, result)
def earlyDeleteSettings_cff.customiseEarlyDelete (   process)

Definition at line 36 of file earlyDeleteSettings_cff.py.

References _hasInputTagModuleLabel(), and list().

Referenced by ConfigBuilder.ConfigBuilder.prepare().

36 def customiseEarlyDelete(process):
37  # Mapping label -> [branches]
38  # for the producers whose products are to be deleted early
39  products = collections.defaultdict(list)
40 
41  products = customiseEarlyDeleteForSeeding(process, products)
42 
43  products = customiseEarlyDeleteForCandIsoDeposits(process, products)
44 
45  # Set process.options.canDeleteEarly
46  if not hasattr(process.options, "canDeleteEarly"):
47  process.options.canDeleteEarly = cms.untracked.vstring()
48 
49  branchSet = set()
50  for branches in products.itervalues():
51  for branch in branches:
52  branchSet.add(branch)
53  process.options.canDeleteEarly.extend(list(branchSet))
54 
55  # Find the consumers
56  producers=[]
57  branchesList=[]
58  for producer, branches in products.iteritems():
59  producers.append(producer)
60  branchesList.append(branches)
61 
62  for moduleType in [process.producers_(), process.filters_(), process.analyzers_()]:
63  for name, module in moduleType.iteritems():
64  result=[]
65  for producer in producers:
66  result.append(False)
67 
68  _hasInputTagModuleLabel(process, module, producers,result)
69  for i in range(len(result)):
70  if result[i]:
71  if hasattr(module, "mightGet"):
72  module.mightGet.extend(branchesList[i])
73  else:
74  module.mightGet = cms.untracked.vstring(branchesList[i])
75  return process
76 
77 
def _hasInputTagModuleLabel(process, pset, moduleLabels, result)
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