Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyMedicalBeam.cc File Reference
#include <boost/python.hpp>
#include "MedicalBeam.hh"
#include "G4ParticleTable.hh"
#include "G4RunManager.hh"
Include dependency graph for pyMedicalBeam.cc:

Go to the source code of this file.

Namespaces

 pyMedicalBeam
 

Functions

MedicalBeampyMedicalBeam::Construct ()
 
void pyMedicalBeam::SetParticleByName (MedicalBeam *beam, const std::string &pname)
 
std::string pyMedicalBeam::GetParticleByName (MedicalBeam *beam)
 
void pyMedicalBeam::f_SetFieldXY (MedicalBeam *beam, const list &listXY)
 
list pyMedicalBeam::f_GetFieldXY (MedicalBeam *beam)
 
 BOOST_PYTHON_MODULE (MedicalBeam)
 

Function Documentation

BOOST_PYTHON_MODULE ( MedicalBeam  )

Definition at line 114 of file pyMedicalBeam.cc.

114  {
115  class_<MedicalBeam, MedicalBeam*,
116  bases<G4VUserPrimaryGeneratorAction> >
117  ("MedicalBeam", "primary generator action with medical beam")
118  // ---
119  .add_property("particle", GetParticleByName, SetParticleByName)
120  .def("SetParticleByName", SetParticleByName)
121  .def("GetParticleByName", GetParticleByName)
122  // ---
123  .add_property("kineticE", &MedicalBeam::GetKineticE,
125  .def("SetKineticE", &MedicalBeam::SetKineticE)
126  .def("GetKineticE", &MedicalBeam::GetKineticE)
127  // ---
128  .add_property("sourcePosition", &MedicalBeam::GetSourcePosition,
130  .def("SetSourcePosition", &MedicalBeam::SetSourcePosition)
131  .def("GetSourcePosition", &MedicalBeam::GetSourcePosition)
132  // ---
133  .add_property("fieldShape", &MedicalBeam::GetFieldShape,
135  .def("SetFieldShape", &MedicalBeam::SetFieldShape)
136  .def("GetFieldShape", &MedicalBeam::GetFieldShape)
137  // ---
138  .add_property("SSD", &MedicalBeam::GetSSD, &MedicalBeam::SetSSD)
139  .def("SetSSD", &MedicalBeam::SetSSD)
140  .def("GetSSD", &MedicalBeam::GetSSD)
141  // ----
142  .add_property("fieldXY", f_GetFieldXY, f_SetFieldXY)
143  .def("SetFieldXY", f_SetFieldXY)
144  .def("GetFieldXY", f_GetFieldXY)
145  .def("GetFieldX", &MedicalBeam::GetFieldX)
146  .def("GetFieldY", &MedicalBeam::GetFieldY)
147  // ---
148  .add_property("fieldR", &MedicalBeam::GetFieldR, &MedicalBeam::SetFieldR)
149  .def("SetFieldR", &MedicalBeam::SetFieldR)
150  .def("GetFieldR", &MedicalBeam::GetFieldR)
151  ;
152 
153  // enums...
154  enum_<MedicalBeam::FieldShape>("FieldShape")
155  .value("SQUARE", MedicalBeam::SQUARE)
156  .value("CIRCLE", MedicalBeam::CIRCLE)
157  ;
158 
159  // ---
160  def("Construct", Construct,
161  return_value_policy<reference_existing_object>());
162 }
G4double GetFieldR() const
Definition: MedicalBeam.hh:140
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
std::string GetParticleByName(MedicalBeam *beam)
void SetSSD(G4double ssd)
Definition: MedicalBeam.hh:122
G4double GetKineticE() const
Definition: MedicalBeam.hh:107
list f_GetFieldXY(MedicalBeam *beam)
FieldShape GetFieldShape() const
Definition: MedicalBeam.hh:119
G4double GetFieldY() const
Definition: MedicalBeam.hh:134
void SetFieldR(G4double r)
Definition: MedicalBeam.hh:137
void SetSourcePosition(const G4ThreeVector &pos)
Definition: MedicalBeam.hh:110
void Construct()
Definition: pyExN01geom.cc:48
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4ThreeVector GetSourcePosition() const
Definition: MedicalBeam.hh:113
G4double GetSSD() const
Definition: MedicalBeam.hh:125
void SetFieldShape(FieldShape shape)
Definition: MedicalBeam.hh:116
void SetKineticE(G4double e)
Definition: MedicalBeam.hh:104
void f_SetFieldXY(MedicalBeam *beam, const list &listXY)
G4double GetFieldX() const
Definition: MedicalBeam.hh:131

Here is the call graph for this function: