Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
$Id: History 101727 2016-11-23 08:49:05Z gcosmo $
$Id: History 103236 2017-03-22 15:54:40Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,20 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
March 22, 2017 - G.Cosmo (geomnav-V10-03-04)
------------------------
- Avoid eletion of field-manager pointer in destructor of
G4TransportationManager, as it is being deleted by G4FieldManagerStore.
March 21, 2017 - G.Cosmo (geomnav-V10-03-03, 02, 01)
------------------------
- Provide simple accessor GetInstanceIfExist() for G4PathFinder and
G4TransportationManager singletons.
March 17, 2017 - G.Cosmo (geomnav-V10-03-00)
------------------------
- Correction in destructors of G4TransportationManager and G4PathFinder.
October 23, 2016 - G.Cosmo (geomnav-V10-02-21)
--------------------------
- Fixed recursion test in G4GeomTestVolume to iterate on all daughters.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PathFinder.hh 87869 2015-01-16 08:24:36Z gcosmo $
// $Id: G4PathFinder.hh 103219 2017-03-22 11:30:15Z gcosmo $
//
// class G4PathFinder
//
@@ -65,7 +65,11 @@ class G4PathFinder
static G4PathFinder* GetInstance();
//
// Retrieve singleton instance
// Retrieve singleton instance and create it if not existing.
static G4PathFinder* GetInstanceIfExist();
//
// Retrieve singleton instance pointer.
G4double ComputeStep( const G4FieldTrack &pFieldTrack,
G4double pCurrentProposedStepLength,
@@ -171,6 +175,9 @@ class G4PathFinder
G4String& LimitedString( ELimited lim );
// Convert ELimited to string
~G4PathFinder();
// Destructor
protected: // without description
G4double DoNextLinearStep( const G4FieldTrack &FieldTrack,
@@ -199,7 +206,6 @@ class G4PathFinder
protected:
G4PathFinder(); // Singleton
~G4PathFinder();
inline G4Navigator* GetNavigator(G4int n) const;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.hh 83466 2014-08-25 10:31:39Z gcosmo $
// $Id: G4TransportationManager.hh 103219 2017-03-22 11:30:15Z gcosmo $
//
// class G4TransportationManager
//
@@ -60,6 +60,8 @@ class G4TransportationManager
static G4TransportationManager* GetTransportationManager();
// Retrieve the static instance
static G4TransportationManager* GetInstanceIfExist();
// Retrieve singleton instance pointer.
inline G4PropagatorInField* GetPropagatorInField() const;
inline void SetPropagatorInField( G4PropagatorInField* newFieldPropagator );
@@ -115,11 +117,13 @@ class G4TransportationManager
// associated with parallel worlds. Internal method called only
// by the RunManager when the entire geometry is rebuilt from scratch.
~G4TransportationManager();
// Destructor
protected:
G4TransportationManager();
~G4TransportationManager();
// Singleton. Protected constructor and destructor
// Singleton. Protected constructor
private:
@@ -1003,6 +1003,7 @@ G4double G4Navigator::ComputeStep( const G4ThreeVector &pGlobalpoint,
if ((!fPushed) && (fWarnPush))
{
std::ostringstream message;
message.precision(16);
message << "Track stuck or not moving." << G4endl
<< " Track stuck, not moving for "
<< fNumberZeroSteps << " steps" << G4endl
+13 -3
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4PathFinder.cc 90009 2015-05-08 07:42:39Z gcosmo $
// $Id: G4PathFinder.cc 103219 2017-03-22 11:30:15Z gcosmo $
// GEANT4 tag $ Name: $
//
// class G4PathFinder Implementation
@@ -52,7 +52,7 @@ G4ThreadLocal G4PathFinder* G4PathFinder::fpPathFinder=0;
// ----------------------------------------------------------------------------
// GetInstance()
//
// Retrieve the static instance of the singleton
// Retrieve the static instance of the singleton and create it if not existing
//
G4PathFinder* G4PathFinder::GetInstance()
{
@@ -63,6 +63,16 @@ G4PathFinder* G4PathFinder::GetInstance()
return fpPathFinder;
}
// ----------------------------------------------------------------------------
// GetInstanceIfExist()
//
// Retrieve the static instance pointer of the singleton
//
G4PathFinder* G4PathFinder::GetInstanceIfExist()
{
return fpPathFinder;
}
// ----------------------------------------------------------------------------
// Constructor
//
@@ -115,7 +125,7 @@ G4PathFinder::G4PathFinder()
G4PathFinder::~G4PathFinder()
{
delete fpMultiNavigator;
if (fpPathFinder) { delete fpPathFinder; fpPathFinder=0; }
fpPathFinder = 0;
}
// ----------------------------------------------------------------------------
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.cc 83466 2014-08-25 10:31:39Z gcosmo $
// $Id: G4TransportationManager.cc 103236 2017-03-22 15:54:40Z gcosmo $
//
//
// G4TransportationManager
@@ -71,7 +71,7 @@ G4TransportationManager::G4TransportationManager()
fWorlds.push_back(trackingNavigator->GetWorldVolume()); // NULL registered
fGeomMessenger = new G4GeometryMessenger(this);
fFieldManager = new G4FieldManager();
fFieldManager = new G4FieldManager(); // deleted by G4FieldManagerStore
fPropagatorInField= new G4PropagatorInField(trackingNavigator,fFieldManager);
fSafetyHelper = new G4SafetyHelper();
}
@@ -81,21 +81,17 @@ G4TransportationManager::G4TransportationManager()
//
G4TransportationManager::~G4TransportationManager()
{
delete fFieldManager;
delete fPropagatorInField;
ClearNavigators();
delete fGeomMessenger;
delete fSafetyHelper;
if (fTransportationManager)
{
delete fTransportationManager; fTransportationManager=0;
}
delete fPropagatorInField;
delete fGeomMessenger;
ClearNavigators();
fTransportationManager = 0;
}
// ----------------------------------------------------------------------------
// GetTransportationManager()
//
// Retrieve the static instance of the singleton
// Retrieve the static instance of the singleton and create it if not existing
//
G4TransportationManager* G4TransportationManager::GetTransportationManager()
{
@@ -106,6 +102,16 @@ G4TransportationManager* G4TransportationManager::GetTransportationManager()
return fTransportationManager;
}
// ----------------------------------------------------------------------------
// GetInstanceIfExist()
//
// Retrieve the static instance pointer of the singleton
//
G4TransportationManager* G4TransportationManager::GetInstanceIfExist()
{
return fTransportationManager;
}
// ----------------------------------------------------------------------------
// SetFieldManager()
//