Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// $Id: History 100918 2016-11-03 10:38:27Z gcosmo $
|
||||
// $Id: History 110102 2018-05-15 11:32:36Z gcosmo $
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,16 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 15, 2018 J.Allison - fieldex05-V10-04-01
|
||||
- Remove G4UI_USE and G4VIS_USE.
|
||||
- Move instantiation of G4UIExecutive to start of main.
|
||||
- vis.mac, gui.mac: Clean up.
|
||||
|
||||
May 09, 2018 B.Morgan - fieldex05-V10-04-00
|
||||
- Include G4Types before use of G4MULTITHREADED. For forward
|
||||
compatibility with move to #defines over -D for G4 preprocessor
|
||||
symbols.
|
||||
|
||||
Nov 03, 2016 L.Garnier - fieldex05-V10-02-01
|
||||
- remove icons.mac. Automatically include since interfaces-V10-02-07
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: field05.cc 78053 2013-12-03 08:25:13Z gcosmo $
|
||||
// $Id: field05.cc 110102 2018-05-15 11:32:36Z gcosmo $
|
||||
//
|
||||
/// \file field/field05/field05.cc
|
||||
/// \brief Main program of the field/field05 example
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
@@ -54,18 +56,19 @@
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Choose the Random engine
|
||||
//
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
@@ -97,39 +100,30 @@ int main(int argc,char** argv)
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Initialize visualization
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc!=1) // batch mode
|
||||
|
||||
if (!ui) // batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else
|
||||
{ // interactive mode : define UI session
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
#ifdef G4VIS_USE
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
#else
|
||||
UImanager->ApplyCommand("/control/execute field05.in");
|
||||
#endif
|
||||
if (ui->IsGUI())
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Job termination
|
||||
@@ -137,9 +131,7 @@ int main(int argc,char** argv)
|
||||
// owned and deleted by the run manager, so they should not
|
||||
// be deleted in the main() program !
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-04-patch-02 (25-May-2018)
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
|
||||
# It has no effect with G4UIterminal.
|
||||
#
|
||||
# Process vis.mac (and draw geometry)
|
||||
#
|
||||
/control/execute vis.mac
|
||||
#
|
||||
# File menu :
|
||||
/gui/addMenu file File
|
||||
/gui/addButton file Quit exit
|
||||
|
||||
@@ -8,18 +8,12 @@
|
||||
/control/saveHistory
|
||||
/run/verbose 2
|
||||
#
|
||||
# create empty scene
|
||||
#
|
||||
/vis/scene/create
|
||||
#
|
||||
# Create a scene handler for a specific graphics system
|
||||
# (Edit the next line(s) to choose another graphic system)
|
||||
#
|
||||
# Use this open statement instead for OpenGL in immediate mode.
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Output an empty detector
|
||||
#/vis/viewer/flush
|
||||
# Draw detector
|
||||
/vis/drawVolume
|
||||
#
|
||||
# Draw trajectories at end of event, showing trajectory points as
|
||||
# markers of size 2 pixels
|
||||
|
||||
Reference in New Issue
Block a user