LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 44 of file pymodG4intercoms.cc.

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

45 {
50 }
void export_G4UIcommandTree()
void export_G4UIcommand()
void export_G4UIparameter()
void export_G4UImanager()
void export_G4UIcommand ( )

Definition at line 62 of file pyG4UIcommand.cc.

References pyG4UIcommand::f_GetStateList(), and tca::GetRange().

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 54 of file pyG4UIcommandTree.cc.

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

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 118 of file pyG4UImanager.cc.

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

Referenced by BOOST_PYTHON_MODULE().

119 {
120  class_<G4UImanager, boost::noncopyable>
121  ("G4UImanager", "UI manager class", no_init)
122  .def("GetUIpointer", &G4UImanager::GetUIpointer,
123  return_value_policy<reference_existing_object>())
124  .staticmethod("GetUIpointer")
125  // ---
126  .def("GetCurrentValues", &G4UImanager::GetCurrentValues)
127  .def("ExecuteMacroFile", &G4UImanager::ExecuteMacroFile)
128  .def("ApplyCommand", f1_ApplyCommand)
129  .def("ApplyCommand", f2_ApplyCommand)
130  .def("CreateHTML", &G4UImanager::CreateHTML, f_CreateHTML())
131  .def("SetMacroSearchPath", &G4UImanager::SetMacroSearchPath)
132  .def("GetMacroSearchPath", &G4UImanager::GetMacroSearchPath,
133  return_value_policy<return_by_value>())
134  // ---
135  .def("SetPauseAtBeginOfEvent", &G4UImanager::SetPauseAtBeginOfEvent)
136  .def("GetPauseAtBeginOfEvent", &G4UImanager::GetPauseAtBeginOfEvent)
137  .def("SetPauseAtEndOfEvent", &G4UImanager::SetPauseAtEndOfEvent)
138  .def("GetPauseAtEndOfEvent", &G4UImanager::GetPauseAtEndOfEvent)
139  .def("SetVerboseLevel", &G4UImanager::SetVerboseLevel)
140  .def("GetVerboseLevel", &G4UImanager::GetVerboseLevel)
141  // ---
142  .def("GetTree", &G4UImanager::GetTree,
143  return_value_policy<reference_existing_object>())
144  ;
145 
146  // ---
147  def("ApplyUICommand", ApplyUICommand_1);
148  def("ApplyUICommand", ApplyUICommand_2);
149 
150 }
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 39 of file pyG4UIparameter.cc.

Referenced by BOOST_PYTHON_MODULE().

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