31 #include <boost/python.hpp>
34 using namespace boost::python;
39 namespace pyG4ProcessManager {
47 G4int nproc= procVec-> size();
48 for(
G4int i=0; i< nproc; i++) {
49 procList.append(&(*procVec)[i]);
61 G4int nproc= procVec-> size();
62 for(
G4int i=0; i< nproc; i++) {
63 procList.append(&(*procVec)[i]);
77 G4int nproc= procVec-> size();
78 for(
G4int i=0; i< nproc; i++) {
79 procList.append(&(*procVec)[i]);
85 f_GetAtRestProcessVector, 1, 2)
93 G4int nproc= procVec-> size();
94 for(
G4int i=0; i< nproc; i++) {
95 procList.append(&(*procVec)[i]);
101 f_GetAlongStepProcessVector, 1, 2)
109 G4int nproc= procVec-> size();
110 for(
G4int i=0; i< nproc; i++) {
111 procList.append(&(*procVec)[i]);
117 f_GetPostStepProcessVector, 1, 2)
121 GetProcessVectorIndex, 2, 3)
124 GetAtRestIndex, 1, 2)
127 GetAlongStepIndex, 1, 2)
130 GetPostStepIndex, 1, 2)
134 AddRestProcess, 1, 2)
136 AddDiscreteProcess, 1, 2)
138 AddContinuousProcess, 1, 2)
141 SetProcessOrdering, 2, 3)
165 using namespace pyG4ProcessManager;
172 class_<G4ProcessManager, G4ProcessManager*, boost::noncopyable>
173 (
"G4ProcessManager",
"process manager class", no_init)
179 g_GetProcessVector())
180 .def(
"GetAtRestProcessVector", f_GetAtRestProcessVector,
181 g_GetAtRestProcessVector())
182 .def(
"GetAlongStepProcessVector", f_GetAlongStepProcessVector,
183 g_GetAlongStepProcessVector())
184 .def(
"GetPostStepProcessVector", f_GetPostStepProcessVector,
185 g_GetPostStepProcessVector())
186 .def(
"GetProcessVectorIndex",
188 f_GetProcessVectorIndex())
192 f_GetAlongStepIndex())
194 f_GetPostStepIndex())
201 f_AddDiscreteProcess())
203 f_AddContinuousProcess())
207 f_SetProcessOrdering())
208 .def(
"SetProcessOrderingToFirst",
210 .def(
"SetProcessOrderingToLast",
213 .def(
"RemoveProcess", f1_RemoveProcess,
214 return_value_policy<reference_existing_object>())
216 return_value_policy<reference_existing_object>())
219 return_value_policy<reference_existing_object>())
221 return_value_policy<reference_existing_object>())
226 return_internal_reference<>())
234 enum_<G4ProcessVectorTypeIndex>(
"G4ProcessVectorTypeIndex")
235 .
value(
"typeGPIL", typeGPIL)
239 enum_<G4ProcessVectorDoItIndex>(
"G4ProcessVectorDoItIndex")
246 enum_<G4ProcessVectorOrdering>(
"G4ProcessVectorOrdering")