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

#include <G4tgrRotationMatrixFactory.hh>

Public Member Functions

G4tgrRotationMatrixAddRotMatrix (const std::vector< G4String > &wl)
 
G4tgrRotationMatrixFindRotMatrix (const G4String &rotm)
 
const G4mstgrrotmGetRotMatMap () const
 
std::vector< G4tgrRotationMatrix * > GetRotMatList () const
 
void DumpRotmList ()
 

Static Public Member Functions

static G4tgrRotationMatrixFactoryGetInstance ()
 

Detailed Description

Definition at line 51 of file G4tgrRotationMatrixFactory.hh.

Member Function Documentation

◆ AddRotMatrix()

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::AddRotMatrix ( const std::vector< G4String > &  wl)

Definition at line 76 of file G4tgrRotationMatrixFactory.cc.

77{
78 //---------- Check for miminum number of words read
79 if( wl.size() != 5 && wl.size() != 8 && wl.size() != 11 )
80 {
81 G4tgrUtils::DumpVS(wl, "G4tgrRotationMatrixFactory::AddRotMatrix()");
82 G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()", "InvalidMatrix",
83 FatalException, "Line should have 5, 8 or 11 words !");
84 }
85
86#ifdef G4VERBOSE
88 {
89 G4cout << " G4tgrRotationMatrixFactory::AddRotMatrix() - Adding: "
90 << wl[1] << G4endl;
91 }
92#endif
93 //---------- Look if rotation matrix exists
94 if( FindRotMatrix( G4tgrUtils::GetString(wl[1]) ) != 0 )
95 {
96 G4String ErrMessage = "Rotation matrix repeated... " + wl[1];
97 G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()",
98 "InvalidInput", FatalException, ErrMessage);
99 }
100
102 theTgrRotMats[ rotm->GetName() ] = rotm;
103 theTgrRotMatList.push_back( rotm );
104
105 return rotm;
106}
@ FatalException
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4int GetVerboseLevel()
G4tgrRotationMatrix * FindRotMatrix(const G4String &rotm)
const G4String & GetName()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:178
static void DumpVS(const std::vector< G4String > &wl, const char *msg)
Definition: G4tgrUtils.cc:156
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Referenced by G4tgrLineProcessor::ProcessLine().

◆ DumpRotmList()

void G4tgrRotationMatrixFactory::DumpRotmList ( )

Definition at line 126 of file G4tgrRotationMatrixFactory.cc.

127{
128 G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrRotationMatrix's List " << G4endl;
129 G4mstgrrotm::const_iterator cite;
130 for(cite = theTgrRotMats.begin(); cite != theTgrRotMats.end(); cite++)
131 {
132 G4cout << " ROTM: " << (*cite).second->GetName() << G4endl;
133 }
134}

Referenced by G4tgrVolumeMgr::DumpSummary().

◆ FindRotMatrix()

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::FindRotMatrix ( const G4String rotm)

Definition at line 111 of file G4tgrRotationMatrixFactory.cc.

112{
113 G4tgrRotationMatrix* rotm = 0;
114
115 G4mstgrrotm::const_iterator cite = theTgrRotMats.find( name );
116 if( cite != theTgrRotMats.end() )
117 {
118 rotm = (*cite).second;
119 }
120
121 return rotm;
122}

Referenced by AddRotMatrix().

◆ GetInstance()

G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::GetInstance ( )
static

Definition at line 45 of file G4tgrRotationMatrixFactory.cc.

46{
47 if( !theInstance )
48 {
49 theInstance = new G4tgrRotationMatrixFactory;
50 }
51 return theInstance;
52}

Referenced by G4tgrVolumeMgr::DumpSummary(), and G4tgrLineProcessor::ProcessLine().

◆ GetRotMatList()

std::vector< G4tgrRotationMatrix * > G4tgrRotationMatrixFactory::GetRotMatList ( ) const
inline

Definition at line 66 of file G4tgrRotationMatrixFactory.hh.

67 { return theTgrRotMatList; }

Referenced by G4tgrVolumeMgr::DumpSummary().

◆ GetRotMatMap()

const G4mstgrrotm & G4tgrRotationMatrixFactory::GetRotMatMap ( ) const
inline

Definition at line 64 of file G4tgrRotationMatrixFactory.hh.

65 { return theTgrRotMats; }

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