CMS 3D CMS Logo

Classes | Functions
earlyDeleteSettings_cff Namespace Reference

Classes

class  TestHasInputTagModuleLabel
 

Functions

def _hasInputTagModuleLabel (process, pset, moduleLabel)
 
def customiseEarlyDelete (process)
 

Function Documentation

def earlyDeleteSettings_cff._hasInputTagModuleLabel (   process,
  pset,
  moduleLabel 
)
private

Definition at line 10 of file earlyDeleteSettings_cff.py.

Referenced by customiseEarlyDelete().

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

Definition at line 34 of file earlyDeleteSettings_cff.py.

References _hasInputTagModuleLabel(), and list().

Referenced by ConfigBuilder.ConfigBuilder.prepare().

34 def customiseEarlyDelete(process):
35  # Mapping label -> [branches]
36  # for the producers whose products are to be deleted early
37  products = collections.defaultdict(list)
38 
39  products = customiseEarlyDeleteForSeeding(process, products)
40 
41  products = customiseEarlyDeleteForCandIsoDeposits(process, products)
42 
43  # Set process.options.canDeleteEarly
44  if not hasattr(process.options, "canDeleteEarly"):
45  process.options.canDeleteEarly = cms.untracked.vstring()
46 
47  branchSet = set()
48  for branches in products.itervalues():
49  for branch in branches:
50  branchSet.add(branch)
51  process.options.canDeleteEarly.extend(list(branchSet))
52 
53  # Find the consumers
54  for moduleType in [process.producers_(), process.filters_(), process.analyzers_()]:
55  for name, module in moduleType.iteritems():
56  for producer, branches in products.iteritems():
57  if _hasInputTagModuleLabel(process, module, producer):
58  #print "Module %s mightGet %s" % (name, str(branches))
59  if hasattr(module, "mightGet"):
60  module.mightGet.extend(branches)
61  else:
62  module.mightGet = cms.untracked.vstring(branches)
63  return process
64 
65 
def _hasInputTagModuleLabel(process, pset, moduleLabel)
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