LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pyG4RunManager.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4RunManager.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4VUserPhysicsList.hh"
#include "G4UserRunAction.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4UserEventAction.hh"
#include "G4UserStackingAction.hh"
#include "G4UserTrackingAction.hh"
#include "G4UserSteppingAction.hh"
#include "G4Region.hh"
#include "G4Run.hh"
#include "G4Event.hh"

Go to the source code of this file.

Namespaces

 pyG4RunManager
 

Functions

 pyG4RunManager::BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (f_DefineWorldVolume, DefineWorldVolume, 1, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GeometryHasBeenModified
 
void export_G4RunManager ()
 

Variables

void(G4RunManager::* pyG4RunManager::f1_SetUserInitialization )(G4VUserDetectorConstruction *) = &G4RunManager::SetUserInitialization
 
void(G4RunManager::* pyG4RunManager::f2_SetUserInitialization )(G4VUserPhysicsList *) = &G4RunManager::SetUserInitialization
 
void(G4RunManager::* pyG4RunManager::f1_SetUserAction )(G4UserRunAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f2_SetUserAction )(G4VUserPrimaryGeneratorAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f3_SetUserAction )(G4UserEventAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f4_SetUserAction )(G4UserStackingAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f5_SetUserAction )(G4UserTrackingAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f6_SetUserAction )(G4UserSteppingAction *) = &G4RunManager::SetUserAction
 
void(G4RunManager::* pyG4RunManager::f1_DumpRegion )(const G4String &) const = &G4RunManager::DumpRegion
 
void(G4RunManager::* pyG4RunManager::f2_DumpRegion )(G4Region *) const = &G4RunManager::DumpRegion
 
 pyG4RunManager::GeometryHasBeenModified
 

Function Documentation

void export_G4RunManager ( )

Definition at line 102 of file pyG4RunManager.cc.

References pyG4RunManager::f1_DumpRegion, pyG4RunManager::f1_SetUserAction, pyG4RunManager::f1_SetUserInitialization, pyG4RunManager::f2_DumpRegion, pyG4RunManager::f2_SetUserAction, pyG4RunManager::f2_SetUserInitialization, pyG4RunManager::f3_SetUserAction, pyG4RunManager::f4_SetUserAction, pyG4RunManager::f5_SetUserAction, pyG4RunManager::f6_SetUserAction, pyG4RunManager::GeometryHasBeenModified, and Initialize().

Referenced by BOOST_PYTHON_MODULE().

103 {
104  class_<G4RunManager, boost::noncopyable>
105  ("G4RunManager", "run manager class")
106  // ---
107  .def("GetRunManager", &G4RunManager::GetRunManager,
108  "Get an instance of G4RunManager",
109  return_value_policy<reference_existing_object>())
110  .staticmethod("GetRunManager")
111  // ---
112  .def("SetVerboseLevel", &G4RunManager::SetVerboseLevel)
113  .def("GetVerboseLevel", &G4RunManager::GetVerboseLevel)
114  // ---
115  .def("Initialize", &G4RunManager::Initialize)
116  .def("BeamOn", &G4RunManager::BeamOn,
117  f_BeamOn((arg("n_event"), arg("macroFile")=0,
118  arg("n_select")=-1),
119  "Starts event loop."))
120  // ---
121  .def("SetUserInitialization", f1_SetUserInitialization)
122  .def("SetUserInitialization", f2_SetUserInitialization)
123  .def("SetUserAction", f1_SetUserAction)
124  .def("SetUserAction", f2_SetUserAction)
125  .def("SetUserAction", f3_SetUserAction)
126  .def("SetUserAction", f4_SetUserAction)
127  .def("SetUserAction", f5_SetUserAction)
128  .def("SetUserAction", f6_SetUserAction)
129  // ---
130  .def("GetUserDetectorConstruction",
131  &G4RunManager::GetUserDetectorConstruction,
132  return_internal_reference<>())
133  .def("GetUserPhysicsList",
134  &G4RunManager::GetUserPhysicsList,
135  return_internal_reference<>())
136  .def("GetUserPrimaryGeneratorAction",
137  &G4RunManager::GetUserPrimaryGeneratorAction,
138  return_internal_reference<>())
139  .def("GetUserRunAction", &G4RunManager::GetUserRunAction,
140  return_internal_reference<>())
141  .def("GetUserEventAction", &G4RunManager::GetUserEventAction,
142  return_internal_reference<>())
143  .def("GetUserStackingAction", &G4RunManager::GetUserStackingAction,
144  return_internal_reference<>())
145  .def("GetUserTrackingAction", &G4RunManager::GetUserTrackingAction,
146  return_internal_reference<>())
147  .def("GetUserSteppingAction", &G4RunManager::GetUserSteppingAction,
148  return_internal_reference<>())
149  // ---
150  .def("AbortRun", &G4RunManager::AbortRun,
151  f_AbortRun((arg("soft_abort")=false),
152  "Abort run (event loop)."))
153  .def("AbortEvent", &G4RunManager::AbortEvent)
154  .def("DefineWorldVolume", &G4RunManager::DefineWorldVolume,
155  f_DefineWorldVolume())
156  .def("DumpRegion", f1_DumpRegion)
157  .def("DumpRegion", f2_DumpRegion, f_DumpRegion())
158  .def("rndmSaveThisRun", &G4RunManager::rndmSaveThisRun)
159  .def("rndmSaveThisEvent", &G4RunManager::rndmSaveThisEvent)
160  .def("RestoreRandomNumberStatus",
161  &G4RunManager::RestoreRandomNumberStatus)
162  .def("SetRandomNumberStore", &G4RunManager::SetRandomNumberStore)
163  .def("GetRandomNumberStore", &G4RunManager::GetRandomNumberStore)
164  .def("SetRandomNumberStoreDir", &G4RunManager::SetRandomNumberStoreDir)
165  .def("GeometryHasBeenModified", &G4RunManager::GeometryHasBeenModified,
166  f_GeometryHasBeenModified())
167  .def("PhysicsHasBeenModified", &G4RunManager::PhysicsHasBeenModified)
168  .def("GetGeometryToBeOptimized",&G4RunManager::GetGeometryToBeOptimized)
169  .def("GetCurrentRun", &G4RunManager::GetCurrentRun,
170  return_value_policy<reference_existing_object>())
171  .def("GetCurrentEvent", &G4RunManager::GetCurrentEvent,
172  return_value_policy<reference_existing_object>())
173  .def("SetRunIDCounter", &G4RunManager::SetRunIDCounter)
174  .def("GetVersionString", &G4RunManager::GetVersionString,
175  return_value_policy<reference_existing_object>())
176  .def("GetRandomNumberStoreDir", &G4RunManager::GetRandomNumberStoreDir,
177  return_internal_reference<>())
178  ;
179 
180  // reduced functionality...
181  // void SetPrimaryTransformer(G4PrimaryTransformer* pt)
182  // void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
183  // void CutOffHasBeenModified()
184  // void SetGeometryToBeOptimized(G4bool vl)
185  // const G4Event* GetPreviousEvent(G4int i) const
186  // void SetNumberOfEventsToBeStored(G4int val)
187  // void SetDCtable(G4DCtable* DCtbl)
188 
189 }
void(G4RunManager::* f5_SetUserAction)(G4UserTrackingAction *)
void(G4RunManager::* f4_SetUserAction)(G4UserStackingAction *)
void Initialize()
Definition: errprop.cc:100
void(G4RunManager::* f1_SetUserAction)(G4UserRunAction *)
void(G4RunManager::* f6_SetUserAction)(G4UserSteppingAction *)
void(G4RunManager::* f2_DumpRegion)(G4Region *) const
void(G4RunManager::* f2_SetUserInitialization)(G4VUserPhysicsList *)
void(G4RunManager::* f1_DumpRegion)(const G4String &) const
void(G4RunManager::* f2_SetUserAction)(G4VUserPrimaryGeneratorAction *)
void(G4RunManager::* f1_SetUserInitialization)(G4VUserDetectorConstruction *)
void(G4RunManager::* f3_SetUserAction)(G4UserEventAction *)