Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G3RotTable Class Reference

#include <G3RotTable.hh>

Public Member Functions

 G3RotTable ()
 
virtual ~G3RotTable ()
 
G4RotationMatrixGet (G4int id) const
 
void Put (G4int id, G4RotationMatrix *matrix)
 
void Clear ()
 

Detailed Description

Definition at line 53 of file G3RotTable.hh.

Constructor & Destructor Documentation

◆ G3RotTable()

G3RotTable::G3RotTable ( )

Definition at line 33 of file G3RotTable.cc.

34{
35 fRotVector = new G3RotMatrixVector();
36}
std::vector< G3RotTableEntry * > G3RotMatrixVector
Definition: G3RotTable.hh:51

◆ ~G3RotTable()

G3RotTable::~G3RotTable ( )
virtual

Definition at line 38 of file G3RotTable.cc.

39{
40 fRotVector->clear();
41 delete fRotVector;
42}

Member Function Documentation

◆ Clear()

void G3RotTable::Clear ( )

Definition at line 59 of file G3RotTable.cc.

60{
62 while (fRotVector->size()>0) {
63 a = fRotVector->back();
64 fRotVector->pop_back();
65 for (G3RotMatrixVector::iterator i=fRotVector->begin();
66 i!=fRotVector->end();){
67 if (*i==a) {
68 i = fRotVector->erase(i);
69 }
70 else {
71 ++i;
72 }
73 }
74 if ( a ) delete a;
75 }
76}

◆ Get()

G4RotationMatrix * G3RotTable::Get ( G4int  id) const

Definition at line 44 of file G3RotTable.cc.

45{
46 for (size_t i=0; i<fRotVector->size(); i++) {
47 G3RotTableEntry* rte = (*fRotVector)[i];
48 if (id == rte->GetID()) return rte->GetMatrix();
49 }
50 return 0;
51}
G4RotationMatrix * GetMatrix() const
G4int GetID() const

Referenced by G3toG4BuildPVTree(), and GetTransform3D().

◆ Put()

void G3RotTable::Put ( G4int  id,
G4RotationMatrix matrix 
)

Definition at line 53 of file G3RotTable.cc.

54{
55 G3RotTableEntry* rte = new G3RotTableEntry(id, matrix);
56 fRotVector->push_back(rte);
57}

Referenced by G4gsrotm().


The documentation for this class was generated from the following files: