LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 66 of file pyParticleGun.cc.

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

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