Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -40,7 +40,7 @@ target_link_libraries(field04 ${Geant4_LIBRARIES} )
# relies on these scripts being in the current working directory.
#
set(field04_SCRIPTS
field04.in field04.out vis.mac gui.mac icons.mac run.png
field04.in field04.out vis.mac gui.mac
)
foreach(_script ${field04_SCRIPTS})
+13
View File
@@ -15,6 +15,19 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 15, 2018 J.Allison - fieldex04-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 - fieldex04-V10-04-00
- Include G4Types before use of G4MULTITHREADED. For forward
compatibility with move to #defines over -D for G4 preprocessor
symbols.
Nov 02, 2016 L.Garnier (fieldex04-V10-02-03)
- remove icons.mac. Automatically include since interfaces-V10-02-07
Oct 14, 2016 P.Gumplinger - (fieldex04-V10-02-02)
- remove direct use of theParticleIterator, use GetParticleTableIterator().
fix required by clang39 on Linux and MAC
+10 -17
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: field04.cc 78551 2014-01-07 09:45:08Z gcosmo $
// $Id: field04.cc 110170 2018-05-17 07:28:42Z gcosmo $
//
/// \file field/field04/field04.cc
/// \brief Main program of the field/field04 example
@@ -43,6 +43,8 @@
#include <unistd.h>
#endif
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
@@ -59,13 +61,8 @@
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
// argc holds the number of arguments (including the name) on the command line
// -> it is ONE when only the name is given !!!
@@ -76,6 +73,12 @@
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);
@@ -129,14 +132,12 @@ 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
//
@@ -156,7 +157,7 @@ int main(int argc,char** argv)
}
}
#else // Simple UI for Windows runs, no possibility of additional arguments
if (argc!=1) // batch mode
if (!ui) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
@@ -165,10 +166,6 @@ int main(int argc,char** argv)
#endif
else
{
// Define (G)UI terminal for interactive mode
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
#ifdef G4VIS_USE
// UImanager->ApplyCommand("/control/execute vis.mac");
G4cout << "At the prompt, issue commands to set up detector & field, then:"
<< G4endl;
@@ -177,12 +174,10 @@ int main(int argc,char** argv)
G4cout << "/control/execute vis.mac" << G4endl;
G4cout << "Then: " << G4endl;
G4cout << "/run/beamOn … etc." << G4endl;
#endif
if (ui->IsGUI())
UImanager->ApplyCommand("/control/execute gui.mac");
ui->SessionStart();
delete ui;
#endif
}
// Job termination
@@ -190,9 +185,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;
File diff suppressed because it is too large Load Diff
-10
View File
@@ -3,14 +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
#
# Add icons of general interest
#
/control/execute icons.mac
#
# File menu :
/gui/addMenu file File
/gui/addButton file Quit exit
@@ -47,5 +39,3 @@
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
# User defined icon :
/gui/addIcon "Run beam on" user_icon "/run/beamOn 1" run.png
-26
View File
@@ -1,26 +0,0 @@
#
# This file permits to customize, with commands,
# the icon menu bar of the G4UIQt sessions not yet implemented other UI drivers (geant4-09-05-ref-09)
# It has no effect with G4UIterminal.
# open/save icons
/gui/addIcon "Open macro file" open /control/execute
/gui/addIcon "Save viewer state" save /vis/viewer/save
# Cursors style icons
/gui/addIcon "Move" move
/gui/addIcon "Pick" pick
/gui/addIcon "Zoom out" zoom_out
/gui/addIcon "Zoom in" zoom_in
/gui/addIcon "Rotate" rotate
# Surface Style icons
# Surface Style icons
/gui/addIcon "Hidden line removal" hidden_line_removal
/gui/addIcon "Hidden line and hidden surface removal" hidden_line_and_surface_removal
/gui/addIcon "Surfaces" solid
/gui/addIcon "Wireframe" wireframe
# Perspective/Ortho icons
/gui/addIcon "Perspective" perspective
/gui/addIcon "Orthographic" ortho
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

+3 -2
View File
@@ -10,6 +10,9 @@
#
/vis/open OGL 600x600-0+0
#
# Create an empty scene and add the detector geometry to it
/vis/drawVolume
#
#/vis/viewer/set/style surface
/vis/viewer/set/style wireframe
#
@@ -24,8 +27,6 @@
# /vis/scene/create
# /vis/scene/add/volume
# /vis/sceneHandler/attach
# Create an empty scene and add the detector geometry to it
/vis/drawVolume
#
# Store particle trajectories for visualization
# (if too many tracks cause core dump => storeTrajectory 0)