diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index fbe77a2862873..3b932614b39cb 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -2203,6 +2203,14 @@ def prepare(self, doChecking = False): self.process.load(module) self.pythonCfgCode += ("process.load('"+module+"')\n") + #and clean the unscheduled stuff + self.pythonCfgCode+="from FWCore.ParameterSet.Utilities import cleanUnscheduled\n" + self.pythonCfgCode+="process=cleanUnscheduled(process)\n" + + from FWCore.ParameterSet.Utilities import cleanUnscheduled + self.process=cleanUnscheduled(self.process) + + self.pythonCfgCode += self.addCustomise(1) diff --git a/FWCore/ParameterSet/python/Utilities.py b/FWCore/ParameterSet/python/Utilities.py index 29770446754f4..ccceb38116c07 100644 --- a/FWCore/ParameterSet/python/Utilities.py +++ b/FWCore/ParameterSet/python/Utilities.py @@ -101,6 +101,11 @@ def convertToUnscheduled(proc): proc.options = cms.untracked.PSet() proc.options.allowUnscheduled = cms.untracked.bool(True) + proc=cleanUnscheduled(proc) + return proc + +def cleanUnscheduled(proc): + import FWCore.ParameterSet.Config as cms l = proc.paths droppedPaths =[] #have to get them now since switching them after the @@ -218,7 +223,7 @@ def getQualifiedModule(name,proc): # If there is a schedule then it needs to point at # the new Path objects if proc.schedule: - proc.schedule = cms.Schedule([getattr(proc,p) for p in pathNamesInScheduled]) + proc._Process__schedule = None return proc if __name__ == "__main__": @@ -362,6 +367,7 @@ def testWithSchedule(self): self.assertEqual(process.p2.dumpPython(None),'cms.Path()\n') self.assertEqual(process.p3.dumpPython(None),'cms.Path(process.f1)\n') self.assertEqual(process.p4.dumpPython(None),'cms.Path(process.f2+process.f1)\n') - self.assertEqual([p for p in process.schedule],[process.p1,process.p4,process.p2,process.p3]) +# there is no longer a schedule. +# self.assertEqual([p for p in process.schedule],[process.p1,process.p4,process.p2,process.p3]) unittest.main() diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index 0e70889bf41df..b5c0c425e6e01 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -270,7 +270,6 @@ def miniAOD_customizeCommon(process): del process.slimmedMETsPuppi.caloMET - def miniAOD_customizeMC(process): process.muonMatch.matched = "prunedGenParticles" process.electronMatch.matched = "prunedGenParticles"