Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4KDNode.hh 108498 2018-02-15 15:33:07Z gcosmo $
// $Id: G4KDNode.hh 108087 2017-12-21 09:00:58Z gcosmo $
//
// Author: Mathieu Karamitros
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4KDTree.hh 102616 2017-02-10 07:57:14Z gcosmo $
// $Id: G4KDTree.hh 110873 2018-06-22 13:11:22Z gcosmo $
//
// Author: Mathieu Karamitros
@@ -271,7 +271,7 @@ protected:
int fNbActiveNodes;
G4KDMap* fKDMap;
G4ThreadLocalStatic G4Allocator<G4KDTree>* fgAllocator;
static G4Allocator<G4KDTree>*& fgAllocator();
};
#include "G4KDTree.icc"
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4KDTreeResult.hh 101354 2016-11-15 08:27:51Z gcosmo $
// $Id: G4KDTreeResult.hh 110873 2018-06-22 13:11:22Z gcosmo $
//
// Author: Mathieu Karamitros
@@ -120,20 +120,20 @@ public:
//------------------------------------------------------------------------------
#if defined G4EM_ALLOC_EXPORT
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4KDTreeResult> *aKDTreeAllocator;
extern G4DLLEXPORT G4Allocator<G4KDTreeResult>*& aKDTreeAllocator();
#else
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4KDTreeResult> *aKDTreeAllocator;
extern G4DLLIMPORT G4Allocator<G4KDTreeResult>*& aKDTreeAllocator();
#endif
inline void * G4KDTreeResult::operator new(size_t)
{
if (!aKDTreeAllocator) aKDTreeAllocator = new G4Allocator<G4KDTreeResult>;
return (void *) aKDTreeAllocator->MallocSingle();
if (!aKDTreeAllocator()) aKDTreeAllocator() = new G4Allocator<G4KDTreeResult>;
return (void *) aKDTreeAllocator()->MallocSingle();
}
inline void G4KDTreeResult::operator delete(void * object)
{
aKDTreeAllocator->FreeSingle((G4KDTreeResult *) object);
aKDTreeAllocator()->FreeSingle((G4KDTreeResult *) object);
}
//------------------------------------------------------------------------------
template<typename PointT>
@@ -43,7 +43,11 @@
using namespace std;
G4ThreadLocal G4Allocator<G4KDTree>* G4KDTree::fgAllocator(0);
G4Allocator<G4KDTree>*& G4KDTree::fgAllocator()
{
G4ThreadLocalStatic G4Allocator<G4KDTree>* _instance = nullptr;
return _instance;
}
//______________________________________________________________________
// KDTree methods
@@ -73,13 +77,13 @@ G4KDTree::~G4KDTree()
void* G4KDTree::operator new(size_t)
{
if (!fgAllocator) fgAllocator = new G4Allocator<G4KDTree>;
return (void *) fgAllocator->MallocSingle();
if (!fgAllocator()) fgAllocator() = new G4Allocator<G4KDTree>;
return (void *) fgAllocator()->MallocSingle();
}
void G4KDTree::operator delete(void *aNode)
{
fgAllocator->FreeSingle((G4KDTree*) aNode);
fgAllocator()->FreeSingle((G4KDTree*) aNode);
}
void G4KDTree::Print(std::ostream& out) const
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4KDTreeResult.cc 101354 2016-11-15 08:27:51Z gcosmo $
// $Id: G4KDTreeResult.cc 110873 2018-06-22 13:11:22Z gcosmo $
//
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
//
@@ -37,7 +37,11 @@
using namespace std;
G4ThreadLocal G4Allocator<G4KDTreeResult> *aKDTreeAllocator= 0;
G4Allocator<G4KDTreeResult>*& aKDTreeAllocator()
{
G4ThreadLocalStatic G4Allocator<G4KDTreeResult>* _instance = nullptr;
return _instance;
}
struct ResNode
{