Geant4 10.7.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 45 of file G4tgrRotationMatrixFactory.hh.

Member Function Documentation

◆ AddRotMatrix()

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

Definition at line 65 of file G4tgrRotationMatrixFactory.cc.

67{
68 //---------- Check for miminum number of words read
69 if(wl.size() != 5 && wl.size() != 8 && wl.size() != 11)
70 {
71 G4tgrUtils::DumpVS(wl, "G4tgrRotationMatrixFactory::AddRotMatrix()");
72 G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()", "InvalidMatrix",
73 FatalException, "Line should have 5, 8 or 11 words !");
74 }
75
76#ifdef G4VERBOSE
78 {
79 G4cout << " G4tgrRotationMatrixFactory::AddRotMatrix() - Adding: " << wl[1]
80 << G4endl;
81 }
82#endif
83 //---------- Look if rotation matrix exists
85 {
86 G4String ErrMessage = "Rotation matrix repeated... " + wl[1];
87 G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()", "InvalidInput",
88 FatalException, ErrMessage);
89 }
90
92 theTgrRotMats[rotm->GetName()] = rotm;
93 theTgrRotMatList.push_back(rotm);
94
95 return rotm;
96}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
G4tgrRotationMatrix * FindRotMatrix(const G4String &rotm)
const G4String & GetName()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static void DumpVS(const std::vector< G4String > &wl, const char *msg)
Definition: G4tgrUtils.cc:153

Referenced by G4tgrLineProcessor::ProcessLine().

◆ DumpRotmList()

void G4tgrRotationMatrixFactory::DumpRotmList ( )

Definition at line 114 of file G4tgrRotationMatrixFactory.cc.

115{
116 G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrRotationMatrix's List " << G4endl;
117 for(auto cite = theTgrRotMats.cbegin(); cite != theTgrRotMats.cend(); ++cite)
118 {
119 G4cout << " ROTM: " << (*cite).second->GetName() << G4endl;
120 }
121}

Referenced by G4tgrVolumeMgr::DumpSummary().

◆ FindRotMatrix()

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::FindRotMatrix ( const G4String rotm)

Definition at line 99 of file G4tgrRotationMatrixFactory.cc.

101{
102 G4tgrRotationMatrix* rotm = nullptr;
103
104 G4mstgrrotm::const_iterator cite = theTgrRotMats.find(name);
105 if(cite != theTgrRotMats.cend())
106 {
107 rotm = (*cite).second;
108 }
109
110 return rotm;
111}

Referenced by AddRotMatrix().

◆ GetInstance()

G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::GetInstance ( )
static

Definition at line 39 of file G4tgrRotationMatrixFactory.cc.

40{
41 if(theInstance == nullptr)
42 {
43 theInstance = new G4tgrRotationMatrixFactory;
44 }
45 return theInstance;
46}

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

◆ GetRotMatList()

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

Definition at line 59 of file G4tgrRotationMatrixFactory.hh.

60 {
61 return theTgrRotMatList;
62 }

Referenced by G4tgrVolumeMgr::DumpSummary().

◆ GetRotMatMap()

const G4mstgrrotm & G4tgrRotationMatrixFactory::GetRotMatMap ( ) const
inline

Definition at line 58 of file G4tgrRotationMatrixFactory.hh.

58{ return theTgrRotMats; }

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