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

#include <G4UIsession.hh>

+ Inheritance diagram for G4UIsession:

Public Member Functions

 G4UIsession ()
 
 G4UIsession (G4int iBatch)
 
virtual ~G4UIsession ()
 
virtual G4UIsessionSessionStart ()
 
virtual void PauseSessionStart (const G4String &Prompt)
 
virtual G4int ReceiveG4cout (const G4String &coutString)
 
virtual G4int ReceiveG4cerr (const G4String &cerrString)
 
G4int GetLastReturnCode () const
 
- Public Member Functions inherited from G4coutDestination
 G4coutDestination ()=default
 
virtual ~G4coutDestination ()
 
void AddCoutTransformer (const Transformer &t)
 
void AddCoutTransformer (Transformer &&t)
 
void AddCerrTransformer (const Transformer &t)
 
void AddCerrTransformer (Transformer &&t)
 
virtual void ResetTransformers ()
 
virtual G4int ReceiveG4cout (const G4String &msg)
 
virtual G4int ReceiveG4cerr (const G4String &msg)
 
G4int ReceiveG4cout_ (const G4String &msg)
 
G4int ReceiveG4cerr_ (const G4String &msg)
 

Static Public Member Functions

static G4int InSession ()
 

Protected Attributes

G4int ifBatch = 0
 
G4int lastRC = 0
 
- Protected Attributes inherited from G4coutDestination
std::vector< TransformertransformersCout
 
std::vector< TransformertransformersCerr
 

Static Protected Attributes

static G4ICOMS_DLL G4int inSession = 0
 
- Static Protected Attributes inherited from G4coutDestination
static G4MTGLOB_DLL G4coutDestinationmasterG4coutDestination = nullptr
 

Additional Inherited Members

- Public Types inherited from G4coutDestination
using Transformer = std::function< G4bool(G4String &)>
 

Detailed Description

Definition at line 42 of file G4UIsession.hh.

Constructor & Destructor Documentation

◆ G4UIsession() [1/2]

G4UIsession::G4UIsession ( )

Definition at line 36 of file G4UIsession.cc.

37{
38 ++inSession;
39}
static G4ICOMS_DLL G4int inSession
Definition: G4UIsession.hh:67

◆ G4UIsession() [2/2]

G4UIsession::G4UIsession ( G4int  iBatch)

Definition at line 42 of file G4UIsession.cc.

43 : ifBatch(iBatch)
44{
45}
G4int ifBatch
Definition: G4UIsession.hh:68

◆ ~G4UIsession()

G4UIsession::~G4UIsession ( )
virtual

Definition at line 48 of file G4UIsession.cc.

49{
50 if(!ifBatch)
51 {
52 --inSession;
53 }
54}

Member Function Documentation

◆ GetLastReturnCode()

G4int G4UIsession::GetLastReturnCode ( ) const
inline

Definition at line 63 of file G4UIsession.hh.

63{ return lastRC; }
G4int lastRC
Definition: G4UIsession.hh:69

Referenced by G4UImanager::ExecuteMacroFile().

◆ InSession()

G4int G4UIsession::InSession ( )
static

Definition at line 68 of file G4UIsession.cc.

69{
70 return inSession;
71}

Referenced by G4UIcontrolMessenger::SetNewValue().

◆ PauseSessionStart()

void G4UIsession::PauseSessionStart ( const G4String Prompt)
virtual

Reimplemented in G4UIGAG, G4UIterminal, G4UIGainServer, G4UIbatch, and G4VBasicShell.

Definition at line 63 of file G4UIsession.cc.

64{
65}

Referenced by G4VisCommandReviewKeptEvents::SetNewValue().

◆ ReceiveG4cerr()

G4int G4UIsession::ReceiveG4cerr ( const G4String cerrString)
virtual

Reimplemented from G4coutDestination.

Reimplemented in G4UIGAG, G4UIterminal, and G4UIGainServer.

Definition at line 81 of file G4UIsession.cc.

82{
83 std::cerr << cerrString << std::flush;
84 return 0;
85}

◆ ReceiveG4cout()

G4int G4UIsession::ReceiveG4cout ( const G4String coutString)
virtual

Reimplemented from G4coutDestination.

Reimplemented in G4UIGAG, G4UIterminal, and G4UIGainServer.

Definition at line 74 of file G4UIsession.cc.

75{
76 std::cout << coutString << std::flush;
77 return 0;
78}

◆ SessionStart()

G4UIsession * G4UIsession::SessionStart ( )
virtual

Reimplemented in G4UIbatch, G4UIterminal, G4UIGAG, G4UIGainServer, and G4VBasicShell.

Definition at line 57 of file G4UIsession.cc.

58{
59 return nullptr;
60}

Referenced by G4UImanager::ExecuteMacroFile().

Member Data Documentation

◆ ifBatch

G4int G4UIsession::ifBatch = 0
protected

Definition at line 68 of file G4UIsession.hh.

Referenced by ~G4UIsession().

◆ inSession

G4int G4UIsession::inSession = 0
staticprotected

Definition at line 67 of file G4UIsession.hh.

Referenced by G4UIsession(), InSession(), and ~G4UIsession().

◆ lastRC

G4int G4UIsession::lastRC = 0
protected

Definition at line 69 of file G4UIsession.hh.

Referenced by G4UIbatch::G4UIbatch(), GetLastReturnCode(), and G4UIbatch::SessionStart().


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