33 #include <boost/python.hpp>
36 using namespace boost::python;
41 namespace pyG4ProcessManager {
49 G4int nproc= procVec-> size();
50 for(
G4int i=0; i< nproc; i++) {
51 procList.append(&(*procVec)[i]);
63 G4int nproc= procVec-> size();
64 for(
G4int i=0; i< nproc; i++) {
65 procList.append(&(*procVec)[i]);
79 G4int nproc= procVec-> size();
80 for(
G4int i=0; i< nproc; i++) {
81 procList.append(&(*procVec)[i]);
95 G4int nproc= procVec-> size();
96 for(
G4int i=0; i< nproc; i++) {
97 procList.append(&(*procVec)[i]);
111 G4int nproc= procVec-> size();
112 for(
G4int i=0; i< nproc; i++) {
113 procList.append(&(*procVec)[i]);
124 GetProcessVectorIndex, 2, 3);
127 GetAtRestIndex, 1, 2);
130 GetAlongStepIndex, 1, 2);
133 GetPostStepIndex, 1, 2);
137 AddRestProcess, 1, 2);
139 AddDiscreteProcess, 1, 2);
141 AddContinuousProcess, 1, 2);
144 SetProcessOrdering, 2, 3);
168 using namespace pyG4ProcessManager;
175 class_<G4ProcessManager, G4ProcessManager*, boost::noncopyable>
176 (
"G4ProcessManager",
"process manager class", no_init)
182 g_GetProcessVector())
184 g_GetAtRestProcessVector())
186 g_GetAlongStepProcessVector())
188 g_GetPostStepProcessVector())
189 .def(
"GetProcessVectorIndex",
191 f_GetProcessVectorIndex())
195 f_GetAlongStepIndex())
197 f_GetPostStepIndex())
204 f_AddDiscreteProcess())
206 f_AddContinuousProcess())
210 f_SetProcessOrdering())
211 .def(
"SetProcessOrderingToFirst",
213 .def(
"SetProcessOrderingToLast",
217 return_value_policy<reference_existing_object>())
219 return_value_policy<reference_existing_object>())
222 return_value_policy<reference_existing_object>())
224 return_value_policy<reference_existing_object>())
229 return_internal_reference<>())
237 enum_<G4ProcessVectorTypeIndex>(
"G4ProcessVectorTypeIndex")
242 enum_<G4ProcessVectorDoItIndex>(
"G4ProcessVectorDoItIndex")
249 enum_<G4ProcessVectorOrdering>(
"G4ProcessVectorOrdering")