Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.

60 {
61  G3RotTableEntry* a;
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.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:


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