Import Geant4 10.4.1 source tree

This commit is contained in:
Gabriele Cosmo
2018-03-02 09:34:30 +01:00
parent fc6af9e721
commit fe04dcb406
341 changed files with 18389 additions and 24522 deletions
@@ -79,7 +79,7 @@ void G4MTcoutDestination::SetDefaultOutput( G4bool addmasterDestination ,
const auto filter_out = [this](G4String&)->G4bool {
if (this->ignoreCout ||
( this->ignoreInit &&
this->stateMgr->GetCurrentState() == G4State_Idle ) )
this->stateMgr->GetCurrentState() == G4State_Init ) )
{ return false; }
return true;
};
+18 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StateManager.cc 67970 2013-03-13 10:10:06Z gcosmo $
// $Id: G4StateManager.cc 108486 2018-02-15 14:47:25Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -40,6 +40,7 @@
// Initialization of the static pointer of the single class instance
//
G4ThreadLocal G4StateManager* G4StateManager::theStateManager = 0;
G4int G4StateManager::verboseLevel = 0;
G4StateManager::G4StateManager()
: theCurrentState(G4State_PreInit),
@@ -205,6 +206,7 @@ G4StateManager::SetNewState(G4ApplicationState requestedState, const char* msg)
G4bool ack = true;
G4ApplicationState savedState = thePreviousState;
thePreviousState = theCurrentState;
while ((ack) && (i<theDependentsList.size()))
{
ack = theDependentsList[i]->Notify(requestedState);
@@ -218,7 +220,15 @@ G4StateManager::SetNewState(G4ApplicationState requestedState, const char* msg)
if(!ack)
{ thePreviousState = savedState; }
else
{ theCurrentState = requestedState; }
{
theCurrentState = requestedState;
if(verboseLevel>0)
{
G4cout<<"#### G4StateManager::SetNewState from "
<<GetStateString(thePreviousState)<<" to "
<<GetStateString(requestedState)<<G4endl;
}
}
msgptr = 0;
return ack;
}
@@ -269,6 +279,12 @@ G4StateManager::GetStateString(G4ApplicationState aState) const
return stateName;
}
void
G4StateManager::SetVerboseLevel(G4int val)
{
verboseLevel = val;
}
//void G4StateManager::Pause()
//{
// Pause("G4_pause> ");