Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4tgbRotationMatrixMgr Class Reference

#include <G4tgbRotationMatrixMgr.hh>

Public Member Functions

 ~G4tgbRotationMatrixMgr ()
 
G4RotationMatrixFindOrBuildG4RotMatrix (const G4String &name)
 
G4RotationMatrixFindG4RotMatrix (const G4String &name)
 
G4tgbRotationMatrixFindOrBuildTgbRotMatrix (const G4String &name)
 
G4tgbRotationMatrixFindTgbRotMatrix (const G4String &name)
 
const G4mstgbrotm GetTgbRotMatList () const
 
const G4msg4rotmGetG4RotMatList () const
 

Static Public Member Functions

static G4tgbRotationMatrixMgrGetInstance ()
 

Detailed Description

Definition at line 49 of file G4tgbRotationMatrixMgr.hh.

Constructor & Destructor Documentation

◆ ~G4tgbRotationMatrixMgr()

G4tgbRotationMatrixMgr::~G4tgbRotationMatrixMgr ( )

Definition at line 57 of file G4tgbRotationMatrixMgr.cc.

58{
59 for(auto tgbcite = theTgbRotMats.cbegin();
60 tgbcite != theTgbRotMats.cend(); ++tgbcite)
61 {
62 delete(*tgbcite).second;
63 }
64 theTgbRotMats.clear();
65 delete theInstance;
66}

Member Function Documentation

◆ FindG4RotMatrix()

G4RotationMatrix * G4tgbRotationMatrixMgr::FindG4RotMatrix ( const G4String name)

Definition at line 103 of file G4tgbRotationMatrixMgr.cc.

104{
105 G4RotationMatrix* g4rotm = nullptr;
106
107 G4msg4rotm::const_iterator cite = theG4RotMats.find(name);
108 if(cite != theG4RotMats.cend())
109 {
110 g4rotm = (*cite).second;
111 }
112
113#ifdef G4VERBOSE
115 {
116 G4cout << " G4tgbRotationMatrixMgr::FindG4RotMatrix(): " << G4endl
117 << " Name: " << name << " = " << g4rotm << G4endl;
118 }
119#endif
120
121 return g4rotm;
122}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
const char * name(G4int ptype)

Referenced by FindOrBuildG4RotMatrix().

◆ FindOrBuildG4RotMatrix()

G4RotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix ( const G4String name)

Definition at line 82 of file G4tgbRotationMatrixMgr.cc.

84{
85#ifdef G4VERBOSE
87 {
88 G4cout << " G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix() - " << name
89 << G4endl;
90 }
91#endif
92 G4RotationMatrix* g4rotm = FindG4RotMatrix(name);
93 if(g4rotm == nullptr)
94 {
96 // GetRotMatrix() never returns 0, otherwise if not found, it crashes
97 g4rotm = hrotm->BuildG4RotMatrix();
98 }
99 return g4rotm;
100}
G4RotationMatrix * FindG4RotMatrix(const G4String &name)
G4tgbRotationMatrix * FindOrBuildTgbRotMatrix(const G4String &name)
G4RotationMatrix * BuildG4RotMatrix()

Referenced by G4tgbVolume::ConstructG4PhysVol(), G4tgbVolume::FindOrConstructG4Solid(), and G4tgbPlaceParameterisation::G4tgbPlaceParameterisation().

◆ FindOrBuildTgbRotMatrix()

G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildTgbRotMatrix ( const G4String name)

Definition at line 126 of file G4tgbRotationMatrixMgr.cc.

127{
129
130 if(rotm == nullptr)
131 {
132 G4String ErrMessage = "Rotation Matrix " + name + " not found !";
133 G4Exception("G4tgbRotationMatrixFactory::FindOrBuildRotMatrix()",
134 "InvalidSetup", FatalException, ErrMessage);
135 }
136 return rotm;
137}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4tgbRotationMatrix * FindTgbRotMatrix(const G4String &name)

Referenced by FindOrBuildG4RotMatrix().

◆ FindTgbRotMatrix()

G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindTgbRotMatrix ( const G4String name)

Definition at line 140 of file G4tgbRotationMatrixMgr.cc.

142{
143 G4tgbRotationMatrix* rotm = nullptr;
144
145 G4mstgbrotm::const_iterator cite = theTgbRotMats.find(name);
146 if(cite != theTgbRotMats.cend())
147 {
148 rotm = (*cite).second;
149 }
150 return rotm;
151}

Referenced by FindOrBuildTgbRotMatrix().

◆ GetG4RotMatList()

const G4msg4rotm & G4tgbRotationMatrixMgr::GetG4RotMatList ( ) const
inline

Definition at line 70 of file G4tgbRotationMatrixMgr.hh.

70{ return theG4RotMats; }

Referenced by G4tgbVolumeMgr::DumpSummary().

◆ GetInstance()

G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::GetInstance ( )
static

Definition at line 46 of file G4tgbRotationMatrixMgr.cc.

47{
48 if(theInstance == nullptr)
49 {
50 theInstance = new G4tgbRotationMatrixMgr;
51 theInstance->CopyRotMats();
52 }
53 return theInstance;
54}

Referenced by G4tgbVolume::ConstructG4PhysVol(), G4tgbVolumeMgr::DumpSummary(), G4tgbVolume::FindOrConstructG4Solid(), and G4tgbPlaceParameterisation::G4tgbPlaceParameterisation().

◆ GetTgbRotMatList()

const G4mstgbrotm G4tgbRotationMatrixMgr::GetTgbRotMatList ( ) const
inline

Definition at line 69 of file G4tgbRotationMatrixMgr.hh.

69{ return theTgbRotMats; }

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