Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -81,7 +81,7 @@ class G4HCofThisEvent
|
||||
// Returns the number of hits collections which are stored in this class
|
||||
// object.
|
||||
public:
|
||||
inline G4int GetCapacity()
|
||||
inline size_t GetCapacity()
|
||||
{
|
||||
return HC->size();
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ template <class T> class G4THitsCollection : public 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)
|
||||
inline size_t insert(T* aHit)
|
||||
{
|
||||
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
|
||||
std::vector<T*>*theHitsCollection = (std::vector<T*>*)theCollection;
|
||||
@@ -103,7 +103,7 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
}
|
||||
// Insert a hit object. Total number of hit objects stored in this
|
||||
// collection is returned.
|
||||
inline G4int entries() const
|
||||
inline size_t entries() const
|
||||
{
|
||||
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
|
||||
std::vector<T*>*theHitsCollection = (std::vector<T*>*)theCollection;
|
||||
@@ -120,8 +120,8 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
virtual size_t GetSize() const
|
||||
{
|
||||
if (!anHCAllocator_G4MT_TLS_()) anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
|
||||
return ((std::vector<T*>*)theCollection)->size(); }
|
||||
|
||||
return ((std::vector<T*>*)theCollection)->size();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T> inline void* G4THitsCollection<T>::operator new(size_t)
|
||||
|
||||
@@ -152,7 +152,7 @@ public: // with description
|
||||
{ return (Map_t*)theCollection; }
|
||||
// Overwrite a hit object. Total number of hit objects stored in this
|
||||
// map is returned.
|
||||
inline G4int entries() const
|
||||
inline size_t entries() const
|
||||
{ return ((Map_t*)theCollection)->size(); }
|
||||
// Returns the number of hit objects stored in this map
|
||||
inline void clear();
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<is_same_t(U, T) && ! is_mmap_t(MapU_t), int> = 0>
|
||||
G4int add(const G4int& key, U*& aHit) const
|
||||
size_t add(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) == theHitsMap->end())
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U*& aHit) const
|
||||
size_t add(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
theHitsMap->insert(pair_t(key, aHit));
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U*& aHit) const
|
||||
size_t add(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = allocate();
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) == theHitsMap->end())
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(! is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) == theHitsMap->end())
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
theHitsMap->insert(pair_t(key, new T(aHit)));
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = allocate();
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U*& aHit) const
|
||||
inline size_t set(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end())
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U*& aHit) const
|
||||
inline size_t set(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end())
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int & key, U*& aHit) const
|
||||
inline size_t set(const G4int & key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = nullptr;
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U*& aHit) const
|
||||
inline size_t set(const G4int& key, U*& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = allocate();
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U& aHit) const
|
||||
inline size_t set(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = nullptr;
|
||||
@@ -376,7 +376,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U& aHit) const
|
||||
inline size_t set(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
if(theHitsMap->find(key) != theHitsMap->end())
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && ! is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int & key, U& aHit) const
|
||||
inline size_t set(const G4int & key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = nullptr;
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
template <typename U = T,
|
||||
typename MapU_t = Map_t,
|
||||
enable_if_t<(!is_same_t(U, T) && is_mmap_t(MapU_t)), int> = 0>
|
||||
inline G4int set(const G4int& key, U& aHit) const
|
||||
inline size_t set(const G4int& key, U& aHit) const
|
||||
{
|
||||
map_type* theHitsMap = GetMap();
|
||||
T* hit = allocate();
|
||||
|
||||
@@ -148,14 +148,14 @@ public:
|
||||
|
||||
// Overwrite a hit object. Total number of hit objects stored in this
|
||||
// map is returned.
|
||||
inline G4int entries() const
|
||||
inline std::size_t entries() const
|
||||
{ return (scast(Vector_t*)(theCollection))->size(); }
|
||||
|
||||
// Returns the number of hit objects stored in this map
|
||||
inline void clear();
|
||||
|
||||
virtual G4VHit* GetHit(size_t) const { return nullptr; }
|
||||
virtual size_t GetSize() const
|
||||
virtual G4VHit* GetHit(std::size_t) const { return nullptr; }
|
||||
virtual std::size_t GetSize() const
|
||||
{ return (scast(Vector_t*)(theCollection))->size(); }
|
||||
|
||||
inline map_t* GetMap() const;
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< is_same_t(U, T), int> = 0>
|
||||
G4int add(const G4int& key, U*& aHit) const
|
||||
std::size_t add(const G4int& key, U*& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
_add(theHitsVector, key, *aHit);
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< !is_same_t(U, T), int> = 0>
|
||||
G4int add(const G4int& key, U*& aHit) const
|
||||
std::size_t add(const G4int& key, U*& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
store_type hit = allocate();
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< is_same_t(U, T), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
std::size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
_add(theHitsVector, key, aHit);
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< !is_same_t(U, T), int> = 0>
|
||||
G4int add(const G4int& key, U& aHit) const
|
||||
std::size_t add(const G4int& key, U& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
_add(theHitsVector, key, aHit);
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< is_same_t(U, T), int> = 0>
|
||||
inline G4int set(const G4int& key, U*& aHit) const
|
||||
inline std::size_t set(const G4int& key, U*& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
_assign(theHitsVector, key, aHit);
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< !is_same_t(U, T), int> = 0>
|
||||
inline G4int set(const G4int & key, U*& aHit) const
|
||||
inline std::size_t set(const G4int & key, U*& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
store_type hit = allocate();
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< is_same_t(U, T), int> = 0>
|
||||
inline G4int set(const G4int& key, U& aHit) const
|
||||
inline std::size_t set(const G4int& key, U& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
_assign(theHitsVector, key, &aHit);
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
//------------------------------------------------------------------------//
|
||||
template <typename U = T,
|
||||
enable_if_t< !is_same_t(U, T), int> = 0>
|
||||
inline G4int set(const G4int & key, U& aHit) const
|
||||
inline std::size_t set(const G4int & key, U& aHit) const
|
||||
{
|
||||
vector_type* theHitsVector = GetVector(key);
|
||||
store_type hit = allocate();
|
||||
@@ -627,7 +627,7 @@ G4VTHitsVector<T, Vector_t>::GetMap() const
|
||||
G4ThreadLocalStatic map_t* theHitsMap = new map_t();
|
||||
theHitsMap->clear();
|
||||
vector_type* theHitsVector = GetVector();
|
||||
for(G4int i = 0; i < theHitsVector->size(); ++i)
|
||||
for(std::size_t i = 0; i < theHitsVector->size(); ++i)
|
||||
{
|
||||
store_type& _obj = (*theHitsVector)[i];
|
||||
if(_obj)
|
||||
|
||||
@@ -61,9 +61,9 @@ class G4VHitsCollection
|
||||
G4int colID;
|
||||
|
||||
public:
|
||||
inline G4String& GetName()
|
||||
inline const G4String& GetName() const
|
||||
{ return collectionName; }
|
||||
inline G4String& GetSDname()
|
||||
inline const G4String& GetSDname() const
|
||||
{ return SDname; }
|
||||
inline void SetColID(G4int i)
|
||||
{ colID = i; }
|
||||
|
||||
Reference in New Issue
Block a user