Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pymodG4run.cc File Reference
#include <boost/python.hpp>
Include dependency graph for pymodG4run.cc:

Go to the source code of this file.

Functions

void export_G4RunManager ()
 
void export_G4RunManagerKernel ()
 
void export_G4Run ()
 
void export_G4UserRunAction ()
 
void export_G4VUserPrimaryGeneratorAction ()
 
void export_G4VUserDetectorConstruction ()
 
void export_G4VUserPhysicsList ()
 
void export_G4VModularPhysicsList ()
 
void export_G4VPhysicsConstructor ()
 
 BOOST_PYTHON_MODULE (G4run)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4run  )

Definition at line 50 of file pymodG4run.cc.

51 {
54  export_G4Run();
61 }
void export_G4RunManagerKernel()
void export_G4UserRunAction()
void export_G4VUserPrimaryGeneratorAction()
void export_G4VUserPhysicsList()
void export_G4VModularPhysicsList()
void export_G4VPhysicsConstructor()
void export_G4VUserDetectorConstruction()
void export_G4Run()
Definition: pyG4Run.cc:42
void export_G4RunManager()

Here is the call graph for this function:

void export_G4Run ( )

Definition at line 42 of file pyG4Run.cc.

43 {
44  class_<G4Run, G4Run*, boost::noncopyable>("G4Run", "run class")
45  // ---
46  .def("GetRunID", &G4Run::GetRunID)
47  .def("SetRunID", &G4Run::SetRunID)
48  .def("GetNumberOfEvent", &G4Run::GetNumberOfEvent)
49  .def("GetNumberOfEventToBeProcessed",
51  .def("SetNumberOfEventToBeProcessed",
53  ;
54 
55  // reduced functionality...
56  //.def("RecordEvent", &G4Run::RecordEvent) // virtual
57  //.def("GetHCtable", &G4Run::GetHCtable,
58  //return_internal_reference<>())
59  //.def("SetHCtable", &G4Run::SetHCtable)
60  //.def("GetDCtable", &G4Run::GetDCtable,
61  //return_internal_reference<>())
62  //.def("SetDCtable", &G4Run::SetDCtable)
63 
64 }
void SetNumberOfEventToBeProcessed(G4int n_ev)
Definition: G4Run.hh:97
G4int GetNumberOfEvent() const
Definition: G4Run.hh:79
G4int GetRunID() const
Definition: G4Run.hh:76
G4int GetNumberOfEventToBeProcessed() const
Definition: G4Run.hh:83
void SetRunID(G4int id)
Definition: G4Run.hh:95

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4RunManager ( )

Definition at line 103 of file pyG4RunManager.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4RunManagerKernel ( )

Definition at line 53 of file pyG4RunManagerKernel.cc.

54 {
55  class_<G4RunManagerKernel>("G4RunManagerKernel", "run manager kernel")
56  .def("GetRunManagerKernel", &G4RunManagerKernel::GetRunManagerKernel,
57  "Get an instance of G4RunManagerKernel",
58  return_value_policy<reference_existing_object>())
59  .staticmethod("GetRunManagerKernel")
60  // ---
61  //.def("DefineWorldVolume", &G4RunManagerKernel::DefineWorldVolume)
62  //.def("SetPhysics", &G4RunManagerKernel::SetPhysics)
63  //.def("InitializePhysics", &G4RunManagerKernel::InitializePhysics)
64  .def("RunInitialization", &G4RunManagerKernel::RunInitialization,
65  f_RunInitialization())
66  //.def("RunTermination", &G4RunManagerKernel::RunTermination)
67  //.def("UpdateRegion", &G4RunManagerKernel::UpdateRegion)
68  //.def("DumpRegion", &G4RunManagerKernel::DumpRegion)
69  //.def("DumpRegion", &G4RunManagerKernel::DumpRegion)
70  //.def("GeometryHasBeenModified",
71  //&G4RunManagerKernel::GeometryHasBeenModified)
72  //.def("PhysicsHasBeenModified",
73  //&G4RunManagerKernel::PhysicsHasBeenModified)
74  //.def("GetEventManager", &G4RunManagerKernel::GetEventManager,
75  //...)
76  //.def("GetStackManager", &G4RunManagerKernel::GetStackManager,
77  //...)
78  //.def("GetTrackingManager", &G4RunManagerKernel::GetTrackingManager,
79  //...)
80  //.def("SetPrimaryTransformer", &G4RunManagerKernel::SetPrimaryTransformer)
81  //.def("GetPrimaryTransformer", &G4RunManagerKernel::GetPrimaryTransformer,
82  //...)
83  //.def("GetVersionString", &G4RunManagerKernel::GetVersionString)
84  //.def("SetVerboseLevel", &G4RunManagerKernel::SetVerboseLevel)
85  //.def("SetGeometryToBeOptimized",
86  //&G4RunManagerKernel::SetGeometryToBeOptimized)
87  ;
88 }
static G4RunManagerKernel * GetRunManagerKernel()
G4bool RunInitialization(G4bool fakeRun=false)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4UserRunAction ( )

Definition at line 64 of file pyG4UserRunAction.cc.

65 {
66  class_<CB_G4UserRunAction, CB_G4UserRunAction*, boost::noncopyable>
67  ( "G4UserRunAction", "run action class")
68  // ---
69  .def("BeginOfRunAction", &G4UserRunAction::BeginOfRunAction,
71  .def("EndOfRunAction", &G4UserRunAction::EndOfRunAction,
73 
74  // reduced functionality...
75  //.def("GenerateRun", &G4UserRunAction::GenerateRun) // virtual
76  ;
77 }
void EndOfRunAction(const G4Run *aRun)
virtual void EndOfRunAction(const G4Run *aRun)
void BeginOfRunAction(const G4Run *aRun)
virtual void BeginOfRunAction(const G4Run *aRun)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VModularPhysicsList ( )

Definition at line 66 of file pyG4VModularPhysicsList.cc.

67 {
68  class_<CB_G4VModularPhysicsList, bases<G4VUserPhysicsList>,
69  boost::noncopyable>
70  ("G4VModularPhysicsList", "base class of modular physics list")
71  // ---
72  .def("SetCuts", pure_virtual(&G4VModularPhysicsList::SetCuts))
73  .def("ConstructParticle", &G4VModularPhysicsList::ConstructParticle)
74  .def("ConstructProcess", &G4VModularPhysicsList::ConstructProcess)
75  // ---
76  .def("RegisterPhysics", &G4VModularPhysicsList::RegisterPhysics)
77  .def("GetPhysics", f1_GetPhysics,
78  return_value_policy<reference_existing_object>())
79  .def("GetPhysics", f2_GetPhysics,
80  return_value_policy<reference_existing_object>())
81  ;
82 }
void RegisterPhysics(G4VPhysicsConstructor *)
const G4VPhysicsConstructor *(G4VModularPhysicsList::* f1_GetPhysics)(G4int) const
const G4VPhysicsConstructor *(G4VModularPhysicsList::* f2_GetPhysics)(const G4String &) const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VPhysicsConstructor ( )

Definition at line 72 of file pyG4VPhysicsConstructor.cc.

73 {
74  class_<CB_G4VPhysicsConstructor, boost::noncopyable>
75  ("G4VPhysicsConstructor",
76  "base class of user physics constructor")
77  // ----
78  .def(init<const G4String&>())
79  // ---
80  .def("ConstructParticle",
82  .def("ConstructProcess",
84  // ---
85  .def("SetPhysicsName", &G4VPhysicsConstructor::SetPhysicsName,
86  f_SetPhysicsName())
87  .def("GetPhysicsName", &G4VPhysicsConstructor::GetPhysicsName,
88  return_value_policy<return_by_value>())
89  .def("SetVerboseLevel", &G4VPhysicsConstructor::SetVerboseLevel)
90  .def("GetVerboseLevel", &G4VPhysicsConstructor::GetVerboseLevel)
91  ;
92 }
virtual void ConstructParticle()=0
const G4String & GetPhysicsName() const
void SetVerboseLevel(G4int value)
void SetPhysicsName(const G4String &="")
virtual void ConstructProcess()=0

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VUserDetectorConstruction ( )

Definition at line 59 of file pyG4VUserDetectorConstruction.cc.

60 {
61  class_<CB_G4VUserDetectorConstruction, CB_G4VUserDetectorConstruction*,
62  boost::noncopyable>
63  ("G4VUserDetectorConstruction",
64  "base class of user detector construction")
65 
66  .def("Construct",
68  return_value_policy<reference_existing_object>())
69  ;
70 }
virtual G4VPhysicalVolume * Construct()=0

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VUserPhysicsList ( )

Definition at line 89 of file pyG4VUserPhysicsList.cc.

90 {
91  class_<CB_G4VUserPhysicsList, CB_G4VUserPhysicsList*, boost::noncopyable>
92  ("G4VUserPhysicsList", "base class of user physics list")
93  // ---
94  .def("ConstructParticle",
96  .def("ConstructProcess",
98  .def("SetCuts",
99  pure_virtual(&G4VUserPhysicsList::SetCuts))
100  // ---
101  .def("SetDefaultCutValue", &G4VUserPhysicsList::SetDefaultCutValue)
102  .def("GetDefaultCutValue", &G4VUserPhysicsList::GetDefaultCutValue)
103  // ---
104  .def("StorePhysicsTable", &G4VUserPhysicsList::StorePhysicsTable,
105  f_StorePhysicsTable())
106  .def("IsPhysicsTableRetrieved",
108  .def("IsStoredInAscii", &G4VUserPhysicsList::IsStoredInAscii)
109  .def("GetPhysicsTableDirectory",
111  return_value_policy<return_by_value>())
112  .def("SetStoredInAscii", &G4VUserPhysicsList::SetStoredInAscii)
113  .def("ResetStoredInAscii", &G4VUserPhysicsList::ResetStoredInAscii)
114  // ---
115  .def("DumpList", &G4VUserPhysicsList::DumpList)
116 
117  .def("DumpCutValuesTable", &G4VUserPhysicsList::DumpCutValuesTable)
118  .def("DumpCutValuesTableIfRequested",
120  .def("SetCutValue", f1_SetCutValue)
121  .def("SetCutValue", f2_SetCutValue)
122  .def("SetParticleCuts", f1_SetParticleCuts, f_SetParticleCuts())
123  .def("SetParticleCuts", f2_SetParticleCuts, f_SetParticleCuts())
124  // ---
125  .def("SetVerboseLevel", &G4VUserPhysicsList::SetVerboseLevel)
126  .def("GetVerboseLevel", &G4VUserPhysicsList::GetVerboseLevel)
127  .def("SetCutsWithDefault", &G4VUserPhysicsList::SetCutsWithDefault)
128  .def("SetCutsForRegion", &G4VUserPhysicsList::SetCutsForRegion)
129  .def("GetApplyCuts", &G4VUserPhysicsList::GetApplyCuts)
130  ;
131 
132  // Note that exposed items are limited,
133  // because this class object is mainly for internal uses or obsolete.
134  // Construct
135  // BuildPhysicsTable
136  // PreparePhysicsTable
137  // SetPhysicsTableRetrieved
138  // ReSetPhysicsTableRetrieved
139  // SetApplyCuts
140  // DumpCutValues (obsolete)
141  // ResetCuts;
142 }
void SetDefaultCutValue(G4double newCutValue)
const G4String & GetPhysicsTableDirectory() const
void(G4VUserPhysicsList::* f2_SetCutValue)(G4double, const G4String &, const G4String &)
void(G4VUserPhysicsList::* f1_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
G4bool GetApplyCuts(const G4String &name) const
void SetCutsForRegion(G4double aCut, const G4String &rname)
G4int GetVerboseLevel() const
void DumpCutValuesTable(G4int flag=1)
G4double GetDefaultCutValue() const
void(G4VUserPhysicsList::* f1_SetCutValue)(G4double, const G4String &)
void SetVerboseLevel(G4int value)
G4bool IsPhysicsTableRetrieved() const
G4bool StorePhysicsTable(const G4String &directory=".")
G4bool IsStoredInAscii() const
void(G4VUserPhysicsList::* f2_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
virtual void ConstructParticle()=0
virtual void ConstructProcess()=0

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VUserPrimaryGeneratorAction ( )

Definition at line 58 of file pyG4VUserPrimaryGeneratorAction.cc.

59 {
60  class_<CB_G4VUserPrimaryGeneratorAction, CB_G4VUserPrimaryGeneratorAction*,
61  boost::noncopyable>
62  ("G4VUserPrimaryGeneratorAction",
63  "base class of user primary generator action")
64 
65  .def("GeneratePrimaries",
67  ;
68 }
virtual void GeneratePrimaries(G4Event *anEvent)=0

Here is the call graph for this function:

Here is the caller graph for this function: