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

Go to the source code of this file.

Functions

void export_G4EventManager ()
 
void export_G4StackManager ()
 
void export_G4Event ()
 
void export_G4UserEventAction ()
 
void export_G4UserStackingAction ()
 
void export_G4ClassificationOfNewTrack ()
 
void export_G4ParticleGun ()
 
 BOOST_PYTHON_MODULE (G4event)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4event  )

Definition at line 47 of file pymodG4event.cc.

48 {
56 }
void export_G4Event()
Definition: pyG4Event.cc:51
void export_G4ClassificationOfNewTrack()
void export_G4UserEventAction()
void export_G4EventManager()
void export_G4ParticleGun()
void export_G4StackManager()
void export_G4UserStackingAction()

Here is the call graph for this function:

void export_G4ClassificationOfNewTrack ( )

Definition at line 40 of file pyG4ClassificationOfNewTrack.cc.

41 {
42  enum_<G4ClassificationOfNewTrack>("G4ClassificationOfNewTrack")
43  .value("fUrgent", fUrgent)
44  .value("fWaiting", fWaiting)
45  .value("fPostpone", fPostpone)
46  .value("fKill", fKill)
47  .value("fWaiting_1", fWaiting_1)
48  .value("fWaiting_2", fWaiting_2)
49  .value("fWaiting_3", fWaiting_3)
50  .value("fWaiting_4", fWaiting_4)
51  .value("fWaiting_5", fWaiting_5)
52  .value("fWaiting_6", fWaiting_6)
53  .value("fWaiting_7", fWaiting_7)
54  .value("fWaiting_8", fWaiting_8)
55  .value("fWaiting_9", fWaiting_9)
56  .value("fWaiting_19", fWaiting_10)
57  ;
58 }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void export_G4Event ( )

Definition at line 51 of file pyG4Event.cc.

52 {
53  class_<G4Event, G4Event*, boost::noncopyable>("G4Event", "event class")
54  .def(init<G4int>())
55  // ---
56  .def("Print", &G4Event::Print)
57  .def("Draw", &G4Event::Draw)
58  .def("SetEventID", &G4Event::SetEventID)
59  .def("GetEventID", &G4Event::GetEventID)
60  .def("SetEventAborted", &G4Event::SetEventAborted)
61  .def("IsAborted", &G4Event::IsAborted)
62  // ---
63  .def("AddPrimaryVertex", &G4Event::AddPrimaryVertex)
64  .def("GetNumberOfPrimaryVertex", &G4Event::GetNumberOfPrimaryVertex)
65  .def("GetPrimaryVertex", &G4Event::GetPrimaryVertex,
66  f_GetPrimaryVertex()[return_internal_reference<>()])
67  // ---
68  .def("GetTrajectoryContainer", &G4Event::GetTrajectoryContainer,
69  return_internal_reference<>())
70  .def("SetUserInformation", &G4Event::SetUserInformation)
71  .def("GetUserInformation", &G4Event::GetUserInformation,
72  return_internal_reference<>())
73  ;
74 
75  // reduced functionality...
76  //.def("SetHCofThisEvent", &G4Event::SetHCofThisEvent)
77  //.def("GetHCofThisEvent", &G4Event::SetHCofThisEvent,
78  // return_internal_reference<>())
79  //.def("SetDCofThisEvent", &G4Event::SetHCofThisEvent)
80  //.def("GetDCofThisEvent", &G4Event::SetHCofThisEvent,
81  // return_internal_reference<>())
82 
83 }
G4VUserEventInformation * GetUserInformation() const
Definition: G4Event.hh:199
G4int GetNumberOfPrimaryVertex() const
Definition: G4Event.hh:164
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
Definition: G4Event.hh:154
void Print() const
Definition: G4Event.cc:97
G4TrajectoryContainer * GetTrajectoryContainer() const
Definition: G4Event.hh:189
G4int GetEventID() const
Definition: G4Event.hh:151
void SetUserInformation(G4VUserEventInformation *anInfo)
Definition: G4Event.hh:198
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
Definition: G4Event.hh:167
void SetEventAborted()
Definition: G4Event.hh:123
void Draw() const
Definition: G4Event.cc:102
void SetEventID(G4int i)
Definition: G4Event.hh:115
G4bool IsAborted() const
Definition: G4Event.hh:195

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4EventManager ( )

Definition at line 41 of file pyG4EventManager.cc.

42 {
43  class_<G4EventManager, boost::noncopyable>
44  ("G4EventManager", "event manager class")
45  .def("GetEventManager", &G4EventManager::GetEventManager,
46  return_value_policy<reference_existing_object>())
47  .staticmethod("GetEventManager")
48  // ---
49  .def("GetConstCurrentEvent", &G4EventManager::GetConstCurrentEvent,
50  return_internal_reference<>())
51  .def("GetNonconstCurrentEvent",
53  return_internal_reference<>())
54  .def("AbortCurrentEvent", &G4EventManager::AbortCurrentEvent)
55  .def("SetNumberOfAdditionalWaitingStacks",
57  .def("GetStackManager", &G4EventManager::GetStackManager,
58  return_value_policy<reference_existing_object>())
59  .def("GetTrackingManager", &G4EventManager::GetTrackingManager,
60  return_value_policy<reference_existing_object>())
61  .def("GetVerboseLevel", &G4EventManager::GetVerboseLevel)
62  .def("SetVerboseLevel", &G4EventManager::SetVerboseLevel)
63  .def("SetUserInformation", &G4EventManager::SetUserInformation)
64  .def("GetUserInformation", &G4EventManager::GetUserInformation,
65  return_value_policy<reference_existing_object>())
66  ;
67 
68  // Note that exposed items are limited,
69  // because this class object is mainly for internal uses.
70  // ProcessOneEvent
71  // SetUserAction
72  // GetUserXXXAction
73  // GetPrimaryTransformer
74  // SetPrimaryTransformer
75 
76 }
G4StackManager * GetStackManager() const
G4Event * GetNonconstCurrentEvent()
void SetVerboseLevel(G4int value)
G4TrackingManager * GetTrackingManager() const
void SetUserInformation(G4VUserEventInformation *anInfo)
G4int GetVerboseLevel()
static G4EventManager * GetEventManager()
void AbortCurrentEvent()
const G4Event * GetConstCurrentEvent()
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
G4VUserEventInformation * GetUserInformation()

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ParticleGun ( )

Definition at line 127 of file pyG4ParticleGun.cc.

128 {
129 #if G4VERSION_NUMBER < 910
130  class_<G4ParticleGun>
131 #else
132  class_<G4ParticleGun, boost::noncopyable>
133 #endif
134  ("G4ParticleGun", "particle gun")
135  // constructor
136  .def(init<G4int>())
137  .def(init<G4ParticleDefinition*>())
138  .def(init<G4ParticleDefinition*, G4int>())
139  // ---
140  .def("GeneratePrimaryVertex", &G4ParticleGun::GeneratePrimaryVertex)
141  .def("SetParticleDefinition", &G4ParticleGun::SetParticleDefinition)
142  .def("GetParticleDefinition", &G4ParticleGun::GetParticleDefinition,
143  return_value_policy<reference_existing_object>())
144 #if G4VERSION_NUMBER >= 910
145  .def("SetParticleMomentum", f1_SetParticleMomentum)
146  .def("SetParticleMomentum", f2_SetParticleMomentum)
147 #else
148  .def("SetParticleMomentum", &G4ParticleGun::SetParticleMomentum)
149 #endif
150  .def("SetParticleMomentumDirection",
152  .def("GetParticleMomentumDirection",
154  .def("SetParticleEnergy", &G4ParticleGun::SetParticleEnergy)
155  .def("GetParticleEnergy", &G4ParticleGun::GetParticleEnergy)
156  .def("SetParticleCharge", &G4ParticleGun::SetParticleCharge)
157  .def("GetParticleCharge", &G4ParticleGun::GetParticleCharge)
158  .def("SetParticlePolarization", &G4ParticleGun::SetParticlePolarization)
159  .def("GetParticlePolarization", &G4ParticleGun::GetParticlePolarization)
160  .def("SetNumberOfParticles", &G4ParticleGun::SetNumberOfParticles)
161  .def("GetNumberOfParticles", &G4ParticleGun::GetNumberOfParticles)
162  .def("SetParticlePosition", &G4ParticleGun::SetParticlePosition)
163  .def("GetParticlePosition", &G4ParticleGun::GetParticlePosition)
164  .def("SetParticleTime", &G4ParticleGun::SetParticleTime)
165  .def("GetParticleTime", &G4ParticleGun::GetParticleTime)
166  .def("SetParticleByName", SetParticleByName)
167  .def("GetParticleByName", GetParticleByName)
168  ;
169 }
void SetParticleMomentum(G4double aMomentum)
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
std::string GetParticleByName(MedicalBeam *beam)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4ThreeVector GetParticlePosition()
virtual void GeneratePrimaryVertex(G4Event *evt)
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParticlePolarization(G4ThreeVector aVal)
G4ThreeVector GetParticlePolarization() const
void SetParticlePosition(G4ThreeVector aPosition)
void SetParticleCharge(G4double aCharge)
G4double GetParticleCharge() const
void SetNumberOfParticles(G4int i)
G4int GetNumberOfParticles() const
void SetParticleEnergy(G4double aKineticEnergy)
G4ParticleDefinition * GetParticleDefinition() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const
void SetParticleTime(G4double aTime)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4StackManager ( )

Definition at line 55 of file pyG4StackManager.cc.

56 {
57  class_<G4StackManager, boost::noncopyable>
58  ("G4StackManager", "stack management class")
59  // ---
60  // Note that exposed items are limited, because this class object
61  // is mainly for internal uses.
62  .def("ReClassify", &G4StackManager::ReClassify)
63  .def("clear", &G4StackManager::clear)
64  .def("ClearUrgentStack", &G4StackManager::ClearUrgentStack)
65  .def("ClearWaitingStack", &G4StackManager::ClearWaitingStack,
66  f_ClearWaitingStack())
67  .def("ClearPostponeStack", &G4StackManager::ClearPostponeStack)
68  .def("GetNTotalTrack", &G4StackManager::GetNTotalTrack)
69  .def("GetNUrgentTrack", &G4StackManager::GetNUrgentTrack)
70  .def("GetNWaitingTrack", &G4StackManager::GetNWaitingTrack,
71  f_GetNWaitingTrack())
72  .def("SetVerboseLevel", &G4StackManager::SetVerboseLevel)
73  ;
74 }
G4int GetNTotalTrack() const
G4int GetNUrgentTrack() const
void SetVerboseLevel(G4int const value)
G4int GetNWaitingTrack(int i=0) const
void ClearPostponeStack()
void ClearWaitingStack(int i=0)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4UserEventAction ( )

Definition at line 65 of file pyG4UserEventAction.cc.

66 {
67  class_<CB_G4UserEventAction, CB_G4UserEventAction*, boost::noncopyable>
68  ( "G4UserEventAction", "event action class")
69 
70  .def("BeginOfEventAction", &G4UserEventAction::BeginOfEventAction,
72  .def("EndOfEventAction", &G4UserEventAction::EndOfEventAction,
74  ;
75 }
void BeginOfEventAction(const G4Event *anEvent)
virtual void EndOfEventAction(const G4Event *anEvent)
virtual void BeginOfEventAction(const G4Event *anEvent)
void EndOfEventAction(const G4Event *anEvent)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4UserStackingAction ( )

Definition at line 79 of file pyG4UserStackingAction.cc.

80 {
81  class_<CB_G4UserStackingAction, CB_G4UserStackingAction*, boost::noncopyable>
82  ("G4UserStackingAction", "stacking action class")
83  // ---
84  .def("ClassifyNewTrack", &G4UserStackingAction::ClassifyNewTrack,
85  &CB_G4UserStackingAction::ClassifyNewTrack)
86  .def("NewStage", &G4UserStackingAction::NewStage,
87  &CB_G4UserStackingAction::NewStage)
88  .def("PrepareNewEvent", &G4UserStackingAction::PrepareNewEvent,
89  &CB_G4UserStackingAction::PrepareNewEvent)
90  ;
91 }
virtual void PrepareNewEvent()
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)

Here is the call graph for this function:

Here is the caller graph for this function: