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
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4THitsCollection.hh 67992 2013-03-13 10:59:57Z gcosmo $
// $Id: G4THitsCollection.hh 110274 2018-05-17 14:44:24Z gcosmo $
//
#ifndef G4THitsCollection_h
@@ -59,9 +59,9 @@ class G4HitsCollection : public G4VHitsCollection
};
#if defined G4DIGI_ALLOC_EXPORT
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4HitsCollection> *anHCAllocator_G4MT_TLS_;
extern G4DLLEXPORT G4Allocator<G4HitsCollection>*& anHCAllocator_G4MT_TLS_();
#else
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4HitsCollection> *anHCAllocator_G4MT_TLS_;
extern G4DLLIMPORT G4Allocator<G4HitsCollection>*& anHCAllocator_G4MT_TLS_();
#endif
template <class T> class G4THitsCollection : public G4HitsCollection
@@ -86,18 +86,18 @@ template <class T> class G4THitsCollection : public G4HitsCollection
public: // with description
inline T* operator[](size_t i) const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return (*((std::vector<T*>*)theCollection))[i];
}
// Returns a pointer to a concrete hit object.
inline std::vector<T*>* GetVector() const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return (std::vector<T*>*)theCollection; }
// Returns a collection vector.
inline G4int insert(T* aHit)
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*>*theHitsCollection = (std::vector<T*>*)theCollection;
theHitsCollection->push_back(aHit);
return theHitsCollection->size();
@@ -106,7 +106,7 @@ template <class T> class G4THitsCollection : public G4HitsCollection
// collection is returned.
inline G4int entries() const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*>*theHitsCollection = (std::vector<T*>*)theCollection;
return theHitsCollection->size();
}
@@ -115,20 +115,20 @@ template <class T> class G4THitsCollection : public G4HitsCollection
public:
virtual G4VHit* GetHit(size_t i) const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return (*((std::vector<T*>*)theCollection))[i];
}
virtual size_t GetSize() const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return ((std::vector<T*>*)theCollection)->size(); }
};
template <class T> inline void* G4THitsCollection<T>::operator new(size_t)
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
G4Allocator<G4HitsCollection> &anHCAllocator = *anHCAllocator_G4MT_TLS_; ;;;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
G4Allocator<G4HitsCollection> &anHCAllocator = *anHCAllocator_G4MT_TLS_(); ;;;
void* anHC;
anHC = (void*)anHCAllocator.MallocSingle();
return anHC;
@@ -136,14 +136,14 @@ template <class T> inline void* G4THitsCollection<T>::operator new(size_t)
template <class T> inline void G4THitsCollection<T>::operator delete(void* anHC)
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
G4Allocator<G4HitsCollection> &anHCAllocator = *anHCAllocator_G4MT_TLS_; ;;;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
G4Allocator<G4HitsCollection> &anHCAllocator = *anHCAllocator_G4MT_TLS_(); ;;;
anHCAllocator.FreeSingle((G4HitsCollection*)anHC);
}
template <class T> G4THitsCollection<T>::G4THitsCollection()
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*> * theHitsCollection = new std::vector<T*>;
theCollection = (void*)theHitsCollection;
}
@@ -151,14 +151,14 @@ template <class T> G4THitsCollection<T>::G4THitsCollection()
template <class T> G4THitsCollection<T>::G4THitsCollection(G4String detName,G4String colNam)
: G4HitsCollection(detName,colNam)
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*> * theHitsCollection = new std::vector<T*>;
theCollection = (void*)theHitsCollection;
}
template <class T> G4THitsCollection<T>::~G4THitsCollection()
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*> * theHitsCollection = (std::vector<T*>*)theCollection;
//theHitsCollection->clearAndDestroy();
for(size_t i=0;i<theHitsCollection->size();i++)
@@ -169,13 +169,13 @@ template <class T> G4THitsCollection<T>::~G4THitsCollection()
template <class T> G4int G4THitsCollection<T>::operator==(const G4THitsCollection<T> &right) const
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return (collectionName==right.collectionName);
}
template <class T> void G4THitsCollection<T>::DrawAllHits()
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*> * theHitsCollection = (std::vector<T*>*)theCollection;
size_t n = theHitsCollection->size();
for(size_t i=0;i<n;i++)
@@ -184,7 +184,7 @@ template <class T> void G4THitsCollection<T>::DrawAllHits()
template <class T> void G4THitsCollection<T>::PrintAllHits()
{
if (!anHCAllocator_G4MT_TLS_) anHCAllocator_G4MT_TLS_ = new G4Allocator<G4HitsCollection>;
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*> * theHitsCollection
= (std::vector<T*>*)theCollection;
size_t n = theHitsCollection->size();