32 #include <boost/python.hpp> 33 #include "G4ProcessManager.hh" 47 G4ProcessVector* procVec= procMgr-> GetProcessList();
48 G4int nproc= procVec-> size();
49 for(G4int i=0; i< nproc; i++) {
50 procList.append(&(*procVec)[i]);
57 G4ProcessVectorDoItIndex idx,
58 G4ProcessVectorTypeIndex
typ= typeGPIL )
61 G4ProcessVector* procVec= procMgr-> GetProcessVector(idx,
typ);
62 G4int nproc= procVec-> size();
63 for(G4int i=0; i< nproc; i++) {
64 procList.append(&(*procVec)[i]);
73 list f_GetAtRestProcessVector(
const G4ProcessManager* procMgr,
74 G4ProcessVectorTypeIndex
typ= typeGPIL )
77 G4ProcessVector* procVec= procMgr-> GetAtRestProcessVector(
typ);
78 G4int nproc= procVec-> size();
79 for(G4int i=0; i< nproc; i++) {
80 procList.append(&(*procVec)[i]);
86 f_GetAtRestProcessVector, 1, 2)
89 list f_GetAlongStepProcessVector(
const G4ProcessManager* procMgr,
90 G4ProcessVectorTypeIndex
typ= typeGPIL )
93 G4ProcessVector* procVec= procMgr-> GetAlongStepProcessVector(
typ);
94 G4int nproc= procVec-> size();
95 for(G4int i=0; i< nproc; i++) {
96 procList.append(&(*procVec)[i]);
102 f_GetAlongStepProcessVector, 1, 2)
105 list f_GetPostStepProcessVector(
const G4ProcessManager* procMgr,
106 G4ProcessVectorTypeIndex
typ= typeGPIL )
109 G4ProcessVector* procVec= procMgr-> GetPostStepProcessVector(
typ);
110 G4int nproc= procVec-> size();
111 for(G4int i=0; i< nproc; i++) {
112 procList.append(&(*procVec)[i]);
118 f_GetPostStepProcessVector, 1, 2)
122 GetProcessVectorIndex, 2, 3)
125 GetAtRestIndex, 1, 2)
128 GetAlongStepIndex, 1, 2)
131 GetPostStepIndex, 1, 2)
135 AddRestProcess, 1, 2)
137 AddDiscreteProcess, 1, 2)
139 AddContinuousProcess, 1, 2)
142 SetProcessOrdering, 2, 3)
145 G4VProcess*(G4ProcessManager::*f1_RemoveProcess)(G4VProcess*)
146 = &G4ProcessManager::RemoveProcess;
149 = &G4ProcessManager::RemoveProcess;
153 = &G4ProcessManager::SetProcessActivation;
156 = &G4ProcessManager::SetProcessActivation;
159 = &G4ProcessManager::GetProcessActivation;
162 = &G4ProcessManager::GetProcessActivation;
173 class_<G4ProcessManager, G4ProcessManager*, boost::noncopyable>
174 (
"G4ProcessManager",
"process manager class", no_init)
177 .def(
"GetProcessListLength", &G4ProcessManager::GetProcessListLength)
178 .def(
"GetProcessIndex", &G4ProcessManager::GetProcessIndex)
180 g_GetProcessVector())
181 .def(
"GetAtRestProcessVector", f_GetAtRestProcessVector,
182 g_GetAtRestProcessVector())
183 .def(
"GetAlongStepProcessVector", f_GetAlongStepProcessVector,
184 g_GetAlongStepProcessVector())
185 .def(
"GetPostStepProcessVector", f_GetPostStepProcessVector,
186 g_GetPostStepProcessVector())
187 .def(
"GetProcessVectorIndex",
188 &G4ProcessManager::GetProcessVectorIndex,
189 f_GetProcessVectorIndex())
190 .def(
"GetAtRestIndex", &G4ProcessManager::GetAtRestIndex,
192 .def(
"GetAlongStepIndex", &G4ProcessManager::GetAlongStepIndex,
193 f_GetAlongStepIndex())
194 .def(
"GetPostStepIndex", &G4ProcessManager::GetPostStepIndex,
195 f_GetPostStepIndex())
197 .def(
"AddProcess", &G4ProcessManager::AddProcess,
199 .def(
"AddRestProcess", &G4ProcessManager::AddRestProcess,
201 .def(
"AddDiscreteProcess", &G4ProcessManager::AddDiscreteProcess,
202 f_AddDiscreteProcess())
203 .def(
"AddContinuousProcess", &G4ProcessManager::AddContinuousProcess,
204 f_AddContinuousProcess())
206 .def(
"GetProcessOrdering", &G4ProcessManager::GetProcessOrdering)
207 .def(
"SetProcessOrdering", &G4ProcessManager::SetProcessOrdering,
208 f_SetProcessOrdering())
209 .def(
"SetProcessOrderingToFirst",
210 &G4ProcessManager::SetProcessOrderingToFirst)
211 .def(
"SetProcessOrderingToLast",
212 &G4ProcessManager::SetProcessOrderingToLast)
214 .def(
"RemoveProcess", f1_RemoveProcess,
215 return_value_policy<reference_existing_object>())
217 return_value_policy<reference_existing_object>())
220 return_value_policy<reference_existing_object>())
222 return_value_policy<reference_existing_object>())
226 .def(
"GetParticleType", &G4ProcessManager::GetParticleType,
227 return_internal_reference<>())
228 .def(
"SetParticleType", &G4ProcessManager::SetParticleType)
229 .def(
"DumpInfo", &G4ProcessManager::DumpInfo)
230 .def(
"SetVerboseLevel", &G4ProcessManager::SetVerboseLevel)
231 .def(
"GetVerboseLevel", &G4ProcessManager::GetVerboseLevel)
235 enum_<G4ProcessVectorTypeIndex>(
"G4ProcessVectorTypeIndex")
236 .
value(
"typeGPIL", typeGPIL)
237 .value(
"typeGPIL", typeDoIt)
240 enum_<G4ProcessVectorDoItIndex>(
"G4ProcessVectorDoItIndex")
241 .
value(
"idxAll", idxAll)
242 .value(
"idxAtRest", idxAtRest)
243 .value(
"idxAlongStep", idxAlongStep)
244 .value(
"idxPostStep", idxPostStep)
247 enum_<G4ProcessVectorOrdering>(
"G4ProcessVectorOrdering")
248 .
value(
"ordInActive", ordInActive)
249 .value(
"ordDefault", ordDefault)
250 .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
G4bool(G4ProcessManager::* f1_GetProcessActivation)(G4VProcess *) const
list f_GetProcessVector(const G4ProcessManager *procMgr, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL)
void export_G4ProcessManager()
std::string value(boost::any const &)
G4VProcess *(G4ProcessManager::* f2_SetProcessActivation)(G4int, G4bool)
G4VProcess *(G4ProcessManager::* f1_SetProcessActivation)(G4VProcess *, G4bool)