3 import FWCore.ParameterSet.Config
as cms
11 if not hasattr(process, module_or_sequenceName):
12 process.load(configFile)
14 from FWCore.ParameterSet.Modules
import _Module
20 return self.nextInChain
22 return self.prevInChain
25 if isinstance(visitee, _Module):
26 self.modulesNames.append(visitee.label())
32 return self.modulesNames
35 if isinstance(object, cms.InputTag):
37 keepStatement_regex =
r"keep [a-zA-Z0-9*]+_(?P<label>[a-zA-Z0-9*]+)_[a-zA-Z0-9*]+_[a-zA-Z0-9*]+"
38 keepStatement_matcher = re.compile(keepStatement_regex)
39 isStoredInRECO =
False
40 for keepStatement
in RECOEventContent.outputCommands:
41 keepStatement_match = keepStatement_matcher.match(keepStatement)
42 if keepStatement_match:
43 label = keepStatement_match.group(
'label')
44 if label == object.getModuleLabel():
46 isInRerunParticleFlowSequence =
False
47 if hasattr(process,
"rerunParticleFlowSequenceForPFMuonCleaning"):
49 getattr(process,
"rerunParticleFlowSequenceForPFMuonCleaning").
visit(sequenceVisitor)
50 moduleNames = sequenceVisitor.getModuleNames()
51 for moduleName
in moduleNames:
52 if moduleName == object.getModuleLabel():
53 isInRerunParticleFlowSequence =
True
54 if isStoredInRECO
and not isInRerunParticleFlowSequence:
55 if object.getProcessName() != inputProcess:
57 object.setProcessName(inputProcess)
58 elif isinstance(object, cms.PSet):
59 for attrName
in dir(object):
60 attr = getattr(object, attrName)
62 elif isinstance(object, cms.VPSet):
64 for attrName
in dir(pset):
65 attr = getattr(pset, attrName)
71 loadIfNecessary(process,
"TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi",
"SteppingHelixPropagatorAny")
72 loadIfNecessary(process,
"CalibTracker.SiPixelESProducers.SiPixelTemplateDBObjectESProducer_cfi",
"siPixelTemplateDBObjectESProducer")
73 loadIfNecessary(process,
"RecoTracker.MeasurementDet.MeasurementTrackerESProducer_cfi",
"MeasurementTracker")
74 loadIfNecessary(process,
"RecoLocalCalo.EcalRecAlgos.EcalSeverityLevelESProducer_cfi",
"ecalSeverityLevel")
75 loadIfNecessary(process,
"RecoEcal.EgammaCoreTools.EcalNextToDeadChannelESProducer_cff",
"ecalNextToDeadChannelESProducer")
76 loadIfNecessary(process,
"RecoLocalCalo.HcalRecAlgos.hcalRecAlgoESProd_cfi",
"hcalRecAlgos")
78 if not hasattr(process,
"UpdaterService"):
79 process.UpdaterService = cms.Service(
"UpdaterService")
82 loadIfNecessary(process,
"RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff",
"particleFlowCluster")
83 loadIfNecessary(process,
"RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff",
"gsfEcalDrivenElectronSequence")
84 loadIfNecessary(process,
"RecoParticleFlow.Configuration.RecoParticleFlow_cff",
"particleFlowReco")
85 loadIfNecessary(process,
"RecoMuon.MuonIsolation.muonPFIsolationValues_cff",
"muonPFIsolationSequence")
88 process.rerunParticleFlowSequence = cms.Sequence(
89 process.particleFlowCluster
90 + process.particleFlowTrackWithDisplacedVertex
91 + process.gsfEcalDrivenElectronSequence
92 + process.particleFlowReco
93 + process.particleFlowLinks
98 configtools.cloneProcessingSnippet(process, process.rerunParticleFlowSequence,
"ForPFMuonCleaning")
102 process.pfTrackForPFMuonCleaning.MuColl = cms.InputTag(
'muons')
103 process.particleFlowBlockForPFMuonCleaning.RecMuons = cms.InputTag(
'muons')
104 process.particleFlowTmpForPFMuonCleaning.muons = cms.InputTag(
'muons')
105 process.particleFlowForPFMuonCleaning.FillMuonRefs =
False
109 configtools.massSearchReplaceAnyInputTag(process.rerunParticleFlowSequenceForPFMuonCleaning, cms.InputTag(
'particleFlow'), cms.InputTag(
'particleFlowTmp'))
111 return process.rerunParticleFlowSequenceForPFMuonCleaning
def visit
Retrieve data from a perf suite output (sub) directory, only examines TimeSize at the moment...