LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
pymodG4intercoms.cc File Reference
#include <boost/python.hpp>

Go to the source code of this file.

Functions

void export_G4UImanager ()
 
void export_G4UIcommandTree ()
 
void export_G4UIcommand ()
 
void export_G4UIparameter ()
 
 BOOST_PYTHON_MODULE (G4intercoms)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4intercoms  )

Definition at line 45 of file pymodG4intercoms.cc.

References export_G4UIcommand(), export_G4UIcommandTree(), export_G4UImanager(), and export_G4UIparameter().

46 {
51 }
void export_G4UIcommandTree()
void export_G4UIcommand()
void export_G4UIparameter()
void export_G4UImanager()
void export_G4UIcommand ( )

Definition at line 63 of file pyG4UIcommand.cc.

References pyG4UIcommand::f_GetStateList().

Referenced by BOOST_PYTHON_MODULE().

64 {
65  class_<G4UIcommand, G4UIcommand*>
66  ("G4UIcommand", "UI command")
67  .def(init<const char*, G4UImessenger*>())
68  // ---
69  .def("GetCurrentValue", &G4UIcommand::GetCurrentValue)
70  .def("IsAvailable", &G4UIcommand::IsAvailable)
71  .def("List", &G4UIcommand::List)
72  .def("GetRange", &G4UIcommand::GetRange,
73  return_value_policy<return_by_value>())
74  .def("GetGuidanceEntries", &G4UIcommand::GetGuidanceEntries)
75  .def("GetGuidanceLine", &G4UIcommand::GetGuidanceLine,
76  return_value_policy<return_by_value>())
77  .def("GetCommandPath", &G4UIcommand::GetCommandPath,
78  return_value_policy<return_by_value>())
79  .def("GetCommandName", &G4UIcommand::GetCommandName,
80  return_value_policy<return_by_value>())
81  .def("GetParameterEntries", &G4UIcommand::GetParameterEntries)
82  .def("GetParameter", &G4UIcommand::GetParameter,
83  return_value_policy<reference_existing_object>())
84  .def("GetStateList", f_GetStateList)
85  .def("GetTitle", &G4UIcommand::GetTitle)
86  ;
87 }
list f_GetStateList(G4UIcommand *acommand)
void export_G4UIcommandTree ( )

Definition at line 55 of file pyG4UIcommandTree.cc.

References pyG4UIcommandTree::f1_GetTree, and pyG4UIcommandTree::f2_GetTree.

Referenced by BOOST_PYTHON_MODULE().

56 {
57  class_<G4UIcommandTree, G4UIcommandTree*>
58  ("G4UIcommandTree", "UI command tree")
59  // constructors
60  .def(init<const char*>())
61  // ---
62  .def("FindPath", &G4UIcommandTree::FindPath,
63  return_value_policy<reference_existing_object>())
64  .def("List", &G4UIcommandTree::List)
65  .def("ListCurrent", &G4UIcommandTree::ListCurrent)
66  .def("ListCurrentWithNum", &G4UIcommandTree::ListCurrentWithNum)
67  .def("CreateHTML", &G4UIcommandTree::CreateHTML)
68  .def("GetGuidance", &G4UIcommandTree::GetGuidance,
69  return_value_policy<reference_existing_object>())
70  .def("GetPathName", &G4UIcommandTree::GetPathName)
71  // ---
72  .def("GetTreeEntry", &G4UIcommandTree::GetTreeEntry)
73  .def("GetCommandEntry", &G4UIcommandTree::GetCommandEntry)
74  .def("GetTree", f1_GetTree,
75  return_value_policy<reference_existing_object>())
76  .def("GetTree", f2_GetTree,
77  return_value_policy<reference_existing_object>())
78  .def("GetCommand", &G4UIcommandTree::GetCommand,
79  return_value_policy<reference_existing_object>())
80  // ---
81  .def("GetTitle", &G4UIcommandTree::GetTitle)
82  ;
83 }
G4UIcommandTree *(G4UIcommandTree::* f2_GetTree)(const char *)
G4UIcommandTree *(G4UIcommandTree::* f1_GetTree)(G4int)
void export_G4UImanager ( )

Definition at line 119 of file pyG4UImanager.cc.

References pyG4UImanager::ApplyUICommand_1(), pyG4UImanager::ApplyUICommand_2(), pyG4UImanager::f1_ApplyCommand, and pyG4UImanager::f2_ApplyCommand.

Referenced by BOOST_PYTHON_MODULE().

120 {
121  class_<G4UImanager, boost::noncopyable>
122  ("G4UImanager", "UI manager class", no_init)
123  .def("GetUIpointer", &G4UImanager::GetUIpointer,
124  return_value_policy<reference_existing_object>())
125  .staticmethod("GetUIpointer")
126  // ---
127  .def("GetCurrentValues", &G4UImanager::GetCurrentValues)
128  .def("ExecuteMacroFile", &G4UImanager::ExecuteMacroFile)
129  .def("ApplyCommand", f1_ApplyCommand)
130  .def("ApplyCommand", f2_ApplyCommand)
131  .def("CreateHTML", &G4UImanager::CreateHTML, f_CreateHTML())
132  .def("SetMacroSearchPath", &G4UImanager::SetMacroSearchPath)
133  .def("GetMacroSearchPath", &G4UImanager::GetMacroSearchPath,
134  return_value_policy<return_by_value>())
135  // ---
136  .def("SetPauseAtBeginOfEvent", &G4UImanager::SetPauseAtBeginOfEvent)
137  .def("GetPauseAtBeginOfEvent", &G4UImanager::GetPauseAtBeginOfEvent)
138  .def("SetPauseAtEndOfEvent", &G4UImanager::SetPauseAtEndOfEvent)
139  .def("GetPauseAtEndOfEvent", &G4UImanager::GetPauseAtEndOfEvent)
140  .def("SetVerboseLevel", &G4UImanager::SetVerboseLevel)
141  .def("GetVerboseLevel", &G4UImanager::GetVerboseLevel)
142  // ---
143  .def("GetTree", &G4UImanager::GetTree,
144  return_value_policy<reference_existing_object>())
145  ;
146 
147  // ---
148  def("ApplyUICommand", ApplyUICommand_1);
149  def("ApplyUICommand", ApplyUICommand_2);
150 
151 }
G4int ApplyUICommand_1(const G4String &cmdstr)
G4int ApplyUICommand_2(const std::string &cmdstr)
G4int(G4UImanager::* f2_ApplyCommand)(const G4String &)
G4int(G4UImanager::* f1_ApplyCommand)(const char *)
void export_G4UIparameter ( )

Definition at line 40 of file pyG4UIparameter.cc.

Referenced by BOOST_PYTHON_MODULE().

41 {
42  class_<G4UIparameter, G4UIparameter*>
43  ("G4UIparameter", "UI parameter")
44  // constructors
45  .def(init<char>())
46  .def(init<const char*, char, G4bool>())
47  // ---
48  .def("List", &G4UIparameter::List)
49  .def("GetDefaultValue", &G4UIparameter::GetDefaultValue)
50  .def("GetParameterType", &G4UIparameter::GetParameterType)
51  .def("GetParameterRange", &G4UIparameter::GetParameterRange)
52  .def("GetParameterName", &G4UIparameter::GetParameterName)
53  .def("GetParameterCandidates", &G4UIparameter::GetParameterCandidates)
54  .def("IsOmittable", &G4UIparameter::IsOmittable)
55  .def("GetCurrentAsDefault", &G4UIparameter::GetCurrentAsDefault)
56  .def("GetParameterGuidance", &G4UIparameter::GetParameterGuidance)
57  ;
58 }