Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 77780 2013-11-28 07:50:59Z gcosmo $
|
||||
$Id: History 88801 2015-03-10 14:38:27Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,11 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
March 10th, 2015 G.Cosmo (geombias-V10-01-00)
|
||||
- Made G4IStore and G4WeightWindowStore singletons thread-local to avoid
|
||||
data races when accessing iterators.
|
||||
Use const references for string in argument for constructor and accessor.
|
||||
|
||||
November 27th, 2013 A.Howard (geombias-V09-06-10)
|
||||
- Added Clear() method to G4IStore and G4WeightWindowStore to allow changes to
|
||||
the store within a run, if required.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IStore.hh 77780 2013-11-28 07:50:59Z gcosmo $
|
||||
// $Id: G4IStore.hh 88801 2015-03-10 14:38:27Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4IStore
|
||||
@@ -68,23 +68,23 @@ public:
|
||||
static G4IStore* GetInstance();
|
||||
// Return ptr to singleton instance of the class.
|
||||
// static G4ThreadLocal G4IStore* GetInstance(G4String ParallelWorldName);
|
||||
static G4IStore* GetInstance(G4String ParallelWorldName);
|
||||
static G4IStore* GetInstance(const G4String& ParallelWorldName);
|
||||
// Return ptr to singleton instance of the class.
|
||||
|
||||
protected:
|
||||
|
||||
explicit G4IStore();
|
||||
// initialise the importance store for the given geometry
|
||||
explicit G4IStore(G4String ParallelWorldName);
|
||||
explicit G4IStore(const G4String& ParallelWorldName);
|
||||
// initialise the importance store for the given geometry
|
||||
|
||||
~G4IStore();
|
||||
// destruct
|
||||
|
||||
public: // with description
|
||||
|
||||
virtual ~G4IStore();
|
||||
// destruct
|
||||
|
||||
virtual G4double GetImportance(const G4GeometryCell &gCell) const;
|
||||
// derive a importance value of a "cell" addresed by a G4GeometryCell
|
||||
// derive an importance value of a "cell" addressed by a G4GeometryCell
|
||||
// from the store.
|
||||
|
||||
virtual G4bool IsKnown(const G4GeometryCell &gCell) const;
|
||||
@@ -143,9 +143,7 @@ private:
|
||||
|
||||
mutable G4GeometryCellImportance::const_iterator fCurrentIterator;
|
||||
|
||||
// static G4ThreadLocal G4IStore* fInstance;
|
||||
static G4IStore* fInstance;
|
||||
|
||||
static G4ThreadLocal G4IStore* fInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightWindowStore.hh 77780 2013-11-28 07:50:59Z gcosmo $
|
||||
// $Id: G4WeightWindowStore.hh 88801 2015-03-10 14:38:27Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4WeightWindowStore
|
||||
@@ -63,21 +63,21 @@ public: // with description
|
||||
static G4WeightWindowStore* GetInstance();
|
||||
// Return ptr to singleton instance of the class.
|
||||
|
||||
static G4WeightWindowStore* GetInstance(G4String ParallelWorldName);
|
||||
static G4WeightWindowStore* GetInstance(const G4String& ParallelWorldName);
|
||||
// Return ptr to singleton instance of the class.
|
||||
|
||||
protected:
|
||||
|
||||
explicit G4WeightWindowStore();
|
||||
// initialise the weight window store for the given geometry
|
||||
explicit G4WeightWindowStore(G4String ParallelWorldName);
|
||||
explicit G4WeightWindowStore(const G4String& ParallelWorldName);
|
||||
// initialise the weight window store for the given geometry
|
||||
|
||||
public: // with description
|
||||
|
||||
virtual ~G4WeightWindowStore();
|
||||
~G4WeightWindowStore();
|
||||
// destructor
|
||||
|
||||
public: // with description
|
||||
|
||||
virtual G4double GetLowerWeight(const G4GeometryCell &gCell,
|
||||
G4double partEnergy) const;
|
||||
// derive a lower weight bound value of a "cell" addresed by a
|
||||
@@ -130,7 +130,7 @@ private:
|
||||
G4GeometryCellWeight fCellToUpEnBoundLoWePairsMap;
|
||||
mutable G4GeometryCellWeight::const_iterator fCurrentIterator;
|
||||
|
||||
static G4WeightWindowStore* fInstance;
|
||||
static G4ThreadLocal G4WeightWindowStore* fInstance;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IStore.cc 77780 2013-11-28 07:50:59Z gcosmo $
|
||||
// $Id: G4IStore.cc 88801 2015-03-10 14:38:27Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -43,14 +43,13 @@
|
||||
// ***************************************************************************
|
||||
// Static class variable: ptr to single instance of class
|
||||
// ***************************************************************************
|
||||
//G4ThreadLocal
|
||||
G4IStore* G4IStore::fInstance = 0;
|
||||
G4ThreadLocal G4IStore* G4IStore::fInstance = 0;
|
||||
|
||||
G4IStore::G4IStore() :
|
||||
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume())
|
||||
{}
|
||||
|
||||
G4IStore::G4IStore(G4String ParallelWorldName) :
|
||||
G4IStore::G4IStore(const G4String& ParallelWorldName) :
|
||||
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName))
|
||||
{
|
||||
G4cout << " G4IStore:: ParallelWorldName = " << ParallelWorldName << G4endl;
|
||||
@@ -223,7 +222,7 @@ G4IStore* G4IStore::GetInstance()
|
||||
// Creates it in case it's called for the first time.
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4IStore* G4IStore::GetInstance(G4String ParallelWorldName)
|
||||
G4IStore* G4IStore::GetInstance(const G4String& ParallelWorldName)
|
||||
{
|
||||
if (!fInstance)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightWindowStore.cc 77780 2013-11-28 07:50:59Z gcosmo $
|
||||
// $Id: G4WeightWindowStore.cc 88801 2015-03-10 14:38:27Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -43,10 +43,7 @@
|
||||
// ***************************************************************************
|
||||
// Static class variable: ptr to single instance of class
|
||||
// ***************************************************************************
|
||||
//G4ThreadLocal
|
||||
G4WeightWindowStore* G4WeightWindowStore::fInstance = 0;
|
||||
|
||||
|
||||
G4ThreadLocal G4WeightWindowStore* G4WeightWindowStore::fInstance = 0;
|
||||
|
||||
G4WeightWindowStore::
|
||||
G4WeightWindowStore() :
|
||||
@@ -57,7 +54,7 @@ fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorFo
|
||||
{}
|
||||
|
||||
G4WeightWindowStore::
|
||||
G4WeightWindowStore(G4String ParallelWorldName) :
|
||||
G4WeightWindowStore(const G4String& ParallelWorldName) :
|
||||
fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName)),
|
||||
fGeneralUpperEnergyBounds(),
|
||||
fCellToUpEnBoundLoWePairsMap(),
|
||||
@@ -243,7 +240,7 @@ G4WeightWindowStore* G4WeightWindowStore::GetInstance()
|
||||
// Creates it in case it's called for the first time.
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4WeightWindowStore* G4WeightWindowStore::GetInstance(G4String ParallelWorldName)
|
||||
G4WeightWindowStore* G4WeightWindowStore::GetInstance(const G4String& ParallelWorldName)
|
||||
{
|
||||
if (!fInstance)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user