Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4tgbRotationMatrixMgr Class Reference

#include <G4tgbRotationMatrixMgr.hh>

Public Member Functions

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

Static Public Member Functions

static G4tgbRotationMatrixMgrGetInstance ()
 

Private Member Functions

void CopyRotMats ()
 
 G4tgbRotationMatrixMgr ()
 

Private Attributes

G4msg4rotm theG4RotMats
 
G4mstgbrotm theTgbRotMats
 

Static Private Attributes

static G4ThreadLocal G4tgbRotationMatrixMgrtheInstance = nullptr
 

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}
static G4ThreadLocal G4tgbRotationMatrixMgr * theInstance

References theInstance, and theTgbRotMats.

◆ G4tgbRotationMatrixMgr()

G4tgbRotationMatrixMgr::G4tgbRotationMatrixMgr ( )
private

Definition at line 41 of file G4tgbRotationMatrixMgr.cc.

42{
43}

Referenced by GetInstance().

Member Function Documentation

◆ CopyRotMats()

void G4tgbRotationMatrixMgr::CopyRotMats ( )
private

Definition at line 69 of file G4tgbRotationMatrixMgr.cc.

70{
71 G4mstgrrotm tgrRotms =
73 for(auto cite = tgrRotms.cbegin(); cite != tgrRotms.cend(); ++cite)
74 {
75 G4tgrRotationMatrix* tgr = (*cite).second;
77 theTgbRotMats[tgb->GetName()] = tgb;
78 }
79}
std::map< G4String, G4tgrRotationMatrix * > G4mstgrrotm
const G4String & GetName()
const G4mstgrrotm & GetRotMatMap() const
static G4tgrRotationMatrixFactory * GetInstance()

References G4tgrRotationMatrixFactory::GetInstance(), G4tgbRotationMatrix::GetName(), G4tgrRotationMatrixFactory::GetRotMatMap(), and theTgbRotMats.

Referenced by GetInstance().

◆ 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)

References G4cout, G4endl, G4tgrMessenger::GetVerboseLevel(), G4InuclParticleNames::name(), and theG4RotMats.

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
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()

References G4tgbRotationMatrix::BuildG4RotMatrix(), FindG4RotMatrix(), FindOrBuildTgbRotMatrix(), G4cout, G4endl, G4tgrMessenger::GetVerboseLevel(), and G4InuclParticleNames::name().

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

◆ 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)

References FatalException, FindTgbRotMatrix(), G4Exception(), and G4InuclParticleNames::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}

References G4InuclParticleNames::name(), and theTgbRotMats.

Referenced by FindOrBuildTgbRotMatrix().

◆ GetG4RotMatList()

const G4msg4rotm & G4tgbRotationMatrixMgr::GetG4RotMatList ( ) const
inline

Definition at line 70 of file G4tgbRotationMatrixMgr.hh.

70{ return theG4RotMats; }

References theG4RotMats.

Referenced by G4tgbVolumeMgr::DumpSummary().

◆ GetInstance()

G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::GetInstance ( )
static

◆ GetTgbRotMatList()

const G4mstgbrotm G4tgbRotationMatrixMgr::GetTgbRotMatList ( ) const
inline

Definition at line 69 of file G4tgbRotationMatrixMgr.hh.

69{ return theTgbRotMats; }

References theTgbRotMats.

Field Documentation

◆ theG4RotMats

G4msg4rotm G4tgbRotationMatrixMgr::theG4RotMats
private

Definition at line 82 of file G4tgbRotationMatrixMgr.hh.

Referenced by FindG4RotMatrix(), and GetG4RotMatList().

◆ theInstance

G4ThreadLocal G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::theInstance = nullptr
staticprivate

Definition at line 77 of file G4tgbRotationMatrixMgr.hh.

Referenced by GetInstance(), and ~G4tgbRotationMatrixMgr().

◆ theTgbRotMats

G4mstgbrotm G4tgbRotationMatrixMgr::theTgbRotMats
private

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