Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
// This code implementation is the intellectual property of
// the RD44 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: G3RotTable.cc,v 2.0 1998/07/02 16:16:20 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "globals.hh"
#include "G4RotationMatrix.hh"
#include "G3RotTable.hh"
RWBoolean RotTableMatch(const RotTableEntry *RotTentry, const void *pt)
{
G4int rotid;
rotid = *((G4int*) pt);
if (RotTentry->rotid == rotid)
{
return TRUE;
} else {
return FALSE;
}
}
G3RotTable::G3RotTable()
{
RotTable = &RotT;
}
G3RotTable::~G3RotTable()
{
while (! RotTable->isEmpty()) {
RotTableEntry *RotTentry = RotTable->last();
RotTable->removeReference(RotTentry);
delete RotTentry;
}
delete RotTable;
}
G4RotationMatrix *G3RotTable::get(G4int rotid)
{
const void *pt;
if ( rotid == 0 ) return NULL;
pt = &rotid;
RotTableEntry *RotTentry = RotTable->find(RotTableMatch, pt);
if (RotTentry == NULL) {
return NULL;
} else {
return RotTentry->rotpt;
}
}
void G3RotTable::put(G4int *rotid, G4RotationMatrix *rotpt)
{
RotTableEntry *RotTentry = new RotTableEntry;
RotTentry->rotid = *rotid;
RotTentry->rotpt = rotpt;
RotTable->append(RotTentry);
}