31 #include <boost/python.hpp> 32 #include "G4ProcessManager.hh" 46 G4ProcessVector* procVec= procMgr-> GetProcessList();
47 G4int nproc= procVec->
size();
48 for(G4int i=0; i< nproc; i++) {
49 procList.append(&(*procVec)[i]);
56 G4ProcessVectorDoItIndex idx,
57 G4ProcessVectorTypeIndex
typ= typeGPIL )
60 G4ProcessVector* procVec= procMgr-> GetProcessVector(idx,
typ);
61 G4int nproc= procVec->
size();
62 for(G4int i=0; i< nproc; i++) {
63 procList.append(&(*procVec)[i]);
72 list f_GetAtRestProcessVector(
const G4ProcessManager* procMgr,
73 G4ProcessVectorTypeIndex
typ= typeGPIL )
76 G4ProcessVector* procVec= procMgr-> GetAtRestProcessVector(
typ);
77 G4int nproc= procVec->
size();
78 for(G4int i=0; i< nproc; i++) {
79 procList.append(&(*procVec)[i]);
85 f_GetAtRestProcessVector, 1, 2)
88 list f_GetAlongStepProcessVector(
const G4ProcessManager* procMgr,
89 G4ProcessVectorTypeIndex
typ= typeGPIL )
92 G4ProcessVector* procVec= procMgr-> GetAlongStepProcessVector(
typ);
93 G4int nproc= procVec->
size();
94 for(G4int i=0; i< nproc; i++) {
95 procList.append(&(*procVec)[i]);
101 f_GetAlongStepProcessVector, 1, 2)
104 list f_GetPostStepProcessVector(
const G4ProcessManager* procMgr,
105 G4ProcessVectorTypeIndex
typ= typeGPIL )
108 G4ProcessVector* procVec= procMgr-> GetPostStepProcessVector(
typ);
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)
144 G4VProcess*(G4ProcessManager::*f1_RemoveProcess)(G4VProcess*)
145 = &G4ProcessManager::RemoveProcess;
148 = &G4ProcessManager::RemoveProcess;
152 = &G4ProcessManager::SetProcessActivation;
155 = &G4ProcessManager::SetProcessActivation;
158 = &G4ProcessManager::GetProcessActivation;
161 = &G4ProcessManager::GetProcessActivation;
172 class_<G4ProcessManager, G4ProcessManager*, boost::noncopyable>
173 (
"G4ProcessManager",
"process manager class", no_init)
176 .def(
"GetProcessListLength", &G4ProcessManager::GetProcessListLength)
177 .def(
"GetProcessIndex", &G4ProcessManager::GetProcessIndex)
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",
187 &G4ProcessManager::GetProcessVectorIndex,
188 f_GetProcessVectorIndex())
189 .def(
"GetAtRestIndex", &G4ProcessManager::GetAtRestIndex,
191 .def(
"GetAlongStepIndex", &G4ProcessManager::GetAlongStepIndex,
192 f_GetAlongStepIndex())
193 .def(
"GetPostStepIndex", &G4ProcessManager::GetPostStepIndex,
194 f_GetPostStepIndex())
196 .def(
"AddProcess", &G4ProcessManager::AddProcess,
198 .def(
"AddRestProcess", &G4ProcessManager::AddRestProcess,
200 .def(
"AddDiscreteProcess", &G4ProcessManager::AddDiscreteProcess,
201 f_AddDiscreteProcess())
202 .def(
"AddContinuousProcess", &G4ProcessManager::AddContinuousProcess,
203 f_AddContinuousProcess())
205 .def(
"GetProcessOrdering", &G4ProcessManager::GetProcessOrdering)
206 .def(
"SetProcessOrdering", &G4ProcessManager::SetProcessOrdering,
207 f_SetProcessOrdering())
208 .def(
"SetProcessOrderingToFirst",
209 &G4ProcessManager::SetProcessOrderingToFirst)
210 .def(
"SetProcessOrderingToLast",
211 &G4ProcessManager::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>())
225 .def(
"GetParticleType", &G4ProcessManager::GetParticleType,
226 return_internal_reference<>())
227 .def(
"SetParticleType", &G4ProcessManager::SetParticleType)
228 .def(
"DumpInfo", &G4ProcessManager::DumpInfo)
229 .def(
"SetVerboseLevel", &G4ProcessManager::SetVerboseLevel)
230 .def(
"GetVerboseLevel", &G4ProcessManager::GetVerboseLevel)
234 enum_<G4ProcessVectorTypeIndex>(
"G4ProcessVectorTypeIndex")
235 .
value(
"typeGPIL", typeGPIL)
236 .value(
"typeGPIL", typeDoIt)
239 enum_<G4ProcessVectorDoItIndex>(
"G4ProcessVectorDoItIndex")
240 .
value(
"idxAll", idxAll)
241 .value(
"idxAtRest", idxAtRest)
242 .value(
"idxAlongStep", idxAlongStep)
243 .value(
"idxPostStep", idxPostStep)
246 enum_<G4ProcessVectorOrdering>(
"G4ProcessVectorOrdering")
247 .
value(
"ordInActive", ordInActive)
248 .value(
"ordDefault", ordDefault)
249 .value(
"ordLast", ordLast)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
G4VProcess *(G4ProcessManager::* f2_RemoveProcess)(G4int)
list f_GetProcessList(const G4ProcessManager *procMgr)
BOOST_PYTHON_FUNCTION_OVERLOADS(f_func2, func2, 1, 2)
G4ProcessVectorTypeIndex typ
G4bool(G4ProcessManager::* f2_GetProcessActivation)(G4int) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
G4bool(G4ProcessManager::* f1_GetProcessActivation)(G4VProcess *) const
list f_GetProcessVector(const G4ProcessManager *procMgr, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL)
void export_G4ProcessManager()
G4VProcess *(G4ProcessManager::* f2_SetProcessActivation)(G4int, G4bool)
G4VProcess *(G4ProcessManager::* f1_SetProcessActivation)(G4VProcess *, G4bool)