#include <G4tgbRotationMatrixMgr.hh>
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 () |
Definition at line 56 of file G4tgbRotationMatrixMgr.hh.
G4tgbRotationMatrixMgr::~G4tgbRotationMatrixMgr | ( | ) |
Definition at line 66 of file G4tgbRotationMatrixMgr.cc.
00067 { 00068 G4mstgbrotm::const_iterator tgbcite; 00069 for( tgbcite = theTgbRotMats.begin(); 00070 tgbcite != theTgbRotMats.end(); tgbcite++) 00071 { 00072 delete (*tgbcite).second; 00073 } 00074 theTgbRotMats.clear(); 00075 delete theInstance; 00076 }
G4RotationMatrix * G4tgbRotationMatrixMgr::FindG4RotMatrix | ( | const G4String & | name | ) |
Definition at line 117 of file G4tgbRotationMatrixMgr.cc.
References G4cout, G4endl, and G4tgrMessenger::GetVerboseLevel().
Referenced by FindOrBuildG4RotMatrix().
00118 { 00119 G4RotationMatrix* g4rotm = 0; 00120 00121 G4msg4rotm::const_iterator cite = theG4RotMats.find( name ); 00122 if( cite != theG4RotMats.end() ) 00123 { 00124 g4rotm = (*cite).second; 00125 } 00126 00127 #ifdef G4VERBOSE 00128 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 00129 { 00130 G4cout << " G4tgbRotationMatrixMgr::FindG4RotMatrix(): " << G4endl 00131 << " Name: " << name << " = " << g4rotm << G4endl; 00132 } 00133 #endif 00134 00135 return g4rotm; 00136 }
G4RotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix | ( | const G4String & | name | ) |
Definition at line 96 of file G4tgbRotationMatrixMgr.cc.
References G4tgbRotationMatrix::BuildG4RotMatrix(), FindG4RotMatrix(), FindOrBuildTgbRotMatrix(), G4cout, G4endl, and G4tgrMessenger::GetVerboseLevel().
Referenced by G4tgbVolume::ConstructG4PhysVol(), G4tgbVolume::FindOrConstructG4Solid(), and G4tgbPlaceParameterisation::G4tgbPlaceParameterisation().
00097 { 00098 #ifdef G4VERBOSE 00099 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 00100 { 00101 G4cout << " G4tgbRotationMatrixMgr::FindOrBuildG4RotMatrix() - " 00102 << name << G4endl; 00103 } 00104 #endif 00105 G4RotationMatrix* g4rotm = FindG4RotMatrix( name ); 00106 if( g4rotm == 0 ) 00107 { 00108 G4tgbRotationMatrix* hrotm = FindOrBuildTgbRotMatrix( name ); 00109 // GetRotMatrix() never returns 0, otherwise if not found, it crashes 00110 g4rotm = hrotm->BuildG4RotMatrix(); 00111 } 00112 return g4rotm; 00113 }
G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildTgbRotMatrix | ( | const G4String & | name | ) |
Definition at line 141 of file G4tgbRotationMatrixMgr.cc.
References FatalException, FindTgbRotMatrix(), and G4Exception().
Referenced by FindOrBuildG4RotMatrix().
00142 { 00143 G4tgbRotationMatrix* rotm = FindTgbRotMatrix( name ); 00144 00145 if( rotm == 0 ) 00146 { 00147 G4String ErrMessage = "Rotation Matrix " + name + " not found !"; 00148 G4Exception("G4tgbRotationMatrixFactory::FindOrBuildRotMatrix()", 00149 "InvalidSetup", FatalException, ErrMessage); 00150 } 00151 return rotm; 00152 }
G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindTgbRotMatrix | ( | const G4String & | name | ) |
Definition at line 157 of file G4tgbRotationMatrixMgr.cc.
Referenced by FindOrBuildTgbRotMatrix().
00158 { 00159 G4tgbRotationMatrix* rotm = 0; 00160 00161 G4mstgbrotm::const_iterator cite = theTgbRotMats.find( name ); 00162 if( cite != theTgbRotMats.end() ) 00163 { 00164 rotm = (*cite).second; 00165 } 00166 return rotm; 00167 }
const G4msg4rotm& G4tgbRotationMatrixMgr::GetG4RotMatList | ( | ) | const [inline] |
Definition at line 79 of file G4tgbRotationMatrixMgr.hh.
Referenced by G4tgbVolumeMgr::DumpSummary().
G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::GetInstance | ( | ) | [static] |
Definition at line 54 of file G4tgbRotationMatrixMgr.cc.
References CopyRotMats().
Referenced by G4tgbVolume::ConstructG4PhysVol(), G4tgbVolumeMgr::DumpSummary(), G4tgbVolume::FindOrConstructG4Solid(), and G4tgbPlaceParameterisation::G4tgbPlaceParameterisation().
00055 { 00056 if( !theInstance ) 00057 { 00058 theInstance = new G4tgbRotationMatrixMgr; 00059 theInstance->CopyRotMats(); 00060 } 00061 return theInstance; 00062 }
const G4mstgbrotm G4tgbRotationMatrixMgr::GetTgbRotMatList | ( | ) | const [inline] |