Message: Re: How to turn off G4EXCEPTION warnings Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How to turn off G4EXCEPTION warnings 

Forum: Physics List
Re: Question How to turn off G4EXCEPTION warnings (Bo Liu)
Date: 13 Oct, 2015
From: Makoto Asai <Makoto Asai>

Hi,

You need to have your own implementation of ExceptionHandler class.
This is not a big deal. Copy G4ExceptionHandler.hh and G4ExceptionHandler.cc
(that should be found in geant4/source/run/include and geant4/source/run/src)
with your own class name (e.g. MyExceptionHandler.hh and MyExceptionHandler.cc)
and change line #122 of the source file.

http://www-geant4.kek.jp/lxr/source/run/src/G4ExceptionHandler.cc#L122

  G4cout << ws_banner << message.str() << ....

should be changed to

  if(exceptionCode!="de0001") G4cout << ws_banner << message.str() << ....

Then instantiate your MyExceptionHandler right after you instantiate
G4RunManager (or G4MTRunManager). That's it.

Hope this helps,
Makoto

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: How to turn off G4EXCEPTION warnings   (Liu, Bo - 13 Oct, 2015)
2 None: Re: How to turn off G4EXCEPTION warnings   (Liu, Bo - 15 Oct, 2015)
1 None: Re: How to turn off G4EXCEPTION warnings   (Makoto Asai - 15 Oct, 2015)
(_ None: Re: How to turn off G4EXCEPTION warnings   (Liu, Bo - 15 Oct, 2015)
 Add Message Add Message
to: "Re: How to turn off G4EXCEPTION warnings"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]