#include <ExceptionHandler.h>
Definition at line 19 of file ExceptionHandler.h.
◆ ExceptionHandler() [1/2]
ExceptionHandler::ExceptionHandler |
( |
double |
th, |
|
|
bool |
tr |
|
) |
| |
|
explicit |
◆ ~ExceptionHandler()
ExceptionHandler::~ExceptionHandler |
( |
| ) |
|
|
override |
◆ ExceptionHandler() [2/2]
◆ Notify()
bool ExceptionHandler::Notify |
( |
const char * |
exceptionOrigin, |
|
|
const char * |
exceptionCode, |
|
|
G4ExceptionSeverity |
severity, |
|
|
const char * |
description |
|
) |
| |
|
override |
Definition at line 16 of file ExceptionHandler.cc.
References makeListRunsInFiles::description, Exception, m_eth, m_number, m_trace, ValidateTausOnZEEFastSim_cff::proc, ErrorSummaryFilter_cfi::severity, and HLT_2024v14_cff::track.
20 static const G4String es_banner =
"\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
21 static const G4String ee_banner =
"\n-------- EEEE -------- G4Exception-END --------- EEEE -------\n";
22 static const G4String ws_banner =
"\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
23 static const G4String we_banner =
"\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";
25 G4Track*
track = G4EventManager::GetEventManager()->GetTrackingManager()->GetTrack();
28 std::stringstream message;
29 message <<
"*** G4Exception : " << exceptionCode <<
"\n" 30 <<
" issued by : " << exceptionOrigin <<
"\n" 34 if (
nullptr !=
track) {
35 ekin =
track->GetKineticEnergy();
36 message <<
"\n CMS info: " 37 <<
"TrackID=" <<
track->GetTrackID() <<
" ParentID=" <<
track->GetParentID() <<
" " 38 <<
track->GetParticleDefinition()->GetParticleName() <<
"; Ekin(MeV)=" << ekin / CLHEP::MeV
39 <<
"; time(ns)=" <<
track->GetGlobalTime() / CLHEP::ns <<
"; status=" <<
track->GetTrackStatus()
40 <<
"\n position(mm): " <<
track->GetPosition() <<
"; direction: " <<
track->GetMomentumDirection();
41 const G4VPhysicalVolume* vol =
track->GetVolume();
43 message <<
"\n PhysicalVolume: " << vol->GetName() <<
";";
44 const G4LogicalVolume* lv = vol->GetLogicalVolume();
46 message <<
" material: " << lv->GetMaterial()->GetName();
49 message <<
"\n stepNumber=" <<
track->GetCurrentStepNumber()
50 <<
"; stepLength(mm)=" <<
track->GetStepLength() / CLHEP::mm <<
"; weight=" <<
track->GetWeight();
51 const G4VProcess*
proc =
track->GetCreatorProcess();
52 if (
nullptr !=
proc) {
53 message <<
"; creatorProcess: " <<
proc->GetProcessName() <<
"; modelID=" <<
track->GetCreatorModelID();
58 G4ExceptionSeverity localSeverity =
severity;
59 std::stringstream mescode;
60 mescode << exceptionCode <<
"\n";
65 if (ekin <
m_eth && (code ==
"GeomNav0003" || code ==
"GeomField0003")) {
66 localSeverity = JustWarning;
67 track->SetTrackStatus(fStopAndKill);
72 if (localSeverity == JustWarning) {
75 << ws_banner << message.str() <<
"*** This is just a warning message. ***" << we_banner;
77 edm::LogWarning(
"SimG4CoreApplication") << es_banner << message.str() << ee_banner;
Log< level::Warning, false > LogWarning
◆ operator!=()
◆ operator=()
◆ operator==()
◆ m_eth
double ExceptionHandler::m_eth |
|
private |
◆ m_number
int ExceptionHandler::m_number {0} |
|
private |
◆ m_trace
bool ExceptionHandler::m_trace |
|
private |