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
@@ -0,0 +1,92 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// class G4AssemblyStore
//
// Class description:
//
// Container for all assemblies, with functionality derived from
// std::vector<T>. The class is a `singleton', in that only
// one can exist, and access is provided via the static method
// G4AssemblyStore::GetInstance().
//
// All assemblies should be registered with G4AssemblyStore, and removed on
// their destruction. The underlying container initially has a capacity of 20.
//
// If much additional functionality is added, should consider containment
// instead of inheritance for std::vector<T>
//
// Member data:
//
// static G4AssemblyStore*
// - Pointer to the single G4AssemblyStore
// History:
// 9.10.18 G.Cosmo Initial version
// --------------------------------------------------------------------
#ifndef G4ASSEMBLYSTORE_HH
#define G4ASSEMBLYSTORE_HH
#include <vector>
#include "G4Types.hh"
#include "G4String.hh"
#include "G4VStoreNotifier.hh"
class G4AssemblyVolume;
class G4AssemblyStore : public std::vector<G4AssemblyVolume*>
{
public: // with description
static void Register(G4AssemblyVolume* pAssembly);
// Add the assembly to the collection.
static void DeRegister(G4AssemblyVolume* pAssembly);
// Remove the assembly from the collection.
static G4AssemblyStore* GetInstance();
// Get a ptr to the unique G4AssemblyStore, creating it if necessary.
static void SetNotifier(G4VStoreNotifier* pNotifier);
// Assign a notifier for allocation/deallocation of assemblies.
static void Clean();
// Delete all assemblies from the store.
G4AssemblyVolume* GetAssembly(unsigned int Id, G4bool verbose=true) const;
// Returns an assembly through its Id number specification.
protected:
G4AssemblyStore();
// Protected singleton constructor.
virtual ~G4AssemblyStore();
// Destructor: takes care to delete allocated assemblies.
private:
static G4AssemblyStore* fgInstance;
static G4ThreadLocal G4VStoreNotifier* fgNotifier;
static G4ThreadLocal G4bool locked;
};
#endif
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4AssemblyTriplet.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// Class G4AssemblyTriplet
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4AssemblyTriplet.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// Class G4AssemblyTriplet - inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4AssemblyVolume.hh 66872 2013-01-15 01:25:57Z japost $
//
//
// Class G4AssemblyVolume
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4AssemblyVolume.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// Class G4AssemblyVolume - inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4EnhancedVecAllocator.hh 80286 2014-04-10 09:48:48Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSSolid.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4GRSSolid
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSSolid.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4GRSSolid inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSSolidHandle.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// Class G4GRSSolidHandle
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSVolume.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4GRSVolume
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSVolume.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4GRSVolume inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GRSVolumeHandle.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// Class G4GRSVolumeHandle
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4GeometryWorkspace.hh 79096 2014-02-14 16:07:39Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -50,6 +49,7 @@
#ifndef G4GEOMETRYWORKSPACE_HH
#define G4GEOMETRYWORKSPACE_HH
#include "G4TWorkspacePool.hh"
#include "G4PVReplica.hh"
#include "G4PVParameterised.hh"
#include "G4VPVParameterisation.hh"
@@ -63,6 +63,7 @@ class G4GeometryWorkspace
{
public:
typedef G4TWorkspacePool<G4GeometryWorkspace> pool_type;
G4GeometryWorkspace();
~G4GeometryWorkspace();
@@ -75,6 +76,8 @@ class G4GeometryWorkspace
inline void SetVerbose(G4bool v) { fVerbose=v; }
inline G4bool GetVerbose() { return fVerbose; }
static pool_type* GetPool();
protected: // Implementation methods
@@ -1,103 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4GeometryWorkspacePool.hh 110271 2018-05-17 14:41:15Z gcosmo $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// Class Description:
//
// Create and recycle Workspaces
// Only one object of this type exists; true Singleton (not per thread).
// Author: John Apostolakis (CERN), December 2013
// ------------------------------------------------------------
#ifndef G4GEOMETRYWORKSPACEPOOL_HH
#define G4GEOMETRYWORKSPACEPOOL_HH
#include "geomwdefs.hh"
#include "G4Types.hh"
class G4GeometryWorkspace;
// Note: Investigate potential to make it a template - on the workspace type
class G4GeometryWorkspacePool
{
public:
static G4GeometryWorkspacePool* GetInstance();
G4GeometryWorkspace* CreateWorkspace();
// For use with simple MT mode
// Each thread gets a workspace and uses it until end
void CreateAndUseWorkspace();
// Create it (as above) and use it
G4GeometryWorkspace* FindOrCreateWorkspace();
// For use with 'dynamic' model of threading. Workspaces can be recycled.
// Reuse an existing workspace or create a new one if needed.
// This will never fail, except if system is out of resources
inline G4GeometryWorkspace* GetWorkspace() { return fMyWorkspace(); }
// Give back the existing, active workspace for my thread / task
void Recycle( G4GeometryWorkspace * );
// Keep the unused Workspace for recycling
void CleanUpAndDestroyAllWorkspaces();
// To be called once at the end of the job
protected:
// void RegisterWarehouse( G4GeometryWarehouse *);
// The (optional) warehouse keeps a list of free workspaces
private:
G4GeometryWorkspacePool();
~G4GeometryWorkspacePool();
private:
static G4GeometryWorkspacePool* thePool;
// void* fWarehouse;
// G4GeometryWarehouse* fWarehouse;
// This is "void" to hide the actual container type for workspaces
// Implementations: a simple STL container for MT or something better
// for tbb.
// Further development: template parameter with portable default
G4GEOM_DLL static G4GeometryWorkspace*& fMyWorkspace();
// The thread's workspace - if assigned.
};
#endif
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4LogicalBorderSurface.hh 80067 2014-03-31 13:48:09Z gcosmo $
//
// class G4LogicalBorderSurface
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4LogicalBorderSurface.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4LogicalBorderSurface inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4LogicalSkinSurface.hh 80067 2014-03-31 13:48:09Z gcosmo $
//
// class G4LogicalSkinSurface
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4LogicalSkinSurface.icc 66356 2012-12-18 09:02:32Z gcosmo $
//
//
// class G4LogicalSkinSurface inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationHistory.hh 86527 2014-11-13 15:06:24Z gcosmo $
//
// class G4NavigationHistory
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationHistory.icc 110271 2018-05-17 14:41:15Z gcosmo $
//
//
// class G4NavigationHistory Inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id:$
//
// class G4NavigationHistoryPool
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevel.hh 86527 2014-11-13 15:06:24Z gcosmo $
//
// class G4NavigationLevel
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevel.icc 110271 2018-05-17 14:41:15Z gcosmo $
//
// 30.09.97 J.Apostolakis Initial version.
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevelRep.hh 85846 2014-11-05 15:45:28Z gcosmo $
//
// class G4NavigationLevelRep
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevelRep.icc 110271 2018-05-17 14:41:15Z gcosmo $
//
// 1 October 1997 J.Apostolakis Initial version.
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4PVParameterised.hh 73250 2013-08-22 13:22:23Z gcosmo $
//
//
// class G4PVParameterised
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4PVPlacement.hh 85846 2014-11-05 15:45:28Z gcosmo $
//
//
// class G4PVPlacement
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4PVReplica.hh 85846 2014-11-05 15:45:28Z gcosmo $
//
//
// class G4PVReplica
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4ReflectionFactory.hh 66872 2013-01-15 01:25:57Z japost $
//
//
// class G4ReflectionFactory
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4TouchableHistory.hh 86527 2014-11-13 15:06:24Z gcosmo $
//
//
// class G4TouchableHistory
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4TouchableHistory.icc 110271 2018-05-17 14:41:15Z gcosmo $
//
//
// class G4TouchableHistory inline implementation
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4TouchableHistoryHandle.hh 66356 2012-12-18 09:02:32Z gcosmo $
//
// Class G4TouchableHistoryHandle
//