### selector module (aapje.py, name has to match as per above)
import ROOT
from ROOT import TPySelector

class MyPySelector( TPySelector ):
  def Begin( self ):
    print 'py: beginning'

  def SlaveBegin( self, tree ):
     print 'py: slave beginning'

  def Process( self, entry ):
     print 'py: process beginning'
     if self.fChain.GetEntry( entry ) <= 0:
        return 0
     print 'py: processing', self.fChain.jet_AntiKt4LCTopo_n
     return 1

  def SlaveTerminate( self ):
      print 'py: slave terminating'

  def Terminate( self ):
      print 'py: terminating'
 ### EOF
