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