8 __doc__ =
'Library defines a class for filtering events. Allows to provide run/event numbers from a file.'
9 __author__ =
'Oldrich Kepka <oldrich.kepka@cern.ch'
11 from GaudiSequencer.PyComps
import PyEvtFilter
12 from AthenaPython.PyAthena
import StatusCode
15 """ Algorithm which loads list of runnunber/eventnumbers from file for filtering and pass it to PyEvtFilter
18 def __init__(self, name='filterFromFile', **kw):
19 super(PyEvtFilterFromFile, self).
__init__(name,**kw)
26 _error = self.msg.error
28 _info(
'==> PyEvtFilterFromFile initialize')
30 _error(
'Input_file is required.')
31 return StatusCode.Failure
36 return StatusCode.Failure
38 _info(
'==> File {} opened. Loading Runnumber/Eventnumber list'.
format(self.
input_file))
45 numbers = line.split()
50 self.msg.warning(
'Following line cannot be parsed: {}'.
format(line))
55 return StatusCode.Success