Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ExceptionHandler.cc,v 1.2 2002/12/04 21:52:40 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ---------------- G4ExceptionHandler ----------------
|
||||
// by Makoto Asai (August 2002)
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4ExceptionHandler.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <stdlib.h>
|
||||
#include "G4String.hh"
|
||||
|
||||
G4ExceptionHandler::G4ExceptionHandler()
|
||||
{
|
||||
}
|
||||
|
||||
G4ExceptionHandler::~G4ExceptionHandler()
|
||||
{
|
||||
}
|
||||
|
||||
G4ExceptionHandler::G4ExceptionHandler(const G4ExceptionHandler &right)
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
G4ExceptionHandler& G4ExceptionHandler::operator=(const G4ExceptionHandler &right)
|
||||
{
|
||||
if (&right == this) return *this;
|
||||
*this = right;
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4int G4ExceptionHandler::operator==(const G4ExceptionHandler &right) const
|
||||
{
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
G4int G4ExceptionHandler::operator!=(const G4ExceptionHandler &right) const
|
||||
{
|
||||
return (this != &right);
|
||||
}
|
||||
|
||||
G4bool G4ExceptionHandler::Notify(const char* originOfException,
|
||||
const char* exceptionCode,
|
||||
G4ExceptionSeverity severity,
|
||||
const char* description)
|
||||
{
|
||||
G4cerr << G4endl;
|
||||
G4cerr << "*** G4Exception : " << exceptionCode << G4endl;
|
||||
G4cerr << " issued by : " << originOfException << G4endl;
|
||||
G4cerr << description << G4endl;
|
||||
G4bool abortionForCoreDump = false;
|
||||
G4ApplicationState aps = G4StateManager::GetStateManager()->GetCurrentState();
|
||||
switch(severity)
|
||||
{
|
||||
case FatalException:
|
||||
G4cerr << "*** Fatal Exception *** core dump ***";
|
||||
abortionForCoreDump = true;
|
||||
break;
|
||||
case FatalErrorInArgument:
|
||||
G4cerr << "*** Fatal Error In Argument *** core dump ***";
|
||||
abortionForCoreDump = true;
|
||||
break;
|
||||
case RunMustBeAborted:
|
||||
if(aps==G4State_GeomClosed || aps==G4State_EventProc)
|
||||
{
|
||||
G4cerr << "*** Run Must Be Aborted ";
|
||||
G4RunManager::GetRunManager()->AbortRun(false);
|
||||
}
|
||||
abortionForCoreDump = false;
|
||||
break;
|
||||
case EventMustBeAborted:
|
||||
if(aps==G4State_EventProc)
|
||||
{
|
||||
G4cerr << "*** Event Must Be Aborted ";
|
||||
G4RunManager::GetRunManager()->AbortEvent();
|
||||
}
|
||||
abortionForCoreDump = false;
|
||||
break;
|
||||
default:
|
||||
G4cerr << "*** This is just a warning message.";
|
||||
abortionForCoreDump = false;
|
||||
break;
|
||||
}
|
||||
G4cerr << G4endl;
|
||||
return abortionForCoreDump;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Run.cc,v 1.4 2001/07/13 15:57:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4Run.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunManager.cc,v 1.44 2002/06/25 12:49:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RunManager.cc,v 1.54 2002/12/12 08:33:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -51,16 +51,30 @@
|
||||
#include "G4ProcessTable.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#include "G4ExceptionHandler.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/strstream"
|
||||
|
||||
|
||||
G4RunManager* G4RunManager::fRunManager = 0;
|
||||
|
||||
G4RunManager* G4RunManager::GetRunManager()
|
||||
{ return fRunManager; }
|
||||
|
||||
//G4int G4RunManager::RegisterInteruption(int interuptionSignal)
|
||||
//{
|
||||
// if(signal(interuptionSignal,ReceiveInteruption)==SIG_ERR) return -1;
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
//void G4RunManager::ReceiveInteruption(int sig)
|
||||
//{
|
||||
// if(!fRunManager) return;
|
||||
// G4ApplicationState state
|
||||
// = G4StateManager::GetStateManager()->GetCurrentState();
|
||||
// if(state==G4State_GeomClosed || state==G4State_EventProc)
|
||||
// { fRunManager->AbortRun(true); }
|
||||
//}
|
||||
|
||||
G4RunManager::G4RunManager()
|
||||
:userDetector(0),physicsList(0),
|
||||
userRunAction(0),userPrimaryGeneratorAction(0),userEventAction(0),
|
||||
@@ -71,6 +85,7 @@ G4RunManager::G4RunManager()
|
||||
currentRun(0),currentEvent(0),n_perviousEventsToBeStored(0),
|
||||
storeRandomNumberStatus(false)
|
||||
{
|
||||
defaultExceptionHandler = new G4ExceptionHandler();
|
||||
if(fRunManager)
|
||||
{ G4Exception("G4RunManager constructed twice."); }
|
||||
//G4UnitDefinition::BuildUnitsTable();
|
||||
@@ -82,7 +97,7 @@ G4RunManager::G4RunManager()
|
||||
G4ParticleTable::GetParticleTable()->CreateMessenger();
|
||||
G4ProcessTable::GetProcessTable()->CreateMessenger();
|
||||
randomNumberStatusDir = "./";
|
||||
versionString = " Geant4 version $Name: geant4-04-01 $\n (28-Jun-2002)";
|
||||
versionString = " Geant4 version $Name: geant4-05-00 $\n (13-Dec-2002)";
|
||||
G4cout
|
||||
<< "**********************************************" << G4endl
|
||||
<< versionString << G4endl
|
||||
@@ -94,7 +109,7 @@ G4RunManager::~G4RunManager()
|
||||
{
|
||||
if(verboseLevel>0) G4cout << "G4 kernel has come to Quit state." << G4endl;
|
||||
G4StateManager* pStateManager = G4StateManager::GetStateManager();
|
||||
pStateManager->SetNewState(Quit);
|
||||
pStateManager->SetNewState(G4State_Quit);
|
||||
|
||||
if(verboseLevel>1) G4cout << "Deletion of G4 kernel class start." << G4endl;
|
||||
delete timer;
|
||||
@@ -142,6 +157,7 @@ G4RunManager::~G4RunManager()
|
||||
delete pStateManager;
|
||||
if(verboseLevel>1) G4cout << "StateManager deleted." << G4endl;
|
||||
}
|
||||
delete defaultExceptionHandler;
|
||||
if(verboseLevel>1) G4cout << "RunManager is deleting." << G4endl;
|
||||
}
|
||||
|
||||
@@ -161,7 +177,7 @@ G4bool G4RunManager::ConfirmBeamOnCondition()
|
||||
G4StateManager* stateManager = G4StateManager::GetStateManager();
|
||||
|
||||
G4ApplicationState currentState = stateManager->GetCurrentState();
|
||||
if(currentState!=PreInit && currentState!=Idle)
|
||||
if(currentState!=G4State_PreInit && currentState!=G4State_Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - BeamOn() ignored." << G4endl;
|
||||
return false;
|
||||
@@ -210,7 +226,7 @@ void G4RunManager::RunInitialization()
|
||||
geometryNeedsToBeClosed = false;
|
||||
}
|
||||
G4StateManager* stateManager = G4StateManager::GetStateManager();
|
||||
stateManager->SetNewState(GeomClosed);
|
||||
stateManager->SetNewState(G4State_GeomClosed);
|
||||
|
||||
//previousEvents->clearAndDestroy();
|
||||
for(size_t itr=0;itr<previousEvents->size();itr++)
|
||||
@@ -249,7 +265,7 @@ void G4RunManager::DoEventLoop(G4int n_event,const char* macroFile,G4int n_selec
|
||||
G4int i_event;
|
||||
for( i_event=0; i_event<n_event; i_event++ )
|
||||
{
|
||||
stateManager->SetNewState(EventProc);
|
||||
stateManager->SetNewState(G4State_EventProc);
|
||||
|
||||
currentEvent = GenerateEvent(i_event);
|
||||
|
||||
@@ -258,7 +274,7 @@ void G4RunManager::DoEventLoop(G4int n_event,const char* macroFile,G4int n_selec
|
||||
AnalyzeEvent(currentEvent);
|
||||
|
||||
if(i_event<n_select) G4UImanager::GetUIpointer()->ApplyCommand(msg);
|
||||
stateManager->SetNewState(GeomClosed);
|
||||
stateManager->SetNewState(G4State_GeomClosed);
|
||||
StackPreviousEvent(currentEvent);
|
||||
currentEvent = 0;
|
||||
if(runAborted) break;
|
||||
@@ -320,7 +336,7 @@ void G4RunManager::RunTermination()
|
||||
currentRun = 0;
|
||||
runIDCounter++;
|
||||
|
||||
stateManager->SetNewState(Idle);
|
||||
stateManager->SetNewState(G4State_Idle);
|
||||
}
|
||||
|
||||
void G4RunManager::StackPreviousEvent(G4Event* anEvent)
|
||||
@@ -341,18 +357,18 @@ void G4RunManager::Initialize()
|
||||
{
|
||||
G4StateManager* stateManager = G4StateManager::GetStateManager();
|
||||
G4ApplicationState currentState = stateManager->GetCurrentState();
|
||||
if(currentState!=PreInit && currentState!=Idle)
|
||||
if(currentState!=G4State_PreInit && currentState!=G4State_Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - "
|
||||
<< "G4RunManager::Initialize() ignored." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
stateManager->SetNewState(Init);
|
||||
stateManager->SetNewState(G4State_Init);
|
||||
if(!geometryInitialized) InitializeGeometry();
|
||||
if(!physicsInitialized) InitializePhysics();
|
||||
if(!cutoffInitialized) InitializeCutOff();
|
||||
stateManager->SetNewState(Idle);
|
||||
stateManager->SetNewState(G4State_Idle);
|
||||
if(!initializedAtLeastOnce) initializedAtLeastOnce = true;
|
||||
}
|
||||
|
||||
@@ -393,15 +409,19 @@ void G4RunManager::InitializeCutOff()
|
||||
cutoffInitialized = true;
|
||||
}
|
||||
|
||||
void G4RunManager::AbortRun()
|
||||
void G4RunManager::AbortRun(G4bool softAbort)
|
||||
{
|
||||
// This method is valid only for GeomClosed or EventProc state
|
||||
G4ApplicationState currentState =
|
||||
G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if(currentState==GeomClosed || currentState==EventProc)
|
||||
if(currentState==G4State_GeomClosed || currentState==G4State_EventProc)
|
||||
{
|
||||
runAborted = true;
|
||||
if(currentState==EventProc) eventManager->AbortCurrentEvent();
|
||||
if(currentState==G4State_EventProc && !softAbort)
|
||||
{
|
||||
currentEvent->SetEventAborted();
|
||||
eventManager->AbortCurrentEvent();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -409,6 +429,22 @@ void G4RunManager::AbortRun()
|
||||
}
|
||||
}
|
||||
|
||||
void G4RunManager::AbortEvent()
|
||||
{
|
||||
// This method is valid only for EventProc state
|
||||
G4ApplicationState currentState =
|
||||
G4StateManager::GetStateManager()->GetCurrentState();
|
||||
if(currentState==G4State_EventProc)
|
||||
{
|
||||
currentEvent->SetEventAborted();
|
||||
eventManager->AbortCurrentEvent();
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cerr << "Event is not in progress. AbortEevnt() ignored." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RunManager::DefineWorldVolume(G4VPhysicalVolume* worldVol)
|
||||
{
|
||||
// set the world volume to the Navigator
|
||||
@@ -423,6 +459,33 @@ void G4RunManager::DefineWorldVolume(G4VPhysicalVolume* worldVol)
|
||||
geometryNeedsToBeClosed = true;
|
||||
}
|
||||
|
||||
void G4RunManager::ResetNavigator() const
|
||||
{
|
||||
G4StateManager* stateManager = G4StateManager::GetStateManager();
|
||||
G4ApplicationState currentState = stateManager->GetCurrentState();
|
||||
|
||||
if(!initializedAtLeastOnce)
|
||||
{
|
||||
G4cerr << " Geant4 kernel should be initialized" << G4endl;
|
||||
G4cerr << " Navigator is not touched..." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if( currentState != G4State_Idle )
|
||||
{
|
||||
G4cerr << " Geant4 kernel not in Idle state" << G4endl;
|
||||
G4cerr << " Navigator is not touched..." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// We have to tweak the navigator's state in case a geometry has been modified between runs
|
||||
// By the following call we ensure that navigator's state is reset properly
|
||||
G4ThreeVector center(0,0,0);
|
||||
G4TransportationManager::GetTransportationManager()
|
||||
->GetNavigatorForTracking()
|
||||
->LocateGlobalPointAndSetup(center,0,false);
|
||||
}
|
||||
|
||||
void G4RunManager::rndmSaveThisRun()
|
||||
{
|
||||
G4int runNumber = runIDCounter;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunMessenger.cc,v 1.10 2001/11/23 16:20:30 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4RunMessenger.cc,v 1.12 2002/12/04 21:52:40 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4RunMessenger.hh"
|
||||
@@ -46,7 +46,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
|
||||
initCmd = new G4UIcmdWithoutParameter("/run/initialize",this);
|
||||
initCmd->SetGuidance("Initialize G4 kernel.");
|
||||
initCmd->AvailableForStates(PreInit,Idle),
|
||||
initCmd->AvailableForStates(G4State_PreInit,G4State_Idle),
|
||||
|
||||
beamOnCmd = new G4UIcommand("/run/beamOn",this);
|
||||
beamOnCmd->SetGuidance("Start a Run.");
|
||||
@@ -61,7 +61,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
beamOnCmd->SetGuidance("If the third argument (nSelect) is given, the");
|
||||
beamOnCmd->SetGuidance("macro file will be executed only for the first");
|
||||
beamOnCmd->SetGuidance("nSelect events.");
|
||||
beamOnCmd->AvailableForStates(PreInit,Idle);
|
||||
beamOnCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
G4UIparameter* p1 = new G4UIparameter("numberOfEvent",'i',true);
|
||||
p1->SetDefaultValue(1);
|
||||
p1->SetParameterRange("numberOfEvent > 0");
|
||||
@@ -90,7 +90,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
optCmd->SetGuidance("GEANT4 is initialized with this flag as TRUE.");
|
||||
optCmd->SetParameterName("optimizeFlag",true);
|
||||
optCmd->SetDefaultValue(true);
|
||||
optCmd->AvailableForStates(PreInit,Idle);
|
||||
optCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
brkBoECmd = new G4UIcmdWithABool("/run/breakAtBeginOfEvent",this);
|
||||
brkBoECmd->SetGuidance("Set a break point at the begining of every event.");
|
||||
@@ -102,23 +102,31 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
brkEoECmd->SetParameterName("flag",true);
|
||||
brkEoECmd->SetDefaultValue(true);
|
||||
|
||||
abortCmd = new G4UIcmdWithoutParameter("/run/abort",this);
|
||||
abortCmd = new G4UIcmdWithABool("/run/abort",this);
|
||||
abortCmd->SetGuidance("Abort current run processing.");
|
||||
abortCmd->AvailableForStates(GeomClosed,EventProc);
|
||||
abortCmd->SetGuidance("If softAbort is false (default), currently processing event will be immediately aborted,");
|
||||
abortCmd->SetGuidance("while softAbort is true, abortion occurs after processing the current event.");
|
||||
abortCmd->AvailableForStates(G4State_GeomClosed,G4State_EventProc);
|
||||
abortCmd->SetParameterName("softAbort",true);
|
||||
abortCmd->SetDefaultValue(false);
|
||||
|
||||
abortEventCmd = new G4UIcmdWithoutParameter("/run/abortCurrentEvent",this);
|
||||
abortEventCmd->SetGuidance("Abort currently processing event.");
|
||||
abortEventCmd->AvailableForStates(G4State_EventProc);
|
||||
|
||||
geomCmd = new G4UIcmdWithoutParameter("/run/geometryModified",this);
|
||||
geomCmd->SetGuidance("Force geometry to be closed again.");
|
||||
geomCmd->SetGuidance("This command must be applied");
|
||||
geomCmd->SetGuidance(" if geometry has been modified after the");
|
||||
geomCmd->SetGuidance(" first initialization (or BeamOn).");
|
||||
geomCmd->AvailableForStates(PreInit,Idle),
|
||||
geomCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
cutCmd = new G4UIcmdWithoutParameter("/run/cutoffModified",this);
|
||||
cutCmd->SetGuidance("Force closssection tables to be calculated again.");
|
||||
cutCmd->SetGuidance("This command must be applied");
|
||||
cutCmd->SetGuidance(" if cutoff value(s) have been modified after the");
|
||||
cutCmd->SetGuidance(" first initialization (or BeamOn).");
|
||||
cutCmd->AvailableForStates(PreInit,Idle);
|
||||
cutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
randomDirectory = new G4UIdirectory("/random/");
|
||||
randomDirectory->SetGuidance("Random number status control commands.");
|
||||
@@ -128,7 +136,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
randDirCmd->SetGuidance("Directory must be creates before storing the files.");
|
||||
randDirCmd->SetParameterName("fileName",true);
|
||||
randDirCmd->SetDefaultValue("./");
|
||||
randDirCmd->AvailableForStates(PreInit,Idle,GeomClosed);
|
||||
randDirCmd->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed);
|
||||
|
||||
savingFlagCmd = new G4UIcmdWithABool("/random/setSavingFlag",this);
|
||||
savingFlagCmd->SetGuidance("The randomNumberStatus will be saved at :");
|
||||
@@ -139,11 +147,11 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
|
||||
saveThisRunCmd = new G4UIcmdWithoutParameter("/random/saveThisRun",this);
|
||||
saveThisRunCmd->SetGuidance("copy currentRun.rndm to runXXX.rndm");
|
||||
saveThisRunCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
saveThisRunCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
saveThisEventCmd = new G4UIcmdWithoutParameter("/random/saveThisEvent",this);
|
||||
saveThisEventCmd->SetGuidance("copy currentEvent.rndm to runXXXevtYYY.rndm");
|
||||
saveThisEventCmd->AvailableForStates(EventProc);
|
||||
saveThisEventCmd->AvailableForStates(G4State_EventProc);
|
||||
|
||||
restoreRandCmd = new G4UIcmdWithAString("/random/resetEngineFrom",this);
|
||||
restoreRandCmd->SetGuidance("Reset the status of the rndm engine from a file.");
|
||||
@@ -153,7 +161,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
" /random/setDirectoryName.");
|
||||
restoreRandCmd->SetParameterName("fileName",true);
|
||||
restoreRandCmd->SetDefaultValue("currentRun.rndm");
|
||||
restoreRandCmd->AvailableForStates(PreInit,Idle,GeomClosed);
|
||||
restoreRandCmd->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed);
|
||||
|
||||
//old commands for the rndm engine status handling
|
||||
//
|
||||
@@ -162,7 +170,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
randDirOld->SetGuidance("Directory must be creates before storing the files.");
|
||||
randDirOld->SetParameterName("fileName",true);
|
||||
randDirOld->SetDefaultValue("./");
|
||||
randDirOld->AvailableForStates(PreInit,Idle,GeomClosed);
|
||||
randDirOld->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed);
|
||||
|
||||
storeRandOld = new G4UIcmdWithAnInteger("/run/storeRandomNumberStatus",this);
|
||||
storeRandOld->SetGuidance("The randomNumberStatus will be saved at :");
|
||||
@@ -179,7 +187,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
" /random/setDirectoryName.");
|
||||
restoreRandOld->SetParameterName("fileName",true);
|
||||
restoreRandOld->SetDefaultValue("currentRun.rndm");
|
||||
restoreRandOld->AvailableForStates(PreInit,Idle,GeomClosed);
|
||||
restoreRandOld->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed);
|
||||
|
||||
}
|
||||
|
||||
@@ -191,6 +199,7 @@ G4RunMessenger::~G4RunMessenger()
|
||||
delete brkBoECmd;
|
||||
delete brkEoECmd;
|
||||
delete abortCmd;
|
||||
delete abortEventCmd;
|
||||
delete initCmd;
|
||||
delete geomCmd;
|
||||
delete cutCmd;
|
||||
@@ -228,7 +237,9 @@ void G4RunMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
else if( command==brkEoECmd )
|
||||
{ G4UImanager::GetUIpointer()->SetPauseAtEndOfEvent(brkEoECmd->GetNewBoolValue(newValue)); }
|
||||
else if( command==abortCmd )
|
||||
{ runManager->AbortRun(); }
|
||||
{ runManager->AbortRun(abortCmd->GetNewBoolValue(newValue)); }
|
||||
else if( command==abortEventCmd )
|
||||
{ runManager->AbortEvent(); }
|
||||
else if( command==initCmd )
|
||||
{ runManager->Initialize(); }
|
||||
else if( command==geomCmd )
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.10 2001/10/11 13:44:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.11 2002/12/04 21:52:40 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -71,7 +71,7 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
setCutCmd->SetRange("cut >0.0");
|
||||
setCutCmd->SetUnitCandidates("m cm mm microm");
|
||||
setCutCmd->SetDefaultUnit("mm");
|
||||
setCutCmd->AvailableForStates(PreInit,Idle);
|
||||
setCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
// /run/particle/DumpList command
|
||||
dumpListCmd = new G4UIcmdWithoutParameter("/run/particle/dumpList",this);
|
||||
@@ -85,21 +85,21 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
dumpCutValuesCmd->SetGuidance(" enter all for all particles");
|
||||
dumpCutValuesCmd->SetParameterName("particle", true);
|
||||
dumpCutValuesCmd->SetDefaultValue("table");
|
||||
dumpCutValuesCmd->AvailableForStates(Idle,GeomClosed,EventProc);
|
||||
dumpCutValuesCmd->AvailableForStates(G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
// /run/particle/addProcManager command
|
||||
addProcManCmd = new G4UIcmdWithAString("/run/particle/addProcManager", this);
|
||||
addProcManCmd->SetGuidance("add process manager to specified particle type");
|
||||
addProcManCmd->SetParameterName("particleType", true);
|
||||
addProcManCmd->SetDefaultValue("");
|
||||
addProcManCmd->AvailableForStates(Init,Idle,GeomClosed,EventProc);
|
||||
addProcManCmd->AvailableForStates(G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
// /run/particle/buildPhysicsTable command
|
||||
buildPTCmd = new G4UIcmdWithAString("/run/particle/buildPhysicsTable", this);
|
||||
buildPTCmd->SetGuidance("build physics table of specified particle type");
|
||||
buildPTCmd->SetParameterName("particleType", true);
|
||||
buildPTCmd->SetDefaultValue("");
|
||||
buildPTCmd->AvailableForStates(Init,Idle,GeomClosed,EventProc);
|
||||
buildPTCmd->AvailableForStates(G4State_Init,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
|
||||
|
||||
// /run/particle/storePhysicsTable command
|
||||
storeCmd = new G4UIcmdWithAString("/run/particle/storePhysicsTable",this);
|
||||
@@ -107,7 +107,7 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
storeCmd->SetGuidance(" Enter directory name");
|
||||
storeCmd->SetParameterName("dirName",true);
|
||||
storeCmd->SetDefaultValue("");
|
||||
storeCmd->AvailableForStates(Idle);
|
||||
storeCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// /run/particle/retrievePhysicsTable command
|
||||
retrieveCmd = new G4UIcmdWithAString("/run/particle/retrievePhysicsTable",this);
|
||||
@@ -115,7 +115,7 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
retrieveCmd->SetGuidance(" Enter directory name or OFF to switch off");
|
||||
retrieveCmd->SetParameterName("dirName",true);
|
||||
retrieveCmd->SetDefaultValue("");
|
||||
retrieveCmd->AvailableForStates(PreInit,Idle);
|
||||
retrieveCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
// /run/particle/setStoredInAscii command
|
||||
asciiCmd = new G4UIcmdWithAnInteger("/run/particle/setStoredInAscii",this);
|
||||
@@ -123,7 +123,7 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
asciiCmd->SetGuidance(" Enter 0(binary) or 1(ascii)");
|
||||
asciiCmd->SetParameterName("ascii",true);
|
||||
asciiCmd->SetDefaultValue(0);
|
||||
asciiCmd->AvailableForStates(PreInit,Idle);
|
||||
asciiCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
asciiCmd->SetRange("ascii ==0 || ascii ==1");
|
||||
|
||||
//Commnad /run/particle/applyCuts command
|
||||
@@ -138,7 +138,7 @@ G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pPart
|
||||
param = new G4UIparameter("Particle",'s',true);
|
||||
param->SetDefaultValue("all");
|
||||
applyCutsCmd->SetParameter(param);
|
||||
applyCutsCmd->AvailableForStates(PreInit,Init,Idle);
|
||||
applyCutsCmd->AvailableForStates(G4State_PreInit,G4State_Init,G4State_Idle);
|
||||
}
|
||||
|
||||
G4UserPhysicsListMessenger::~G4UserPhysicsListMessenger()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserRunAction.cc,v 1.4 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VModularPhysicsList.cc,v 1.2 2002/05/29 12:11:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPersistencyManager.cc,v 1.4 2001/07/13 15:57:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4VPersistencyManager.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserDetectorConstruction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.26 2001/10/23 02:36:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
Reference in New Issue
Block a user