File indexing completed on 2025-01-18 10:17:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 import jana
0010 import inspect
0011
0012
0013 class MyProcessor( jana.JEventProcessor ):
0014
0015
0016 def __init__(self):
0017 super().__init__(self)
0018 super().Prefetch('Hit')
0019
0020
0021
0022 def Init( self ):
0023 print('Python Init called')
0024
0025
0026
0027 def Process( self ):
0028 hits = super().Get('Hit')
0029 for hit in hits:
0030 print('E=' + hit['E'] + ' t= ' + hit['t'] )
0031
0032
0033
0034 def Finish( self ):
0035 print('Python Finish called')
0036
0037
0038
0039 jana.SetParameterValue( 'NEVENTS', '10')
0040
0041 proc = MyProcessor()
0042 jana.AddProcessor( proc )
0043
0044 jana.AddPlugin('JTestRoot')
0045 jana.Run()
0046
0047 print('PYTHON DONE.')
0048