Geant4  10.02
pyG4Event.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: pyG4Event.cc 76884 2013-11-18 12:54:03Z gcosmo $
27 // ====================================================================
28 // pyG4Event.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4Event.hh"
34 
35 using namespace boost::python;
36 
37 // ====================================================================
38 // thin wrappers
39 // ====================================================================
40 namespace pyG4Event {
41 
43  GetPrimaryVertex, 0, 1)
44 }
45 
46 using namespace pyG4Event;
47 
48 // ====================================================================
49 // module definition
50 // ====================================================================
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
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
Definition: G4Event.hh:154
void Print() const
Definition: G4Event.cc:87
G4TrajectoryContainer * GetTrajectoryContainer() const
Definition: G4Event.hh:189
void export_G4Event()
Definition: pyG4Event.cc:51
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:92
void SetEventID(G4int i)
Definition: G4Event.hh:115
G4bool IsAborted() const
Definition: G4Event.hh:195