Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
+40 -12
View File
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4SolidStore.cc,v 1.5 2000/09/11 11:09:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4SolidStore.cc,v 1.6.2.1 2001/06/28 19:08:31 gunter Exp $
// GEANT4 tag $Name: $
//
// G4SolidStore
//
@@ -20,15 +36,20 @@
// Protected constructor: Construct underlying container with
// initial size of 100 entries
G4SolidStore::G4SolidStore() : G4RWTPtrOrderedVector<G4VSolid>(100)
G4SolidStore::G4SolidStore()
: G4std::vector<G4VSolid*>()
{
reserve(100);
}
// Destructor
G4SolidStore::~G4SolidStore()
{
while (!isEmpty()) removeFirst();
// clearAndDestroy();
while (!empty())
{
// delete front();
erase(begin());
}
}
// Static class variable
@@ -37,13 +58,20 @@ G4SolidStore* G4SolidStore::fgInstance = 0;
// Add Solid to container
void G4SolidStore::Register(G4VSolid* pSolid)
{
GetInstance()->insert(pSolid);
GetInstance()->push_back(pSolid);
}
// Remove Solid from container
void G4SolidStore::DeRegister(G4VSolid* pSolid)
{
GetInstance()->remove(pSolid);
for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
{
if (**i==*pSolid)
{
GetInstance()->erase(i);
break;
}
}
}
// Return ptr to Store, setting if necessary