1 import libFWCorePythonFramework
as _pf
2 import libFWCorePythonParameterSet
as _pp
6 """Uses a cms.Process to setup an edm::EventProcessor 8 procDesc = _pp.ProcessDesc()
9 process.fillProcessDesc(procDesc.pset())
12 """Process all the events 14 self._cppProcessor.run()
17 return self._cppProcessor.totalEvents()
19 return self._cppProcessor.totalEventsPassed()
21 return self._cppProcessor.totalEventsFailed()
23 if __name__ ==
"__main__":
28 import FWCore.ParameterSet.Config
as cms
29 process = cms.Process(
"Test")
30 process.source = cms.Source(
"EmptySource")
32 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(nEvents))
33 process.scale = cms.EDFilter(
"Prescaler",prescaleFactor = cms.int32(1), prescaleOffset = cms.int32(0))
34 process.p = cms.Path(process.scale)
35 filterResults = ((10,0),(5,5),(3,7))
37 process.scale.prescaleFactor = x
40 self.assertEqual(e.totalEvents(),nEvents)
41 self.assertEqual(e.totalEventsPassed(),filterResults[x-1][0])
42 self.assertEqual(e.totalEventsFailed(),filterResults[x-1][1])
def totalEventsPassed(self)
def __init__(self, process)
def totalEventsFailed(self)