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: pyG4Region.cc,v 1.5 2008/03/13 07:32:18 kmura Exp $ |
---|
27 | // $Name: geant4-09-04-beta-01 $ |
---|
28 | // ==================================================================== |
---|
29 | // pyG4Region.cc |
---|
30 | // |
---|
31 | // 2005 Q |
---|
32 | // ==================================================================== |
---|
33 | #include <boost/python.hpp> |
---|
34 | #include "G4Version.hh" |
---|
35 | #include "G4Region.hh" |
---|
36 | #include "G4LogicalVolume.hh" |
---|
37 | #include "G4ProductionCuts.hh" |
---|
38 | #include "G4VUserRegionInformation.hh" |
---|
39 | #include "G4UserLimits.hh" |
---|
40 | #include "G4MaterialCutsCouple.hh" |
---|
41 | #include "G4FastSimulationManager.hh" |
---|
42 | |
---|
43 | using namespace boost::python; |
---|
44 | |
---|
45 | // ==================================================================== |
---|
46 | // module definition |
---|
47 | // ==================================================================== |
---|
48 | void export_G4Region() |
---|
49 | { |
---|
50 | class_<G4Region, G4Region*, boost::noncopyable> |
---|
51 | ("G4Region", "region class", no_init) |
---|
52 | // constructors |
---|
53 | .def(init<const G4String&>()) |
---|
54 | // --- |
---|
55 | .def("AddRootLogicalVolume", &G4Region::AddRootLogicalVolume) |
---|
56 | .def("RemoveRootLogicalVolume", &G4Region::RemoveRootLogicalVolume) |
---|
57 | .def("SetName", &G4Region::SetName) |
---|
58 | .def("GetName", &G4Region::GetName, |
---|
59 | return_value_policy<return_by_value>()) |
---|
60 | .def("RegionModified", &G4Region::RegionModified) |
---|
61 | .def("IsModified", &G4Region::IsModified) |
---|
62 | .def("SetProductionCuts", &G4Region::SetProductionCuts) |
---|
63 | .def("GetProductionCuts", &G4Region::GetProductionCuts, |
---|
64 | return_internal_reference<>()) |
---|
65 | .def("GetNumberOfMaterials", &G4Region::GetNumberOfMaterials) |
---|
66 | .def("GetNumberOfRootVolumes", &G4Region::GetNumberOfRootVolumes) |
---|
67 | .def("UpdateMaterialList", &G4Region::UpdateMaterialList) |
---|
68 | .def("ClearMaterialList", &G4Region::ClearMaterialList) |
---|
69 | .def("ScanVolumeTree", &G4Region::ScanVolumeTree) |
---|
70 | .def("SetUserInformation", &G4Region::SetUserInformation) |
---|
71 | .def("GetUserInformation", &G4Region::GetUserInformation, |
---|
72 | return_internal_reference<>()) |
---|
73 | #if G4VERSION_NUMBER >= 710 |
---|
74 | .def("SetUserLimits", &G4Region::SetUserLimits) |
---|
75 | .def("GetUserLimits", &G4Region::GetUserLimits, |
---|
76 | return_internal_reference<>()) |
---|
77 | #endif |
---|
78 | .def("ClearMap", &G4Region::ClearMap) |
---|
79 | .def("RegisterMaterialCouplePair", &G4Region::RegisterMaterialCouplePair) |
---|
80 | .def("FindCouple", &G4Region::FindCouple, |
---|
81 | return_value_policy<reference_existing_object>()) |
---|
82 | #if G4VERSION_NUMBER >= 800 |
---|
83 | .def("SetFastSimulationManager", &G4Region::SetFastSimulationManager) |
---|
84 | .def("GetFastSimulationManager", &G4Region::GetFastSimulationManager, |
---|
85 | return_internal_reference<>()) |
---|
86 | .def("ClearFastSimulationManager", &G4Region::ClearFastSimulationManager) |
---|
87 | .def("GetWorldPhysical", &G4Region::GetWorldPhysical, |
---|
88 | return_internal_reference<>()) |
---|
89 | .def("SetWorld", &G4Region::SetWorld) |
---|
90 | .def("BelongsTo", &G4Region::BelongsTo) |
---|
91 | .def("GetParentRegion", &G4Region::GetParentRegion, |
---|
92 | return_value_policy<reference_existing_object>()) |
---|
93 | #endif |
---|
94 | ; |
---|
95 | } |
---|