LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
pyG4UnitsTable.cc File Reference
#include <boost/python.hpp>
#include "pyG4indexing.hh"
#include "G4UnitsTable.hh"

Go to the source code of this file.

Functions

void export_G4UnitsTable ()
 

Function Documentation

void export_G4UnitsTable ( )

Definition at line 41 of file pyG4UnitsTable.cc.

Referenced by BOOST_PYTHON_MODULE().

42 {
43  class_<G4UnitsTable>("G4UnitsTable", "Units Table")
45  ;
46 
47  class_<G4UnitsContainer>("G4UnitsContainer", "Units Container")
49  ;
50 
51  class_<G4UnitDefinition, boost::noncopyable>
52  ("G4UnitDefinition", "Unit Definition", no_init)
53  .def(init<const G4String&, const G4String&, const G4String&, G4double>())
54  // ---
55  .def("GetName", &G4UnitDefinition::GetName,
56  return_value_policy<return_by_value>())
57  .def("GetSymbol", &G4UnitDefinition::GetSymbol,
58  return_value_policy<return_by_value>())
59  .def("GetValue", &G4UnitDefinition::GetValue)
60  .def("PrintDefinition", &G4UnitDefinition::PrintDefinition)
61  // ---
62  .def("BuildUnitsTable", &G4UnitDefinition::BuildUnitsTable)
63  .staticmethod("BuildUnitsTable")
64  .def("PrintUnitsTable", &G4UnitDefinition::PrintUnitsTable)
65  .staticmethod("PrintUnitsTable")
66  .def("GetUnitsTable", &G4UnitDefinition::GetUnitsTable,
67  return_value_policy<reference_existing_object>())
68  .staticmethod("GetUnitsTable")
69  // ---
70  .def("GetValueOf", &G4UnitDefinition::GetValueOf)
71  .staticmethod("GetValueOf")
72  .def("GetCategory", &G4UnitDefinition::GetCategory)
73  .staticmethod("GetCategory")
74  ;
75 
76  class_<G4UnitsCategory, boost::noncopyable>
77  ("G4UnitsCategory", "Units Category", no_init)
78  .def(init<const G4String&>())
79  // ---
80  .def("GetName", &G4UnitsCategory::GetName,
81  return_value_policy<return_by_value>())
82  .def("GetUnitsList", &G4UnitsCategory::GetUnitsList,
83  return_value_policy<reference_existing_object>())
84  .def("GetNameMxLen", &G4UnitsCategory::GetNameMxLen)
85  .def("GetSymbMxLen", &G4UnitsCategory::GetSymbMxLen)
86  .def("UpdateNameMxLen", &G4UnitsCategory::UpdateNameMxLen)
87  .def("UpdateSymbMxLen", &G4UnitsCategory::UpdateSymbMxLen)
88  .def("PrintCategory", &G4UnitsCategory::PrintCategory)
89  ;
90 
91  class_<G4BestUnit>("G4BestUnit", "present best unit", no_init)
92  .def(init<G4double, const G4String&>())
93  .def(init<const G4ThreeVector&, const G4String&>())
94  // ---
95  .def("GetCategory", &G4BestUnit::GetCategory,
96  return_value_policy<return_by_value>())
97  .def("GetIndexOfCategory", &G4BestUnit::GetIndexOfCategory)
98  .def(self_ns::str(self))
99  ;
100 
101 }