6 logName =
'logErrorHarvester'
7 if not hasattr(process,logName):
10 modulesFromAllOutput = set()
11 onlyOneOutput = (len(process.outputModules_()) == 1)
12 for o
in process.outputModules_().
values():
13 if not hasattr(o,
"outputCommands"):
15 modulesFromOutput = set()
17 if (
not onlyOneOutput)
and hasattr(o,
"SelectEvents")
and hasattr(o.SelectEvents,
"SelectEvents")
and o.SelectEvents.SelectEvents:
21 for ln
in o.outputCommands.value():
22 if -1 != ln.find(
"keep"):
25 if s[1].
find(
"*")==-1:
27 modulesFromOutput.add(s[1])
31 modulesFromAllOutput =modulesFromAllOutput.union(modulesFromOutput)
32 if hasattr(process.logErrorHarvester,
"includeModules"):
34 includeMods = set(process.logErrorHarvester.includeModules)
35 toExclude = includeMods.difference(modulesFromAllOutput)
36 if hasattr(process.logErrorHarvester,
"excludeModules"):
37 toExclude = toExclude.union(set(process.logErrorHarvester.excludeModules.value()))
38 process.logErrorHarvester.excludeModules = cms.untracked.vstring(sorted(toExclude))
40 process.logErrorHarvester.includeModules = cms.untracked.vstring(sorted(modulesFromAllOutput))
def customiseLogErrorHarvesterUsingOutputCommands
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)