Geant4 10.7.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 52 of file G3RotTable.hh.

Constructor & Destructor Documentation

◆ G3RotTable()

G3RotTable::G3RotTable ( )

Definition at line 32 of file G3RotTable.cc.

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

◆ ~G3RotTable()

G3RotTable::~G3RotTable ( )
virtual

Definition at line 37 of file G3RotTable.cc.

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

Member Function Documentation

◆ Clear()

void G3RotTable::Clear ( )

Definition at line 58 of file G3RotTable.cc.

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

◆ Get()

G4RotationMatrix * G3RotTable::Get ( G4int  id) const

Definition at line 43 of file G3RotTable.cc.

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

Referenced by G3toG4BuildPVTree(), and GetTransform3D().

◆ Put()

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

Definition at line 52 of file G3RotTable.cc.

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

Referenced by G4gsrotm().


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