21 return name.replace(
"_",
"IoI")
35 if -1 != line.find(
'end path'):
41 self._presentPath.append(
fixName(n) )
57 start = line.find(
"'")+1
58 length = line[start:].
find(
"'")
61 if -1 != l.find(
"Analyzer"):
64 self._presentConsumes.append(
fixName(line[line.find(
"'")+1:-2]) )
75 pathStartsWith =
"modules on " 77 startOfConsumes =
"All modules and modules in the current process whose products they consume:" 78 skipLineAfterConsumes =
False 81 endOfConsumes =
"All modules (listed by class and label) and all their consumed products." 82 for l
in f.readlines():
84 if l[:len(pathStartsWith)] == pathStartsWith:
90 if l[:len(startOfConsumes)] == startOfConsumes:
91 skipLineAfterConsumes =
True 94 parser = consumesParser
96 if skipLineAfterConsumes:
97 skipLineAfterConsumes =
False 99 if l[:len(endOfConsumes)] == endOfConsumes:
105 print "import FWCore.ParameterSet.Config as cms" 106 print "process = cms.Process('RECO')" 108 print """process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(2000)) 109 process.options = cms.untracked.PSet( 110 # numberOfThreads = cms.untracked.uint32(8), 111 numberOfThreads = cms.untracked.uint32(1), 112 numberOfStreams = cms.untracked.uint32(0), 113 # wantSummary = cms.untracked.bool(True) 116 process.add_(cms.Service("Timing", summaryOnly = cms.untracked.bool(True))) 118 # The following two lines reduce the clutter of repeated printouts 119 # of the same exception message. 120 process.load("FWCore.MessageLogger.MessageLogger_cfi") 121 process.MessageLogger.destinations = ['cerr'] 122 process.MessageLogger.statistics = [] 123 process.MessageLogger.fwkJobReports = [] 124 process.MessageLogger.cerr.FwkReport.reportEvery = 50000 125 process.MessageLogger.cerr.threshold = 'WARNING' 128 print "process.source = cms.Source('EmptySource')" 131 modulesWithConsumes = set()
133 pathNamesAsModules = set( (
fixName(n)
for n
in pathParser._pathToModules.iterkeys()) )
135 for m,c
in consumesParser._consumesForModule.iteritems():
136 if m
in pathNamesAsModules:
138 if m
in consumesParser._isAnalyzer:
139 print "process.%s = cms.EDAnalyzer('MultipleIntsAnalyzer', getFromModules = cms.untracked.VInputTag(*[%s]))"%(m,
",".
join([
"cms.InputTag('%s')"%i
for i
in (n
for n
in c
if n !=
'TriggerResults')]))
141 print "process.%s = cms.EDProducer('IntProducer', ivalue = cms.int32(1))"%m
143 print "process.%s = cms.EDProducer('AddIntsProducer', labels = cms.vstring(*[%s]))"%(m,
",".
join([
"'%s'"%i
for i
in (n
for n
in c
if n !=
'TriggerResults')]))
147 modulesWithConsumes.add(m)
149 for m
in pathParser._pathToModules.itervalues():
153 for m
in allModules.difference(modulesWithConsumes):
154 print "process.%s = cms.EDProducer('IntProducer', ivalue = cms.int32(1))"%(m)
157 print 't = cms.Task(*[%s])'%(
",".
join([
"process.%s"%i
for i
in allModules
if i
not in consumesParser._isAnalyzer]))
158 for p,m
in pathParser._pathToModules.iteritems():
159 if p
in pathParser._isEndPath:
160 print "process.%s = cms.EndPath(%s)"%(p,
"+".
join([
"process.%s"%i
for i
in m]))
163 print "process.%s = cms.Path(%s,t)"%(p,
"+".
join([
"process.%s"%i
for i
in m]))
165 print "process.%s = cms.Path()"%(p)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::string join(char **cmd)