38 G4tgbRotationMatrixMgr::theInstance =
nullptr;
41G4tgbRotationMatrixMgr::G4tgbRotationMatrixMgr()
48 if(theInstance ==
nullptr)
51 theInstance->CopyRotMats();
59 for(
auto tgbcite = theTgbRotMats.cbegin();
60 tgbcite != theTgbRotMats.cend(); ++tgbcite)
62 delete(*tgbcite).second;
64 theTgbRotMats.clear();
69void G4tgbRotationMatrixMgr::CopyRotMats()
73 for(
auto cite = tgrRotms.cbegin(); cite != tgrRotms.cend(); ++cite)
77 theTgbRotMats[tgb->
GetName()] = tgb;
88 G4cout <<
" G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix() - " << name
107 G4msg4rotm::const_iterator cite = theG4RotMats.find(name);
108 if(cite != theG4RotMats.cend())
110 g4rotm = (*cite).second;
116 G4cout <<
" G4tgbRotationMatrixMgr::FindG4RotMatrix(): " <<
G4endl
117 <<
" Name: " << name <<
" = " << g4rotm <<
G4endl;
132 G4String ErrMessage =
"Rotation Matrix " + name +
" not found !";
133 G4Exception(
"G4tgbRotationMatrixFactory::FindOrBuildRotMatrix()",
145 G4mstgbrotm::const_iterator cite = theTgbRotMats.find(name);
146 if(cite != theTgbRotMats.cend())
148 rotm = (*cite).second;
156 os <<
"[ " << rot.
thetaX() / deg <<
'\t' << rot.
phiX() / deg <<
'\t'
157 << rot.
thetaY() / deg <<
'\t' << rot.
phiY() / deg <<
'\t'
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
std::ostream & operator<<(std::ostream &os, const G4RotationMatrix &rot)
std::map< G4String, G4tgrRotationMatrix * > G4mstgrrotm
static G4tgbRotationMatrixMgr * GetInstance()
G4RotationMatrix * FindG4RotMatrix(const G4String &name)
~G4tgbRotationMatrixMgr()
G4RotationMatrix * FindOrBuildG4RotMatrix(const G4String &name)
G4tgbRotationMatrix * FindOrBuildTgbRotMatrix(const G4String &name)
G4tgbRotationMatrix * FindTgbRotMatrix(const G4String &name)
G4RotationMatrix * BuildG4RotMatrix()
const G4String & GetName()
static G4int GetVerboseLevel()
const G4mstgrrotm & GetRotMatMap() const
static G4tgrRotationMatrixFactory * GetInstance()