61 return (
this == &right);
67 return (
this != &right);
72 const char* exceptionCode,
74 const char* description)
77 "\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
79 "\n-------- EEEE -------- G4Exception-END --------- EEEE -------\n";
81 "\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
83 "\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";
84 std::ostringstream message;
85 message <<
"*** G4Exception : " << exceptionCode <<
G4endl
86 <<
" issued by : " << originOfException <<
G4endl << description
88 G4bool abortionForCoreDump =
false;
93 G4cerr << es_banner << message.str()
94 <<
"*** Fatal Exception *** core dump ***" <<
G4endl;
97 abortionForCoreDump =
true;
100 G4cerr << es_banner << message.str()
101 <<
"*** Fatal Error In Argument *** core dump ***" <<
G4endl;
104 abortionForCoreDump =
true;
109 G4cerr << es_banner << message.str() <<
"*** Run Must Be Aborted ***"
115 abortionForCoreDump =
false;
120 G4cerr << es_banner << message.str() <<
"*** Event Must Be Aborted ***"
126 abortionForCoreDump =
false;
129 G4cout << ws_banner << message.str()
130 <<
"*** This is just a warning message. ***" << we_banner
132 abortionForCoreDump =
false;
135 return abortionForCoreDump;
139void G4ExceptionHandler::DumpTrackInfo()
141 const G4Track *theTrack =
nullptr;
142 const G4Step *theStep =
nullptr;
152 if (theTrack ==
nullptr)
154 G4cerr <<
" **** Track information is not available at this moment"
159 G4cerr <<
"G4Track (" << theTrack
160 <<
") - track ID = " << theTrack->
GetTrackID()
162 G4cerr <<
" Particle type : "
166 G4cerr <<
" - creator process : "
173 G4cerr <<
" - creator process : not available" <<
G4endl;
175 G4cerr <<
" Kinetic energy : "
181 if (theStep ==
nullptr)
183 G4cerr <<
" **** Step information is not available at this moment"
188 G4cerr <<
" Step length : "
190 <<
" - total energy deposit : "
193 G4cerr <<
" - Physical volume : ";
204 G4cerr <<
" (material not available)";
209 G4cerr <<
"not available";
215 <<
" - defined by : "
224 G4cerr <<
" Post-step point : "
226 G4cerr <<
" - Physical volume : ";
237 G4cerr <<
" (material not available)";
242 G4cerr <<
"not available";
247 G4cerr <<
" - defined by : "
251 <<
" - step status : "
258 G4cerr <<
" *** Note: Step information might not be properly updated."
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4bool operator==(const G4ExceptionHandler &right) const
virtual ~G4ExceptionHandler()
G4bool operator!=(const G4ExceptionHandler &right) const
virtual G4bool Notify(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const G4String & GetName() const
const G4String & GetParticleName() const
static G4RunManagerKernel * GetRunManagerKernel()
G4TrackingManager * GetTrackingManager() const
virtual void AbortRun(G4bool softAbort=false)
static G4RunManager * GetRunManager()
virtual void AbortEvent()
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
G4StepStatus GetStepStatus() const
const G4VProcess * GetProcessDefinedStep() const
G4Material * GetMaterial() const
const G4ThreeVector & GetPosition() const
G4VPhysicalVolume * GetPhysicalVolume() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
const G4ParticleDefinition * GetParticleDefinition() const
const G4VProcess * GetCreatorProcess() const
const G4String GetCreatorModelName() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetParentID() const
G4SteppingManager * GetSteppingManager() const
const G4String & GetName() const
const G4String & GetProcessName() const