Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user