from __future__ import absolute_import from __future__ import division from __future__ import print_function class Processor(object): ''' Base class for processors providing default, empty implementations of both required methods. ''' OK = 0 FAIL = 1 ABORT = 2 def dsevent(self, run, ds): ''' Called for every event produced by the event loop. Default implementation calls event() method for every trigger. Override with your own implementation of ``dsevent()`` if you want to run code for every physics event, or override ``event()`` to run code for every trigger, but not both. ''' def finish(self): ''' Called at end of job. '''