Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
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 56 of file G4tgbRotationMatrixMgr.hh.

Constructor & Destructor Documentation

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 }

Member Function Documentation

G4RotationMatrix * G4tgbRotationMatrixMgr::FindG4RotMatrix ( const G4String name)

Definition at line 117 of file G4tgbRotationMatrixMgr.cc.

References G4cout, G4endl, and G4tgrMessenger::GetVerboseLevel().

Referenced by FindOrBuildG4RotMatrix().

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

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()
G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindOrBuildTgbRotMatrix ( const G4String name)

Definition at line 141 of file G4tgbRotationMatrixMgr.cc.

References FatalException, FindTgbRotMatrix(), and G4Exception().

Referenced by FindOrBuildG4RotMatrix().

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)
G4tgbRotationMatrix * G4tgbRotationMatrixMgr::FindTgbRotMatrix ( const G4String name)

Definition at line 157 of file G4tgbRotationMatrixMgr.cc.

Referenced by FindOrBuildTgbRotMatrix().

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 }
const G4msg4rotm& G4tgbRotationMatrixMgr::GetG4RotMatList ( ) const
inline

Definition at line 79 of file G4tgbRotationMatrixMgr.hh.

Referenced by G4tgbVolumeMgr::DumpSummary().

79 { return theG4RotMats; }
G4tgbRotationMatrixMgr * G4tgbRotationMatrixMgr::GetInstance ( void  )
static

Definition at line 54 of file G4tgbRotationMatrixMgr.cc.

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

55 {
56  if( !theInstance )
57  {
58  theInstance = new G4tgbRotationMatrixMgr;
59  theInstance->CopyRotMats();
60  }
61  return theInstance;
62 }
const G4mstgbrotm G4tgbRotationMatrixMgr::GetTgbRotMatList ( ) const
inline

Definition at line 78 of file G4tgbRotationMatrixMgr.hh.

78 { return theTgbRotMats; }

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