Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4UIterminal.cc File Reference
#include "G4Types.hh"
#include "G4StateManager.hh"
#include "G4UIcommandTree.hh"
#include "G4UIcommand.hh"
#include "G4UIcommandStatus.hh"
#include "G4UIterminal.hh"
#include "G4UIcsh.hh"
#include <sstream>
#include <signal.h>
Include dependency graph for G4UIterminal.cc:

Go to the source code of this file.

Functions

static void SignalHandler (G4int)
 

Variables

static G4ThreadLocal G4VUIshelltheshell = 0
 

Function Documentation

static void SignalHandler ( G4int  )
static

Definition at line 57 of file G4UIterminal.cc.

59 {
61  G4ApplicationState state= stateManager-> GetCurrentState();
62 
63  if(state==G4State_GeomClosed || state==G4State_EventProc) {
64  G4cout << "aborting Run ...";
65  G4UImanager::GetUIpointer()->ApplyCommand("/run/abort");
66  G4cout << G4endl;
67  } else {
68  G4cout << G4endl
69  << "Session terminated." << G4endl;
70  theshell-> ResetTerminal();
71  G4Exception("G4UIterminal::SignalHandler()",
72  "UI0001",
74  "KeyboardInterrput with Ctrl-C");
75  }
76 
77  // for original Unix / System V
78  signal(SIGINT, SignalHandler);
79 }
static G4ThreadLocal G4VUIshell * theshell
Definition: G4UIterminal.cc:50
static void SignalHandler(G4int)
Definition: G4UIterminal.cc:57
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

G4ThreadLocal G4VUIshell* theshell = 0
static

Definition at line 50 of file G4UIterminal.cc.