Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
pyG4Element.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4Element.hh"

Go to the source code of this file.

Namespaces

 pyG4Element
 

Functions

list pyG4Element::f_GetRelativeAbundanceVector (const G4Element *element)
 
void pyG4Element::Print (G4Element &ele)
 
void export_G4Element ()
 

Function Documentation

void export_G4Element ( )

Definition at line 68 of file pyG4Element.cc.

References G4Element::AddIsotope(), pyG4Element::f_GetRelativeAbundanceVector(), G4Element::GetA(), G4Element::GetAtomicShell(), G4Element::GetElement(), G4Element::GetElementTable(), G4Element::GetfCoulomb(), G4Element::GetfRadTsai(), G4Element::GetIndex(), G4Element::GetIonisation(), G4Element::GetIsotope(), G4Element::GetIsotopeVector(), G4Element::GetN(), G4Element::GetName(), G4Element::GetNbOfAtomicShells(), G4Element::GetNumberOfElements(), G4Element::GetNumberOfIsotopes(), G4Element::GetSymbol(), G4Element::GetZ(), pyG4Element::Print(), and G4Element::SetName().

Referenced by BOOST_PYTHON_MODULE().

69 {
70  class_<G4Element, G4Element*, boost::noncopyable>
71  ("G4Element", "element class", no_init)
72  // constructors
73  .def(init<const G4String&, const G4String&, G4double, G4double>())
74  .def(init<const G4String&, const G4String&, G4int>())
75  // ---
76  .def("AddIsotope", &G4Element::AddIsotope)
77  .def("GetName", &G4Element::GetName,
78  return_value_policy<reference_existing_object>())
79  .def("GetSymbol", &G4Element::GetSymbol,
80  return_value_policy<reference_existing_object>())
81  .def("SetName", &G4Element::SetName)
82  .def("GetZ", &G4Element::GetZ)
83  .def("GetN", &G4Element::GetN)
84  .def("GetA", &G4Element::GetA)
85  .def("GetNbOfAtomicShells", &G4Element::GetNbOfAtomicShells)
86  .def("GetAtomicShell", &G4Element::GetAtomicShell)
87  .def("GetNumberOfIsotopes", &G4Element::GetNumberOfIsotopes)
88  .def("GetIsotopeVector", &G4Element::GetIsotopeVector,
89  return_internal_reference<>())
90  .def("GetRelativeAbundanceVector", f_GetRelativeAbundanceVector)
91  .def("GetIsotope", &G4Element::GetIsotope,
92  return_value_policy<reference_existing_object>())
93  .def("GetElementTable", &G4Element::GetElementTable,
94  return_value_policy<reference_existing_object>())
95  .staticmethod("GetElementTable")
96  .def("GetNumberOfElements", &G4Element::GetNumberOfElements)
97  .staticmethod("GetNumberOfElements")
98  .def("GetIndex", &G4Element::GetIndex)
99  .def("GetElement", &G4Element::GetElement,
100  return_value_policy<reference_existing_object>())
101  .staticmethod("GetElement")
102  .def("GetfCoulomb", &G4Element::GetfCoulomb)
103  .def("GetfRadTsai", &G4Element::GetfRadTsai)
104  .def("GetIonisation", &G4Element::GetIonisation,
105  return_internal_reference<>())
106  // ---
107  .def("Print", Print)
108  .def(self == self)
109  .def(self != self)
110  ;
111 
112 }
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:158
G4int GetNbOfAtomicShells() const
Definition: G4Element.hh:146
static G4Element * GetElement(G4String name, G4bool warning=true)
Definition: G4Element.cc:409
G4double GetN() const
Definition: G4Element.hh:134
const G4String & GetSymbol() const
Definition: G4Element.hh:128
G4double GetZ() const
Definition: G4Element.hh:131
G4double GetfCoulomb() const
Definition: G4Element.hh:190
list f_GetRelativeAbundanceVector(const G4Element *element)
Definition: pyG4Element.cc:44
G4double GetA() const
Definition: G4Element.hh:138
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
void AddIsotope(G4Isotope *isotope, G4double RelativeAbundance)
Definition: G4Element.cc:151
size_t GetIndex() const
Definition: G4Element.hh:181
G4IsotopeVector * GetIsotopeVector() const
Definition: G4Element.hh:162
G4double GetfRadTsai() const
Definition: G4Element.hh:194
G4IonisParamElm * GetIonisation() const
Definition: G4Element.hh:198
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:169
G4double GetAtomicShell(G4int index) const
Definition: G4Element.cc:365
const G4String & GetName() const
Definition: G4Element.hh:127
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
void SetName(const G4String &name)
Definition: G4Element.hh:216
void Print(G4Element &ele)
Definition: pyG4Element.cc:56