Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class my_ana_mod (object) :

    def __init__ ( self ) :
        pass

    def beginjob( self, evt, env ) :
        pass

    def event( self, evt, env ) :

        time = evt.getTime()   # get event time object
        ebeam = evt.getEBeam() # get EBeam object

        # dump objects        
        print "time: %s, charge: %g, energy=%g" % \
                (time, ebeam.fEbeamCharge, ebeam.fEbeamL3Energy)

    def endjob( self, evt) :
        pass

After you finished editing your module build everything in the release:

Code Block

scons

To run this analysis start pyana giving it module name and input files:

...

And run the job, module name is specified in config file so it is not needed on the command line:

Code Block

% scons
% pyana /reg/d/psdm/AMO/amo14110/xtc/e43-r0100-s0*
Fraction of events with energy>4400 is 16.1945%

...