Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UIbridge Class Reference

#include <G4UIbridge.hh>

Public Member Functions

 G4UIbridge (G4UImanager *localUI, G4String dir)
 
 ~G4UIbridge ()=default
 
G4int ApplyCommand (const G4String &aCmd)
 
G4UImanagerLocalUI () const
 
const G4StringDirName () const
 
G4int DirLength () const
 

Detailed Description

Definition at line 46 of file G4UIbridge.hh.

Constructor & Destructor Documentation

◆ G4UIbridge()

G4UIbridge::G4UIbridge ( G4UImanager * localUI,
G4String dir )

Definition at line 35 of file G4UIbridge.cc.

35 : localUImanager(localUI)
36{
37 // make sure dirName starts and ends with '/'
38 if (dir[0] == '/') {
39 dirName = dir;
40 }
41 else {
42 dirName = "/" + dir;
43 }
44 if (dirName.back() != '/') {
45 dirName += "/";
46 }
47
48 // register to the master G4UImanager
50 if (masterUI != nullptr) {
51 masterUI->RegisterBridge(this);
52 }
53 else {
54 G4Exception("G4UIbridge::G4UIbridge()", "UI7001", FatalException,
55 "G4UImanager for the master thread is not yet instantiated. "
56 "Instantiate G4MTRunManager first.");
57 }
58}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static G4UImanager * GetMasterUIpointer()
void RegisterBridge(G4UIbridge *brg)

◆ ~G4UIbridge()

G4UIbridge::~G4UIbridge ( )
default

Member Function Documentation

◆ ApplyCommand()

G4int G4UIbridge::ApplyCommand ( const G4String & aCmd)

Definition at line 61 of file G4UIbridge.cc.

62{
63 return localUImanager->ApplyCommand(aCmd);
64}
G4int ApplyCommand(const char *aCommand)

◆ DirLength()

G4int G4UIbridge::DirLength ( ) const
inline

Definition at line 56 of file G4UIbridge.hh.

56{ return (G4int)dirName.length(); }
int G4int
Definition G4Types.hh:85

◆ DirName()

const G4String & G4UIbridge::DirName ( ) const
inline

Definition at line 55 of file G4UIbridge.hh.

55{ return dirName; }

◆ LocalUI()

G4UImanager * G4UIbridge::LocalUI ( ) const
inline

Definition at line 54 of file G4UIbridge.hh.

54{ return localUImanager; }

Referenced by G4UImanager::RegisterBridge().


The documentation for this class was generated from the following files: