Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 ( )

Definition at line 33 of file G3RotTable.cc.

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

Definition at line 38 of file G3RotTable.cc.

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

Member Function Documentation

void G3RotTable::Clear ( )

Definition at line 59 of file G3RotTable.cc.

References test::a.

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 }
G4RotationMatrix * G3RotTable::Get ( G4int  id) const

Definition at line 44 of file G3RotTable.cc.

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

Referenced by G3toG4BuildPVTree(), and GetTransform3D().

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
void G3RotTable::Put ( G4int  id,
G4RotationMatrix matrix 
)

Definition at line 53 of file G3RotTable.cc.

Referenced by G4gsrotm().

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

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