Import Geant4 11.0.2 source tree

This commit is contained in:
Gabriele Cosmo
2022-05-25 15:50:57 +02:00
parent de4f28d823
commit b3bf75a2a1
341 changed files with 93127 additions and 39343 deletions
+12 -8
View File
@@ -138,14 +138,18 @@ G4bool G4ExceptionHandler::Notify(const char* originOfException,
// --------------------------------------------------------------------
void G4ExceptionHandler::DumpTrackInfo()
{
G4ApplicationState aps = G4StateManager::GetStateManager()->GetCurrentState();
G4SteppingManager* steppingMgr = G4RunManagerKernel::GetRunManagerKernel()
->GetTrackingManager()
->GetSteppingManager();
const G4Track* theTrack = steppingMgr->GetfTrack();
const G4Step* theStep = steppingMgr->GetfStep();
const G4Track *theTrack = nullptr;
const G4Step *theStep = nullptr;
if (G4StateManager::GetStateManager()->GetCurrentState() == G4State_EventProc)
{
G4SteppingManager *steppingMgr = G4RunManagerKernel::GetRunManagerKernel()
->GetTrackingManager()
->GetSteppingManager();
theTrack = steppingMgr->GetfTrack();
theStep = steppingMgr->GetfStep();
}
if(aps != G4State_EventProc || theTrack == nullptr)
if (theTrack == nullptr)
{
G4cerr << " **** Track information is not available at this moment"
<< G4endl;
@@ -174,7 +178,7 @@ void G4ExceptionHandler::DumpTrackInfo()
<< G4endl;
}
if(aps != G4State_EventProc || !theStep)
if (theStep == nullptr)
{
G4cerr << " **** Step information is not available at this moment"
<< G4endl;
+10 -2
View File
@@ -122,7 +122,11 @@ G4RunManagerKernel::G4RunManagerKernel()
G4AllocatorList* allocList = G4AllocatorList::GetAllocatorListIfExist();
if(allocList != nullptr)
numberOfStaticAllocators = allocList->Size();
defaultExceptionHandler = new G4ExceptionHandler();
if(G4StateManager::GetStateManager()->GetExceptionHandler() == nullptr)
{
defaultExceptionHandler = new G4ExceptionHandler();
}
if(fRunManagerKernel != nullptr)
{
G4Exception("G4RunManagerKernel::G4RunManagerKernel()", "Run0001",
@@ -222,7 +226,11 @@ G4RunManagerKernel::G4RunManagerKernel(RMKType rmkType)
}
#endif
defaultExceptionHandler = new G4ExceptionHandler();
if(G4StateManager::GetStateManager()->GetExceptionHandler() == nullptr)
{
defaultExceptionHandler = new G4ExceptionHandler();
}
if(fRunManagerKernel != nullptr)
{
G4Exception("G4RunManagerKernel::G4RunManagerKernel()", "Run0001",