Import Geant4 10.5.1 source tree

This commit is contained in:
Gabriele Cosmo
2019-04-17 10:39:02 +02:00
parent a7fdc52004
commit 28a70706e0
661 changed files with 55791 additions and 106984 deletions
@@ -61,6 +61,7 @@ G4SDManager::~G4SDManager()
delete theMessenger;
delete HCtable;
delete treeTop;
DestroyFilters();
theMessenger = nullptr;
HCtable = nullptr;
treeTop = nullptr;
@@ -149,4 +150,32 @@ G4int G4SDManager::GetCollectionID(G4VHitsCollection* aHC)
return GetCollectionID(HCname);
}
void G4SDManager::RegisterSDFilter(G4VSDFilter* filter)
{
FilterList.push_back(filter);
}
void G4SDManager::DeRegisterSDFilter(G4VSDFilter* filter)
{
for(auto f = FilterList.begin(); f != FilterList.end(); f++)
{
if(*f == filter)
{
FilterList.erase(f);
break;
}
}
}
void G4SDManager::DestroyFilters()
{
auto f = FilterList.begin();
while( f != FilterList.end() )
{
if(verboseLevel>0) G4cout << "### deleting " << (*f)->GetName() << " " << (*f) << G4endl;
delete *f;
f = FilterList.begin();
}
FilterList.clear();
}
@@ -52,7 +52,7 @@ G4SDStructure::~G4SDStructure()
detector.clear();
}
G4int G4SDStructure::operator==(const G4SDStructure &right) const
G4bool G4SDStructure::operator==(const G4SDStructure &right) const
{
return (this==&right);
}
@@ -63,12 +63,12 @@
//Equality Operations
G4int G4SensitiveVolumeList::operator==(const G4SensitiveVolumeList &right) const
G4bool G4SensitiveVolumeList::operator==(const G4SensitiveVolumeList &right) const
{
return (this == (G4SensitiveVolumeList *) &right);
}
G4int G4SensitiveVolumeList::operator!=(const G4SensitiveVolumeList &right) const
G4bool G4SensitiveVolumeList::operator!=(const G4SensitiveVolumeList &right) const
{
return (this != (G4SensitiveVolumeList *) &right);
}
@@ -94,10 +94,10 @@ G4VReadOutGeometry & G4VReadOutGeometry::operator=(const G4VReadOutGeometry &rig
return *this;
}
G4int G4VReadOutGeometry::operator==(const G4VReadOutGeometry &right) const
G4bool G4VReadOutGeometry::operator==(const G4VReadOutGeometry &right) const
{ return (this == (G4VReadOutGeometry *) &right); }
G4int G4VReadOutGeometry::operator!=(const G4VReadOutGeometry &right) const
G4bool G4VReadOutGeometry::operator!=(const G4VReadOutGeometry &right) const
{ return (this != (G4VReadOutGeometry *) &right); }
void G4VReadOutGeometry::BuildROGeometry()
@@ -27,10 +27,16 @@
//
// G4VSensitiveDetector
#include "G4VSDFilter.hh"
#include "G4SDManager.hh"
G4VSDFilter::G4VSDFilter(G4String name)
:filterName(name)
{;}
{
G4SDManager::GetSDMpointer()->RegisterSDFilter(this);
}
G4VSDFilter::~G4VSDFilter()
{;}
{
G4SDManager::GetSDMpointer()->DeRegisterSDFilter(this);
}
@@ -88,12 +88,12 @@ G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveDetecto
return *this;
}
G4int G4VSensitiveDetector::operator==(const G4VSensitiveDetector &right) const
G4bool G4VSensitiveDetector::operator==(const G4VSensitiveDetector &right) const
{
return (this==&right);
}
G4int G4VSensitiveDetector::operator!=(const G4VSensitiveDetector &right) const
G4bool G4VSensitiveDetector::operator!=(const G4VSensitiveDetector &right) const
{
return (this!=&right);
}