Geant4  10.02.p03
G4tgbRotationMatrixMgr Class Reference

#include <G4tgbRotationMatrixMgr.hh>

Collaboration diagram for G4tgbRotationMatrixMgr:

Public Member Functions

 ~G4tgbRotationMatrixMgr ()
 
G4RotationMatrix * FindOrBuildG4RotMatrix (const G4String &name)
 
G4RotationMatrix * FindG4RotMatrix (const G4String &name)
 
G4tgbRotationMatrix * FindOrBuildTgbRotMatrix (const G4String &name)
 
G4tgbRotationMatrix * FindTgbRotMatrix (const G4String &name)
 
const G4mstgbrotm GetTgbRotMatList () const
 
const G4msg4rotm & GetG4RotMatList () const
 

Static Public Member Functions

static G4tgbRotationMatrixMgr * GetInstance ()
 

Private Member Functions

 G4tgbRotationMatrixMgr ()
 
void CopyRotMats ()
 

Private Attributes

G4mstgbrotm theTgbRotMats
 
G4msg4rotm theG4RotMats
 

Static Private Attributes

static G4ThreadLocal G4tgbRotationMatrixMgr * theInstance = 0
 

Detailed Description

Definition at line 56 of file G4tgbRotationMatrixMgr.hh.

Constructor & Destructor Documentation

◆ ~G4tgbRotationMatrixMgr()

G4tgbRotationMatrixMgr::~G4tgbRotationMatrixMgr ( )

Definition at line 66 of file G4tgbRotationMatrixMgr.cc.

67 {
68  G4mstgbrotm::const_iterator tgbcite;
69  for( tgbcite = theTgbRotMats.begin();
70  tgbcite != theTgbRotMats.end(); tgbcite++)
71  {
72  delete (*tgbcite).second;
73  }
74  theTgbRotMats.clear();
75  delete theInstance;
76 }
static G4ThreadLocal G4tgbRotationMatrixMgr * theInstance

◆ G4tgbRotationMatrixMgr()

G4tgbRotationMatrixMgr::G4tgbRotationMatrixMgr ( )
private

Definition at line 48 of file G4tgbRotationMatrixMgr.cc.

49 {
50 }
Here is the caller graph for this function:

Member Function Documentation

◆ CopyRotMats()

void G4tgbRotationMatrixMgr::CopyRotMats ( )
private

Definition at line 80 of file G4tgbRotationMatrixMgr.cc.

81 {
82  G4mstgrrotm tgrRotms =
84  G4mstgrrotm::iterator cite;
85  for( cite = tgrRotms.begin(); cite != tgrRotms.end(); cite++ )
86  {
87  G4tgrRotationMatrix* tgr = (*cite).second;
88  G4tgbRotationMatrix* tgb = new G4tgbRotationMatrix( tgr );
89  theTgbRotMats[tgb->GetName()] = tgb;
90  }
91 }
std::map< G4String, G4tgrRotationMatrix *> G4mstgrrotm
static G4tgrRotationMatrixFactory * GetInstance()
const G4mstgrrotm & GetRotMatMap() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindG4RotMatrix()

G4RotationMatrix * G4tgbRotationMatrixMgr::FindG4RotMatrix ( const G4String &  name)

Definition at line 117 of file G4tgbRotationMatrixMgr.cc.

118 {
119  G4RotationMatrix* g4rotm = 0;
120 
121  G4msg4rotm::const_iterator cite = theG4RotMats.find( name );
122  if( cite != theG4RotMats.end() )
123  {
124  g4rotm = (*cite).second;
125  }
126 
127 #ifdef G4VERBOSE
129  {
130  G4cout << " G4tgbRotationMatrixMgr::FindG4RotMatrix(): " << G4endl
131  << " Name: " << name << " = " << g4rotm << G4endl;
132  }
133 #endif
134 
135  return g4rotm;
136 }
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindOrBuildG4RotMatrix()

G4RotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix ( const G4String &  name)

Definition at line 96 of file G4tgbRotationMatrixMgr.cc.

97 {
98 #ifdef G4VERBOSE
100  {
101  G4cout << " G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix() - "
102  << name << G4endl;
103  }
104 #endif
105  G4RotationMatrix* g4rotm = FindG4RotMatrix( name );
106  if( g4rotm == 0 )
107  {
109  // GetRotMatrix() never returns 0, otherwise if not found, it crashes
110  g4rotm = hrotm->BuildG4RotMatrix();
111  }
112  return g4rotm;
113 }
G4tgbRotationMatrix * FindOrBuildTgbRotMatrix(const G4String &name)
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
G4RotationMatrix * FindG4RotMatrix(const G4String &name)
#define G4endl
Definition: G4ios.hh:61
G4RotationMatrix * BuildG4RotMatrix()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindOrBuildTgbRotMatrix()

G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildTgbRotMatrix ( const G4String &  name)

Definition at line 141 of file G4tgbRotationMatrixMgr.cc.

142 {
143  G4tgbRotationMatrix* rotm = FindTgbRotMatrix( name );
144 
145  if( rotm == 0 )
146  {
147  G4String ErrMessage = "Rotation Matrix " + name + " not found !";
148  G4Exception("G4tgbRotationMatrixFactory::FindOrBuildRotMatrix()",
149  "InvalidSetup", FatalException, ErrMessage);
150  }
151  return rotm;
152 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4tgbRotationMatrix * FindTgbRotMatrix(const G4String &name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindTgbRotMatrix()

G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindTgbRotMatrix ( const G4String &  name)

Definition at line 157 of file G4tgbRotationMatrixMgr.cc.

158 {
159  G4tgbRotationMatrix* rotm = 0;
160 
161  G4mstgbrotm::const_iterator cite = theTgbRotMats.find( name );
162  if( cite != theTgbRotMats.end() )
163  {
164  rotm = (*cite).second;
165  }
166  return rotm;
167 }
Here is the caller graph for this function:

◆ GetG4RotMatList()

const G4msg4rotm& G4tgbRotationMatrixMgr::GetG4RotMatList ( ) const
inline

Definition at line 79 of file G4tgbRotationMatrixMgr.hh.

79 { return theG4RotMats; }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstance()

G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::GetInstance ( void  )
static

Definition at line 54 of file G4tgbRotationMatrixMgr.cc.

55 {
56  if( !theInstance )
57  {
60  }
61  return theInstance;
62 }
static G4ThreadLocal G4tgbRotationMatrixMgr * theInstance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTgbRotMatList()

const G4mstgbrotm G4tgbRotationMatrixMgr::GetTgbRotMatList ( ) const
inline

Definition at line 78 of file G4tgbRotationMatrixMgr.hh.

78 { return theTgbRotMats; }

Member Data Documentation

◆ theG4RotMats

G4msg4rotm G4tgbRotationMatrixMgr::theG4RotMats
private

Definition at line 91 of file G4tgbRotationMatrixMgr.hh.

◆ theInstance

G4ThreadLocal G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::theInstance = 0
staticprivate

Definition at line 86 of file G4tgbRotationMatrixMgr.hh.

◆ theTgbRotMats

G4mstgbrotm G4tgbRotationMatrixMgr::theTgbRotMats
private

Definition at line 90 of file G4tgbRotationMatrixMgr.hh.


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