41 #include <boost/python.hpp>
42 #include <boost/python/list.hpp>
47 using namespace boost::python;
54 boost::python::list *
particleList =
new boost::python::list();
70 boost::python::list *materialTableList =
new boost::python::list();
75 std::vector<G4Material*>::iterator itVectorData;
76 for(itVectorData = materialList.begin(); itVectorData != materialList.end(); itVectorData++) {
77 materialTableList->append ( (std::string)(*(itVectorData))->GetName()) ;
80 return *materialTableList;
95 bases<G4VUserDetectorConstruction> >
96 (
"DetectorConstruction",
"testEm0 detector")
101 bases<G4VUserPrimaryGeneratorAction> >
102 (
"PrimaryGeneratorAction", init<DetectorConstruction*>())
106 bases<G4UserRunAction> >
107 (
"RunAction", init<DetectorConstruction*, PrimaryGeneratorAction*>())
111 bases<G4VUserPhysicsList> >
112 (
"PhysicsList",
"testEm0 physics list")
const G4String & GetParticleName(G4int index) const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
boost::python::list getParticleTable()
boost::python::list getMaterialTable()
BOOST_PYTHON_MODULE(TestEm0)
static G4ParticleTable * GetParticleTable()
void SetMaterial(G4String)