Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GeometryWorkspacePool.hh 106171 2017-09-15 13:02:56Z gcosmo $
|
||||
// $Id: G4GeometryWorkspacePool.hh 110271 2018-05-17 14:41:15Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -66,7 +66,7 @@ class G4GeometryWorkspacePool
|
||||
// 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; }
|
||||
inline G4GeometryWorkspace* GetWorkspace() { return fMyWorkspace(); }
|
||||
// Give back the existing, active workspace for my thread / task
|
||||
|
||||
void Recycle( G4GeometryWorkspace * );
|
||||
@@ -96,7 +96,7 @@ class G4GeometryWorkspacePool
|
||||
// for tbb.
|
||||
// Further development: template parameter with portable default
|
||||
|
||||
G4GEOM_DLL static G4ThreadLocal G4GeometryWorkspace* fMyWorkspace;
|
||||
G4GEOM_DLL static G4GeometryWorkspace*& fMyWorkspace();
|
||||
// The thread's workspace - if assigned.
|
||||
};
|
||||
|
||||
|
||||
@@ -24,15 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NavigationHistory.icc 86527 2014-11-13 15:06:24Z gcosmo $
|
||||
// $Id: G4NavigationHistory.icc 110271 2018-05-17 14:41:15Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4NavigationHistory Inline implementation
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4ThreadLocal
|
||||
G4Allocator<G4NavigationHistory> *aNavigHistoryAllocator;
|
||||
extern G4GEOM_DLL G4Allocator<G4NavigationHistory>*& aNavigHistoryAllocator();
|
||||
|
||||
// There is no provision that this class is subclassed.
|
||||
// If it is subclassed & new data members are added then the
|
||||
@@ -41,17 +40,17 @@ G4Allocator<G4NavigationHistory> *aNavigHistoryAllocator;
|
||||
inline
|
||||
void* G4NavigationHistory::operator new(size_t)
|
||||
{
|
||||
if (!aNavigHistoryAllocator)
|
||||
if (!aNavigHistoryAllocator())
|
||||
{
|
||||
aNavigHistoryAllocator = new G4Allocator<G4NavigationHistory>;
|
||||
aNavigHistoryAllocator() = new G4Allocator<G4NavigationHistory>;
|
||||
}
|
||||
return (void *) aNavigHistoryAllocator->MallocSingle();
|
||||
return (void *) aNavigHistoryAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4NavigationHistory::operator delete(void *aHistory)
|
||||
{
|
||||
aNavigHistoryAllocator->FreeSingle((G4NavigationHistory *) aHistory);
|
||||
aNavigHistoryAllocator()->FreeSingle((G4NavigationHistory *) aHistory);
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
@@ -24,14 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NavigationLevel.icc 86527 2014-11-13 15:06:24Z gcosmo $
|
||||
// $Id: G4NavigationLevel.icc 110271 2018-05-17 14:41:15Z gcosmo $
|
||||
//
|
||||
// 30.09.97 J.Apostolakis Initial version.
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4ThreadLocal
|
||||
G4Allocator<G4NavigationLevel> *aNavigationLevelAllocator;
|
||||
extern G4GEOM_DLL G4Allocator<G4NavigationLevel>*& aNavigationLevelAllocator();
|
||||
|
||||
inline
|
||||
G4VPhysicalVolume* G4NavigationLevel::GetPhysicalVolume() const
|
||||
@@ -69,11 +68,11 @@ G4int G4NavigationLevel::GetReplicaNo() const
|
||||
inline
|
||||
void* G4NavigationLevel::operator new(size_t)
|
||||
{
|
||||
if (!aNavigationLevelAllocator)
|
||||
if (!aNavigationLevelAllocator())
|
||||
{
|
||||
aNavigationLevelAllocator = new G4Allocator<G4NavigationLevel>;
|
||||
aNavigationLevelAllocator() = new G4Allocator<G4NavigationLevel>;
|
||||
}
|
||||
return (void *) aNavigationLevelAllocator->MallocSingle();
|
||||
return (void *) aNavigationLevelAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
// Added for use by STL (used for pre-allocation).
|
||||
@@ -87,7 +86,7 @@ void* G4NavigationLevel::operator new(size_t,void *a)
|
||||
inline
|
||||
void G4NavigationLevel::operator delete(void *aLevel)
|
||||
{
|
||||
aNavigationLevelAllocator->FreeSingle((G4NavigationLevel *) aLevel);
|
||||
aNavigationLevelAllocator()->FreeSingle((G4NavigationLevel *) aLevel);
|
||||
}
|
||||
|
||||
// Added for use by STL (used for free-ing pre-allocated?).
|
||||
|
||||
@@ -24,14 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NavigationLevelRep.icc 87590 2014-12-11 14:30:29Z gcosmo $
|
||||
// $Id: G4NavigationLevelRep.icc 110271 2018-05-17 14:41:15Z gcosmo $
|
||||
//
|
||||
// 1 October 1997 J.Apostolakis Initial version.
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4ThreadLocal
|
||||
G4Allocator<G4NavigationLevelRep> *aNavigLevelRepAllocator;
|
||||
extern G4GEOM_DLL G4Allocator<G4NavigationLevelRep>*& aNavigLevelRepAllocator();
|
||||
|
||||
// Constructors
|
||||
//--------------
|
||||
@@ -172,15 +171,15 @@ G4bool G4NavigationLevelRep::RemoveAReference()
|
||||
inline
|
||||
void* G4NavigationLevelRep::operator new(size_t)
|
||||
{
|
||||
if (!aNavigLevelRepAllocator)
|
||||
if (!aNavigLevelRepAllocator())
|
||||
{
|
||||
aNavigLevelRepAllocator = new G4Allocator<G4NavigationLevelRep>;
|
||||
aNavigLevelRepAllocator() = new G4Allocator<G4NavigationLevelRep>;
|
||||
}
|
||||
return (void *) aNavigLevelRepAllocator->MallocSingle();
|
||||
return (void *) aNavigLevelRepAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4NavigationLevelRep::operator delete(void *aLevelRep)
|
||||
{
|
||||
aNavigLevelRepAllocator->FreeSingle((G4NavigationLevelRep *) aLevelRep);
|
||||
aNavigLevelRepAllocator()->FreeSingle((G4NavigationLevelRep *) aLevelRep);
|
||||
}
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TouchableHistory.icc 86527 2014-11-13 15:06:24Z gcosmo $
|
||||
// $Id: G4TouchableHistory.icc 110271 2018-05-17 14:41:15Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4TouchableHistory inline implementation
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4ThreadLocal G4Allocator<G4TouchableHistory> *aTouchableHistoryAllocator;
|
||||
extern G4GEOM_DLL G4Allocator<G4TouchableHistory>*& aTouchableHistoryAllocator();
|
||||
|
||||
inline
|
||||
void G4TouchableHistory::UpdateYourself( G4VPhysicalVolume* pPhysVol,
|
||||
const G4NavigationHistory* pHistory )
|
||||
{
|
||||
fhistory = *pHistory;
|
||||
G4AffineTransform tf(fhistory.GetTopTransform().Inverse());
|
||||
void G4TouchableHistory::UpdateYourself( G4VPhysicalVolume* pPhysVol,
|
||||
const G4NavigationHistory* pHistory )
|
||||
{
|
||||
fhistory = *pHistory;
|
||||
const G4AffineTransform& tf = fhistory.GetTopTransform();
|
||||
if( pPhysVol == 0 )
|
||||
{
|
||||
// This means that the track has left the World Volume.
|
||||
@@ -46,8 +46,8 @@ void G4TouchableHistory::UpdateYourself( G4VPhysicalVolume* pPhysVol,
|
||||
//
|
||||
fhistory.SetFirstEntry(pPhysVol);
|
||||
}
|
||||
ftlate = tf.NetTranslation();
|
||||
frot = tf.NetRotation();
|
||||
ftlate = tf.InverseNetTranslation();
|
||||
frot = tf.InverseNetRotation();
|
||||
}
|
||||
|
||||
inline
|
||||
@@ -117,16 +117,16 @@ void* G4TouchableHistory::operator new(size_t)
|
||||
// Once the Navigator calls InitializeAllocator,
|
||||
// the if block below can be removed.
|
||||
//
|
||||
if (!aTouchableHistoryAllocator)
|
||||
if (!aTouchableHistoryAllocator())
|
||||
{
|
||||
aTouchableHistoryAllocator = new G4Allocator<G4TouchableHistory>;
|
||||
aTouchableHistoryAllocator() = new G4Allocator<G4TouchableHistory>;
|
||||
}
|
||||
return (void *) aTouchableHistoryAllocator->MallocSingle();
|
||||
return (void *) aTouchableHistoryAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4TouchableHistory::operator delete(void *aTH)
|
||||
{
|
||||
aTouchableHistoryAllocator->FreeSingle((G4TouchableHistory *) aTH);
|
||||
aTouchableHistoryAllocator()->FreeSingle((G4TouchableHistory *) aTH);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user