Geant4-11
Namespaces | Functions
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

namespace  pyParticleGun
 

Functions

 BOOST_PYTHON_MODULE (_ParticleGun)
 
G4ParticleGunpyParticleGun::Construct ()
 

Function Documentation

◆ BOOST_PYTHON_MODULE()

BOOST_PYTHON_MODULE ( _ParticleGun  )

Definition at line 66 of file pyParticleGun.cc.

66 {
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()

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