#include <G3RotTable.hh>
Public Member Functions | |
G3RotTable () | |
virtual | ~G3RotTable () |
G4RotationMatrix * | Get (G4int id) const |
void | Put (G4int id, G4RotationMatrix *matrix) |
void | Clear () |
Definition at line 53 of file G3RotTable.hh.
G3RotTable::G3RotTable | ( | ) |
Definition at line 33 of file G3RotTable.cc.
00034 { 00035 fRotVector = new G3RotMatrixVector(); 00036 }
G3RotTable::~G3RotTable | ( | ) | [virtual] |
void G3RotTable::Clear | ( | ) |
Definition at line 59 of file G3RotTable.cc.
00060 { 00061 G3RotTableEntry* a; 00062 while (fRotVector->size()>0) { 00063 a = fRotVector->back(); 00064 fRotVector->pop_back(); 00065 for (G3RotMatrixVector::iterator i=fRotVector->begin(); 00066 i!=fRotVector->end();){ 00067 if (*i==a) { 00068 i = fRotVector->erase(i); 00069 } 00070 else { 00071 ++i; 00072 } 00073 } 00074 if ( a ) delete a; 00075 } 00076 }
G4RotationMatrix * G3RotTable::Get | ( | G4int | id | ) | const |
Definition at line 44 of file G3RotTable.cc.
Referenced by G3toG4BuildPVTree(), and GetTransform3D().
00045 { 00046 for (size_t i=0; i<fRotVector->size(); i++) { 00047 G3RotTableEntry* rte = (*fRotVector)[i]; 00048 if (id == rte->GetID()) return rte->GetMatrix(); 00049 } 00050 return 0; 00051 }
void G3RotTable::Put | ( | G4int | id, | |
G4RotationMatrix * | matrix | |||
) |
Definition at line 53 of file G3RotTable.cc.
Referenced by G4gsrotm().
00054 { 00055 G3RotTableEntry* rte = new G3RotTableEntry(id, matrix); 00056 fRotVector->push_back(rte); 00057 }