![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Generic implementation to export properties and actions to the Geant4 command prompt. More...
#include <DDG4/Geant4UIMessenger.h>
Public Types | |
| typedef std::map< G4UIcommand *, std::string > | Commands |
| typedef std::map< G4UIcommand *, Callback > | Actions |
Public Member Functions | |
| Geant4UIMessenger (const std::string &name, const std::string &path) | |
| Initializing constructor. More... | |
| virtual | ~Geant4UIMessenger () |
| Default destructor. More... | |
| void | addCall (const std::string &name, const std::string &description, const Callback &cb, size_t npar=0) |
| Add a new callback structure. More... | |
| template<typename Q , typename R , typename T > | |
| void | addCall (const std::string &name, const std::string &description, Q *p, R(T::*f)()) |
| Add any callback without parameters to the messenger. More... | |
| template<typename Q , typename R , typename T , typename A1 > | |
| void | addCall (const std::string &name, const std::string &description, Q *p, R(T::*f)(A1)) |
| Add any callback with ONE parameter to the messenger. More... | |
| void | exportProperties (PropertyManager &mgr) |
| Export all properties to the Geant4 UI. More... | |
| void | SetNewValue (G4UIcommand *c, G4String val) override |
| Accept ne property value from Geant4 UI. More... | |
| G4String | GetCurrentValue (G4UIcommand *c) override |
| Pass current property value to Geant4 UI. More... | |
Protected Attributes | |
| G4UIdirectory * | m_directory |
| The UI directory of this component. More... | |
| PropertyManager * | m_properties |
| Reference to the property manager corresponding to the component. More... | |
| std::string | m_name |
| Component name. More... | |
| std::string | m_path |
| Path in the UI hierarchy of this component. More... | |
| Commands | m_propertyCmd |
| Property update command map. More... | |
| Actions | m_actionCmd |
| Action map. More... | |
Generic implementation to export properties and actions to the Geant4 command prompt.
Definition at line 35 of file Geant4UIMessenger.h.
| typedef std::map<G4UIcommand*, Callback> dd4hep::sim::Geant4UIMessenger::Actions |
Definition at line 38 of file Geant4UIMessenger.h.
| typedef std::map<G4UIcommand*, std::string> dd4hep::sim::Geant4UIMessenger::Commands |
Definition at line 37 of file Geant4UIMessenger.h.
| Geant4UIMessenger::Geant4UIMessenger | ( | const std::string & | name, |
| const std::string & | path | ||
| ) |
Initializing constructor.
Definition at line 46 of file Geant4UIMessenger.cpp.
|
virtual |
Default destructor.
Definition at line 54 of file Geant4UIMessenger.cpp.
| void Geant4UIMessenger::addCall | ( | const std::string & | name, |
| const std::string & | description, | ||
| const Callback & | cb, | ||
| size_t | npar = 0 |
||
| ) |
Add a new callback structure.
Definition at line 60 of file Geant4UIMessenger.cpp.
|
inline |
Add any callback without parameters to the messenger.
Definition at line 62 of file Geant4UIMessenger.h.
|
inline |
Add any callback with ONE parameter to the messenger.
Definition at line 68 of file Geant4UIMessenger.h.
| void Geant4UIMessenger::exportProperties | ( | PropertyManager & | mgr | ) |
Export all properties to the Geant4 UI.
Definition at line 78 of file Geant4UIMessenger.cpp.
|
override |
Pass current property value to Geant4 UI.
Definition at line 87 of file Geant4UIMessenger.cpp.
|
override |
Accept ne property value from Geant4 UI.
Definition at line 99 of file Geant4UIMessenger.cpp.
|
protected |
Action map.
Definition at line 51 of file Geant4UIMessenger.h.
|
protected |
The UI directory of this component.
Definition at line 41 of file Geant4UIMessenger.h.
|
protected |
Component name.
Definition at line 45 of file Geant4UIMessenger.h.
|
protected |
Path in the UI hierarchy of this component.
Definition at line 47 of file Geant4UIMessenger.h.
|
protected |
Reference to the property manager corresponding to the component.
Definition at line 43 of file Geant4UIMessenger.h.
|
protected |
Property update command map.
Definition at line 49 of file Geant4UIMessenger.h.
1.8.18