Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
+7 -9
View File
@@ -1,12 +1,10 @@
# - G4digits_hits category build
# Add (private) allocation export symbol
add_definitions(-DG4DIGI_ALLOC_EXPORT)
geant4_global_library_target(NAME G4digits_hits
COMPONENTS
detector/sources.cmake
digits/sources.cmake
hits/sources.cmake
scorer/sources.cmake
utils/sources.cmake)
include(detector/sources.cmake)
include(digits/sources.cmake)
include(hits/sources.cmake)
include(scorer/sources.cmake)
include(utils/sources.cmake)
geant4_add_category(G4digits_hits MODULES G4detector G4digits G4hits G4detscorer G4detutils)
+17 -14
View File
@@ -1,20 +1,23 @@
-------------------------------------------------------------------
# Category digits_hits History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
## 2022-01-28 Ben Morgan (digits_hits-V11-00-02)
- Replace `geant4_global_library_target` with direct file inclusion and
call to `geant4_add_category` to define library build from source modules.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2021-12-15 Ben Morgan (digits_hits-V11-00-01)
- Canonicalize implementations of custom `new` and `delete` operators that use `G4Allocator`
- Remove un-needed/duplicated checks on static allocator creation in member functions
## 2021-12-10 Ben Morgan (digits_hits-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
October 25th, 2021 B.Morgan (digits_hits-V10-07-03)
- Use G4StrUtil functions replacing deprecated G4String member functions
+10 -14
View File
@@ -1,20 +1,16 @@
-------------------------------------------------------------------
# Category det History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2021-12-10 Ben Morgan (det-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
August 9th, 2021 I. Hrivnacova (det-V10-07-01)
- Updated G4TScoreHistFiller for changes in the analysis category:
+10 -14
View File
@@ -1,20 +1,16 @@
-------------------------------------------------------------------
# Category detdigits History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2021-12-10 Ben Morgan (detdigits-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
October 4, 03 G.Cosmo
- Imported from digits+hits directory.
@@ -92,22 +92,16 @@ extern G4DLLIMPORT G4Allocator<G4DCofThisEvent>*& anDCoTHAllocator_G4MT_TLS_();
inline void* G4DCofThisEvent::operator new(size_t)
{
if(!anDCoTHAllocator_G4MT_TLS_())
if(anDCoTHAllocator_G4MT_TLS_() == nullptr)
{
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
G4Allocator<G4DCofThisEvent>& anDCoTHAllocator =
*anDCoTHAllocator_G4MT_TLS_();
void* anDCoTH;
anDCoTH = (void*) anDCoTHAllocator.MallocSingle();
return anDCoTH;
}
return (void*) anDCoTHAllocator_G4MT_TLS_()->MallocSingle();
}
inline void G4DCofThisEvent::operator delete(void* anDCoTH)
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
G4Allocator<G4DCofThisEvent>& anDCoTHAllocator =
*anDCoTHAllocator_G4MT_TLS_();
anDCoTHAllocator.FreeSingle((G4DCofThisEvent*) anDCoTH);
anDCoTHAllocator_G4MT_TLS_()->FreeSingle((G4DCofThisEvent*) anDCoTH);
}
#endif
@@ -87,22 +87,16 @@ class G4TDigiCollection : public G4DigiCollection
public: // with description
inline T* operator[](size_t i) const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return (*((std::vector<T*>*) theCollection))[i];
}
// Returns a pointer to a concrete digi object.
inline std::vector<T*>* GetVector() const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return (std::vector<T*>*) theCollection;
}
// Returns a collection vector.
inline size_t insert(T* aHit)
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = (std::vector<T*>*) theCollection;
theDigiCollection->push_back(aHit);
return theDigiCollection->size();
@@ -111,8 +105,6 @@ class G4TDigiCollection : public G4DigiCollection
// collection is returned.
inline size_t entries() const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = (std::vector<T*>*) theCollection;
return theDigiCollection->size();
}
@@ -121,14 +113,10 @@ class G4TDigiCollection : public G4DigiCollection
public:
virtual G4VDigi* GetDigi(size_t i) const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return (*((std::vector<T*>*) theCollection))[i];
}
virtual size_t GetSize() const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return ((std::vector<T*>*) theCollection)->size();
}
};
@@ -136,31 +124,22 @@ class G4TDigiCollection : public G4DigiCollection
template <class T>
inline void* G4TDigiCollection<T>::operator new(size_t)
{
if(!aDCAllocator_G4MT_TLS_())
if(aDCAllocator_G4MT_TLS_() == nullptr)
{
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
G4Allocator<G4DigiCollection>& aDCAllocator = *aDCAllocator_G4MT_TLS_();
void* aDC;
aDC = (void*) aDCAllocator.MallocSingle();
return aDC;
}
return (void*) aDCAllocator_G4MT_TLS_()->MallocSingle();
}
template <class T>
inline void G4TDigiCollection<T>::operator delete(void* aDC)
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
G4Allocator<G4DigiCollection>& aDCAllocator = *aDCAllocator_G4MT_TLS_();
;
;
;
aDCAllocator.FreeSingle((G4DigiCollection*) aDC);
aDCAllocator_G4MT_TLS_()->FreeSingle((G4DigiCollection*) aDC);
}
template <class T>
G4TDigiCollection<T>::G4TDigiCollection()
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = new std::vector<T*>;
theCollection = (void*) theDigiCollection;
}
@@ -169,9 +148,6 @@ template <class T>
G4TDigiCollection<T>::G4TDigiCollection(G4String detName, G4String colNam)
: G4DigiCollection(detName, colNam)
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = new std::vector<T*>;
theCollection = (void*) theDigiCollection;
}
@@ -179,10 +155,8 @@ G4TDigiCollection<T>::G4TDigiCollection(G4String detName, G4String colNam)
template <class T>
G4TDigiCollection<T>::~G4TDigiCollection()
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = (std::vector<T*>*) theCollection;
// theDigiCollection->clearAndDestroy();
for(size_t i = 0; i < theDigiCollection->size(); i++)
{
delete(*theDigiCollection)[i];
@@ -194,16 +168,12 @@ G4TDigiCollection<T>::~G4TDigiCollection()
template <class T>
G4bool G4TDigiCollection<T>::operator==(const G4TDigiCollection<T>& right) const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return (collectionName == right.collectionName);
}
template <class T>
void G4TDigiCollection<T>::DrawAllDigi()
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = (std::vector<T*>*) theCollection;
size_t n = theDigiCollection->size();
for(size_t i = 0; i < n; i++)
@@ -215,8 +185,6 @@ void G4TDigiCollection<T>::DrawAllDigi()
template <class T>
void G4TDigiCollection<T>::PrintAllDigi()
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
std::vector<T*>* theDigiCollection = (std::vector<T*>*) theCollection;
size_t n = theDigiCollection->size();
for(size_t i = 0; i < n; i++)
@@ -37,15 +37,11 @@ G4Allocator<G4DCofThisEvent>*& anDCoTHAllocator_G4MT_TLS_()
G4DCofThisEvent::G4DCofThisEvent()
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
DC = new std::vector<G4VDigiCollection*>;
}
G4DCofThisEvent::G4DCofThisEvent(G4int cap)
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
DC = new std::vector<G4VDigiCollection*>;
for(G4int i = 0; i < cap; i++)
{
@@ -55,9 +51,6 @@ G4DCofThisEvent::G4DCofThisEvent(G4int cap)
G4DCofThisEvent::~G4DCofThisEvent()
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
// DC->clearAndDestroy();
for(size_t i = 0; i < DC->size(); i++)
{
delete(*DC)[i];
@@ -68,8 +61,6 @@ G4DCofThisEvent::~G4DCofThisEvent()
void G4DCofThisEvent::AddDigiCollection(G4int DCID, G4VDigiCollection* aDC)
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
if(DCID >= 0 && DCID < G4int(DC->size()))
{
(*DC)[DCID] = aDC;
@@ -78,8 +69,6 @@ void G4DCofThisEvent::AddDigiCollection(G4int DCID, G4VDigiCollection* aDC)
G4DCofThisEvent::G4DCofThisEvent(const G4DCofThisEvent& rhs)
{
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
DC = new std::vector<G4VDigiCollection*>(rhs.DC->size());
for(unsigned int i = 0; i < rhs.DC->size(); ++i)
*(DC->at(i)) = *(rhs.DC->at(i));
@@ -89,8 +78,7 @@ G4DCofThisEvent& G4DCofThisEvent::operator=(const G4DCofThisEvent& rhs)
{
if(this == &rhs)
return *this;
if(!anDCoTHAllocator_G4MT_TLS_())
anDCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4DCofThisEvent>;
for(std::vector<G4VDigiCollection*>::const_iterator it = DC->begin();
it != DC->end(); ++it)
{
@@ -36,31 +36,17 @@ G4Allocator<G4DigiCollection>*& aDCAllocator_G4MT_TLS_()
G4DigiCollection::G4DigiCollection()
: theCollection((void*) 0)
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
;
}
{}
G4DigiCollection::G4DigiCollection(G4String detName, G4String colNam)
: G4VDigiCollection(detName, colNam)
, theCollection((void*) 0)
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
;
}
{}
G4DigiCollection::~G4DigiCollection()
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
;
}
{}
G4bool G4DigiCollection::operator==(const G4DigiCollection& right) const
{
if(!aDCAllocator_G4MT_TLS_())
aDCAllocator_G4MT_TLS_() = new G4Allocator<G4DigiCollection>;
return (collectionName == right.collectionName);
}
+10 -14
View File
@@ -1,20 +1,16 @@
-------------------------------------------------------------------
# Category dethits History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2021-12-10 Ben Morgan (dethits-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
October 4, 03 G.Cosmo
- Imported from digits+hits directory.
@@ -93,34 +93,16 @@ extern G4DLLIMPORT G4Allocator<G4HCofThisEvent>*& anHCoTHAllocator_G4MT_TLS_();
inline void* G4HCofThisEvent::operator new(size_t)
{
;
;
;
if(!anHCoTHAllocator_G4MT_TLS_())
if(anHCoTHAllocator_G4MT_TLS_() == nullptr)
{
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
G4Allocator<G4HCofThisEvent>& anHCoTHAllocator =
*anHCoTHAllocator_G4MT_TLS_();
;
;
;
void* anHCoTH;
anHCoTH = (void*) anHCoTHAllocator.MallocSingle();
return anHCoTH;
}
return (void*) anHCoTHAllocator_G4MT_TLS_()->MallocSingle();
}
inline void G4HCofThisEvent::operator delete(void* anHCoTH)
{
;
;
;
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
G4Allocator<G4HCofThisEvent>& anHCoTHAllocator =
*anHCoTHAllocator_G4MT_TLS_();
;
;
;
anHCoTHAllocator.FreeSingle((G4HCofThisEvent*) anHCoTH);
anHCoTHAllocator_G4MT_TLS_()->FreeSingle((G4HCofThisEvent*) anHCoTH);
}
#endif
@@ -88,22 +88,16 @@ class G4THitsCollection : public G4HitsCollection
public: // with description
inline T* operator[](size_t i) const
{
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>;
return (std::vector<T*>*) theCollection;
}
// Returns a collection vector.
inline size_t insert(T* aHit)
{
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();
@@ -112,8 +106,6 @@ class G4THitsCollection : public G4HitsCollection
// collection is returned.
inline size_t entries() const
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*>* theHitsCollection = (std::vector<T*>*) theCollection;
return theHitsCollection->size();
}
@@ -122,14 +114,10 @@ class G4THitsCollection : public G4HitsCollection
public:
virtual G4VHit* GetHit(size_t i) const
{
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>;
return ((std::vector<T*>*) theCollection)->size();
}
};
@@ -137,34 +125,22 @@ class G4THitsCollection : public G4HitsCollection
template <class T>
inline void* G4THitsCollection<T>::operator new(size_t)
{
if(!anHCAllocator_G4MT_TLS_())
if(anHCAllocator_G4MT_TLS_() == nullptr)
{
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
G4Allocator<G4HitsCollection>& anHCAllocator = *anHCAllocator_G4MT_TLS_();
;
;
;
void* anHC;
anHC = (void*) anHCAllocator.MallocSingle();
return anHC;
}
return (void*) anHCAllocator_G4MT_TLS_()->MallocSingle();
}
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_();
;
;
;
anHCAllocator.FreeSingle((G4HitsCollection*) anHC);
anHCAllocator_G4MT_TLS_()->FreeSingle((G4HitsCollection*) anHC);
}
template <class T>
G4THitsCollection<T>::G4THitsCollection()
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*>* theHitsCollection = new std::vector<T*>;
theCollection = (void*) theHitsCollection;
}
@@ -173,8 +149,6 @@ template <class T>
G4THitsCollection<T>::G4THitsCollection(G4String detName, G4String colNam)
: G4HitsCollection(detName, colNam)
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
std::vector<T*>* theHitsCollection = new std::vector<T*>;
theCollection = (void*) theHitsCollection;
}
@@ -182,8 +156,6 @@ G4THitsCollection<T>::G4THitsCollection(G4String detName, G4String colNam)
template <class T>
G4THitsCollection<T>::~G4THitsCollection()
{
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)
@@ -197,16 +169,12 @@ G4THitsCollection<T>::~G4THitsCollection()
template <class T>
G4bool G4THitsCollection<T>::operator==(const G4THitsCollection<T>& right) const
{
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>;
std::vector<T*>* theHitsCollection = (std::vector<T*>*) theCollection;
size_t n = theHitsCollection->size();
for(size_t i = 0; i < n; ++i)
@@ -218,8 +186,6 @@ void G4THitsCollection<T>::DrawAllHits()
template <class T>
void G4THitsCollection<T>::PrintAllHits()
{
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)
+1 -13
View File
@@ -36,15 +36,11 @@ G4Allocator<G4HCofThisEvent>*& anHCoTHAllocator_G4MT_TLS_()
G4HCofThisEvent::G4HCofThisEvent()
{
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
HC = new std::vector<G4VHitsCollection*>;
}
G4HCofThisEvent::G4HCofThisEvent(G4int cap)
{
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
HC = new std::vector<G4VHitsCollection*>;
for(G4int i = 0; i < cap; i++)
{
@@ -54,9 +50,6 @@ G4HCofThisEvent::G4HCofThisEvent(G4int cap)
G4HCofThisEvent::~G4HCofThisEvent()
{
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
// HC->clearAndDestroy();
for(size_t i = 0; i < HC->size(); i++)
{
delete(*HC)[i];
@@ -67,8 +60,6 @@ G4HCofThisEvent::~G4HCofThisEvent()
void G4HCofThisEvent::AddHitsCollection(G4int HCID, G4VHitsCollection* aHC)
{
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
if(HCID >= 0 && HCID < G4int(HC->size()))
{
aHC->SetColID(HCID);
@@ -78,8 +69,6 @@ void G4HCofThisEvent::AddHitsCollection(G4int HCID, G4VHitsCollection* aHC)
G4HCofThisEvent::G4HCofThisEvent(const G4HCofThisEvent& rhs)
{
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
HC = new std::vector<G4VHitsCollection*>(rhs.HC->size());
for(unsigned int i = 0; i < rhs.HC->size(); ++i)
*(HC->at(i)) = *(rhs.HC->at(i));
@@ -89,8 +78,7 @@ G4HCofThisEvent& G4HCofThisEvent::operator=(const G4HCofThisEvent& rhs)
{
if(this == &rhs)
return *this;
if(!anHCoTHAllocator_G4MT_TLS_())
anHCoTHAllocator_G4MT_TLS_() = new G4Allocator<G4HCofThisEvent>;
for(std::vector<G4VHitsCollection*>::const_iterator it = HC->begin();
it != HC->end(); ++it)
{
@@ -36,31 +36,17 @@ G4Allocator<G4HitsCollection>*& anHCAllocator_G4MT_TLS_()
G4HitsCollection::G4HitsCollection()
: theCollection((void*) 0)
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
;
}
{}
G4HitsCollection::G4HitsCollection(G4String detName, G4String colNam)
: G4VHitsCollection(detName, colNam)
, theCollection((void*) 0)
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
;
}
{}
G4HitsCollection::~G4HitsCollection()
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
;
}
{}
G4bool G4HitsCollection::operator==(const G4HitsCollection& right) const
{
if(!anHCAllocator_G4MT_TLS_())
anHCAllocator_G4MT_TLS_() = new G4Allocator<G4HitsCollection>;
return (collectionName == right.collectionName);
}
+10 -14
View File
@@ -1,20 +1,16 @@
-------------------------------------------------------------------
# Category detscorer History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2021-12-10 Ben Morgan (detscorer-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
September 27th, 2021 M. Asai (detscorer-V10-07-01)
- Fix indexing of cylindrical scoring mesh commands.
+12 -15
View File
@@ -1,23 +1,20 @@
# Category detutil History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
October 17th, 2022 M. Asai (detutil-V10-07-07)
## 2022-05-17 Makoto Asai (detutil-V11-00-01)
- G4VScoringMesh.hh : Fixing virtual keyword.
## 2021-12-10 Ben Morgan (detutil-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
October 7th, 2021 I. Hrivnacova (detutil-V10-07-06)
- Updated G4TScoreNtupleWriter for changes in the analysis category:
added fDefaultFileType (with default value "root") and its setter