Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -1,4 +1,3 @@
//$Id$
///\file "parallel/TBB/.README.txt"
///\brief Examples TBB README page
@@ -1,4 +1,3 @@
//$Id$
///\file "parallel/TBB/B2b/.README.txt"
///\brief Example TBB/B2b README page
@@ -1,4 +1,3 @@
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
#----------------------------------------------------------------------------
# Setup the project
@@ -1,4 +1,3 @@
# $Id: GNUmakefile 68058 2013-03-13 14:47:43Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -1,4 +1,3 @@
$Id$
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file parallel/TBB/B2b/exampleB2b.cc
/// \brief Main program of the B2b example
@@ -42,13 +41,8 @@
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//TBB includes
#include <tbb/task_scheduler_init.h>
@@ -80,6 +74,12 @@ G4ThreadFunReturnType startWork(G4ThreadFunArgType arg)
int main(int argc,char** argv)
{
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
G4UIExecutive* ui = 0;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Choose the Random engine
G4Random::setTheEngine(new CLHEP::RanecuEngine);
@@ -120,7 +120,7 @@ int main(int argc,char** argv)
// 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];
@@ -132,22 +132,20 @@ int main(int argc,char** argv)
G4int nEvents= 50;
runManager->BeamOn(nEvents);
#else
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
UImanager->ApplyCommand("/control/execute init.mac");
if (ui->IsGUI())
UImanager->ApplyCommand("/control/execute gui.mac");
ui->SessionStart();
delete ui;
#endif
#endif
}
//END-G4
G4Thread aThread;
G4THREADCREATE(&aThread,startWork,static_cast<G4ThreadFunArgType>(&tasks));
G4Thread* aThread = new G4Thread;
G4THREADCREATE(aThread, startWork, static_cast<G4ThreadFunArgType>(&tasks));
//Wait for work to be finised
G4THREADJOIN(aThread);
if(aThread)
aThread->join();
delete runManager;
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B2ActionInitialization.hh
/// \brief Definition of the B2ActionInitialization class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2EventAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2EventAction.hh
/// \brief Definition of the B2EventAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2PrimaryGeneratorAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2PrimaryGeneratorAction.hh
/// \brief Definition of the B2PrimaryGeneratorAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2RunAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2RunAction.hh
/// \brief Definition of the B2RunAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2TrackerHit.hh 69505 2013-05-07 01:57:27Z asaim $
//
/// \file B2TrackerHit.hh
/// \brief Definition of the B2TrackerHit class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2TrackerSD.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2TrackerSD.hh
/// \brief Definition of the B2TrackerSD class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bChamberParameterisation.hh
/// \brief Definition of the B2bChamberParameterisation class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bDetectorConstruction.hh
/// \brief Definition of the B2bDetectorConstruction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bDetectorMessenger.hh
/// \brief Definition of the B2bDetectorMessenger class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B2ActionInitialization.cc
/// \brief Implementation of the B2ActionInitialization class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2EventAction.cc 69652 2013-05-10 09:05:11Z ihrivnac $
//
/// \file B2EventAction.cc
/// \brief Implementation of the B2EventAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2PrimaryGeneratorAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2PrimaryGeneratorAction.cc
/// \brief Implementation of the B2PrimaryGeneratorAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2RunAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2RunAction.cc
/// \brief Implementation of the B2RunAction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2TrackerHit.cc 69505 2013-05-07 01:57:27Z asaim $
//
/// \file B2TrackerHit.cc
/// \brief Implementation of the B2TrackerHit class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B2TrackerSD.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B2TrackerSD.cc
/// \brief Implementation of the B2TrackerSD class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bChamberParameterisation.cc
/// \brief Implementation of the B2bChamberParameterisation class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bDetectorConstruction.cc
/// \brief Implementation of the B2bDetectorConstruction class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
/// \file B2bDetectorMessenger.cc
/// \brief Implementation of the B2bDetectorMessenger class
@@ -44,7 +44,7 @@
SimpleTbbMasterRunManager::SimpleTbbMasterRunManager() :
G4MTRunManager(),
theTasks(static_cast<tbb::task_list*>(0)),
theTasks(static_cast<tbb::task_list*>(nullptr)),
nEvtsPerTask(1)
{
}
@@ -74,7 +74,7 @@ void SimpleTbbMasterRunManager::CreateAndStartWorkers()
void SimpleTbbMasterRunManager::CreateTask(G4int id,G4int evts)
{
tbbTask& task = * new(tbb::task::allocate_root())
tbbTask( id , NULL , evts ); //Add output for merging
tbbTask( id , nullptr , evts ); //Add output for merging
theTasks->push_back( task );
}
+7
View File
@@ -15,6 +15,13 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
25th Oct 2018 J. Madsen (tbbex-V10-04-01)
- Updated TBB example to work with migration from POSIX threads to C++11 threads
02 May 2018 J.Allison (tbbex-V10-04-00)
- Removed G4VIS_USE and G4UI_USE.
- Moved instantiation of G4UIExecutive to start of main.
19th Nov 2016 A. Dotti (tbbex-V10-02-03)
- Explict set of SD to manager