PyHepMC
=======

PyHepMC (or, more simply, pyhepmc) is a Python interface to HepMC event record
objects, built via the SWIG system (www.swig.org). It allows you to create and
inspect HepMC GenEvent, GenParticle, and GenVertex objects in proper OO fashion
from Python, which is much more convenient than C++ for many purposes. You can
also read and write these objects in slightly nicer-than-usual fashion via
enhanced wrapping of the IO_GenEvent class.


PREREQUISITES

* Python and C++ compiler

Obviously... but less obviously you need the Python headers, possibly available
as a system package called python-dev.

* HepMC

Also obviously, and also you need the headers. Latest versions (2.04 onwards)
are recommended but shouldn't be essential.

* SWIG

The Simple Wrapper and Interface Generator - this is used to generate the
Python-C++ boilerplate interface code.


BUILDING & INSTALLING

A variant on the usual Python setup script, where you need to specify the path
to HepMC as an environment variable (in lieu of me working out how to add
argument parsing to the setup.py command line), e.g.

HEPMCPATH=/path/to/hepmc/installation python setup.py install --prefix=/install/to/here


USAGE

    $ python
    >>> import hepmc
    >>> io = hepmc.IO_GenEvent("LEP10.hepmc")
    >>> e = io.get_next_event()

TODO: object ownership. How to tell SWIG/pyhepmc that an object's memory is to be handled manually.
