33 #include <boost/python.hpp>
37 using namespace boost::python;
42 namespace pyG4Element {
48 const G4double* aVec= element-> GetRelativeAbundanceVector();
49 G4int niso= element-> GetNumberOfIsotopes();
50 for(
G4int i=0; i<niso; i++) {
51 aList.append(aVec[i]);
64 using namespace pyG4Element;
71 class_<G4Element, G4Element*, boost::noncopyable>
72 (
"G4Element",
"element class", no_init)
74 .def(init<const G4String&, const G4String&, G4double, G4double>())
75 .def(init<const G4String&, const G4String&, G4int>())
78 #if G4VERSION_NUMBER >= 920
80 return_value_policy<reference_existing_object>())
82 return_value_policy<reference_existing_object>())
96 return_internal_reference<>())
99 return_value_policy<reference_existing_object>())
101 return_value_policy<reference_existing_object>())
102 .staticmethod(
"GetElementTable")
104 .staticmethod(
"GetNumberOfElements")
107 return_value_policy<reference_existing_object>())
108 .staticmethod(
"GetElement")
112 #if G4VERSION_NUMBER >= 710
118 return_internal_reference<>())