Geant4-11
Public Member Functions | Private Attributes
G3RotTable Class Reference

#include <G3RotTable.hh>

Public Member Functions

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

Private Attributes

G3RotMatrixVectorfRotVector
 

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{
35}
std::vector< G3RotTableEntry * > G3RotMatrixVector
Definition: G3RotTable.hh:48
G3RotMatrixVector * fRotVector
Definition: G3RotTable.hh:67

References fRotVector.

◆ ~G3RotTable()

G3RotTable::~G3RotTable ( )
virtual

Definition at line 37 of file G3RotTable.cc.

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

References fRotVector.

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}

References fRotVector.

◆ 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

References fRotVector, G3RotTableEntry::GetID(), and G3RotTableEntry::GetMatrix().

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}

References fRotVector.

Referenced by G4gsrotm().

Field Documentation

◆ fRotVector

G3RotMatrixVector* G3RotTable::fRotVector
private

Definition at line 67 of file G3RotTable.hh.

Referenced by Clear(), G3RotTable(), Get(), Put(), and ~G3RotTable().


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