Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
+17 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G3RotTable.cc,v 1.13.2.1 2001/06/28 19:08:04 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G3RotTable.cc,v 1.15 2001/07/16 15:38:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// by I.Hrivnacova, 27 Sep 99
@@ -36,13 +36,12 @@ G3RotTable::G3RotTable()
G3RotTable::~G3RotTable()
{
fRotVector->clear();
//fRotVector->clearAndDestroy();
delete fRotVector;
}
G4RotationMatrix* G3RotTable::Get(G4int id) const
{
for (size_t i=0; i<fRotVector->entries(); i++) {
for (size_t i=0; i<fRotVector->size(); i++) {
G3RotTableEntry* rte = (*fRotVector)[i];
if (id == rte->GetID()) return rte->GetMatrix();
}
@@ -52,10 +51,22 @@ G4RotationMatrix* G3RotTable::Get(G4int id) const
void G3RotTable::Put(G4int id, G4RotationMatrix* matrix)
{
G3RotTableEntry* rte = new G3RotTableEntry(id, matrix);
fRotVector->insert(rte);
fRotVector->push_back(rte);
}
void G3RotTable::Clear()
{
fRotVector->clearAndDestroy();
G3RotTableEntry* a;
while (fRotVector->size()>0) {
a = fRotVector->back();
fRotVector->pop_back();
for (G3RotMatrixVector::iterator i=fRotVector->begin();
i!=fRotVector->end(); i++){
if (*i==a) {
fRotVector->erase(i);
i--;
}
}
if ( a ) delete a;
}
}