LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
pyParticleGun.cc File Reference
#include <boost/python.hpp>
#include "ParticleGunAction.hh"
#include "G4ParticleGun.hh"
#include "G4RunManager.hh"

Go to the source code of this file.

Namespaces

 pyParticleGun
 

Functions

G4ParticleGun * pyParticleGun::Construct ()
 
 BOOST_PYTHON_MODULE (ParticleGun)
 

Function Documentation

BOOST_PYTHON_MODULE ( ParticleGun  )

Definition at line 67 of file pyParticleGun.cc.

References pyParticleGun::Construct(), and ParticleGunAction::GetParticleGun().

67  {
68  class_<ParticleGunAction, ParticleGunAction*,
69  bases<G4VUserPrimaryGeneratorAction> >
70  ("ParticleGunAction", "primary generator action with particle gun")
71  .def("GetParticleGun", &ParticleGunAction::GetParticleGun,
72  return_internal_reference<>())
73  ;
74 
75  // ---
76  def("Construct", Construct,
77  return_value_policy<reference_existing_object>());
78 
79 }
G4ParticleGun * GetParticleGun() const
G4ParticleGun * Construct()