#include <G4tgrRotationMatrix.hh>
Public Member Functions | |
G4tgrRotationMatrix () | |
~G4tgrRotationMatrix () | |
G4tgrRotationMatrix (const std::vector< G4String > &wl) | |
const G4String & | GetName () |
std::vector< G4double > & | GetValues () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const G4tgrRotationMatrix &obj) |
Definition at line 49 of file G4tgrRotationMatrix.hh.
G4tgrRotationMatrix::G4tgrRotationMatrix | ( | ) |
Definition at line 44 of file G4tgrRotationMatrix.cc.
00045 : theName("Rotation-Matrix"), theInputType(rm9) 00046 { 00047 }
G4tgrRotationMatrix::~G4tgrRotationMatrix | ( | ) |
G4tgrRotationMatrix::G4tgrRotationMatrix | ( | const std::vector< G4String > & | wl | ) |
Definition at line 57 of file G4tgrRotationMatrix.cc.
References FatalException, G4cout, G4endl, G4Exception(), G4tgrUtils::GetDouble(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), rm3, rm6, and rm9.
00058 : theInputType(rm9) 00059 { 00060 theName = G4tgrUtils::GetString( wl[1] ); 00061 00062 switch( wl.size() ) 00063 { 00064 case 5: 00065 theInputType = rm3; 00066 break; 00067 case 8: 00068 theInputType = rm6; 00069 break; 00070 case 11: 00071 theInputType = rm9; 00072 break; 00073 default: 00074 G4Exception("G4tgrRotationMatrix::G4tgrRotationMatrix()", 00075 "InvalidMatrix", FatalException, 00076 "Input line must have 5, 8 or 11 words."); 00077 break; 00078 } 00079 00080 //-------- Fill matrix values 00081 size_t siz = wl.size() - 2; 00082 for( size_t ii = 0; ii < siz; ii++) 00083 { 00084 if( siz == 9 ) 00085 { 00086 theValues.push_back( G4tgrUtils::GetDouble( wl[ii+2] ) ); 00087 } 00088 else 00089 { 00090 theValues.push_back( G4tgrUtils::GetDouble( wl[ii+2] , deg ) ); 00091 } 00092 } 00093 #ifdef G4VERBOSE 00094 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 00095 { 00096 G4cout << " G4tgrRotationMatrix::G4tgrRotationMatrix() - Created: " 00097 << theName << G4endl; 00098 for( size_t ii = 0; ii < siz; ii++) 00099 { 00100 G4cout << " " << theValues[ii]; 00101 } 00102 G4cout << G4endl; 00103 } 00104 #endif 00105 }
const G4String& G4tgrRotationMatrix::GetName | ( | ) | [inline] |
Definition at line 60 of file G4tgrRotationMatrix.hh.
Referenced by G4tgrRotationMatrixFactory::AddRotMatrix(), and G4tgbRotationMatrix::GetName().
std::vector<G4double>& G4tgrRotationMatrix::GetValues | ( | ) | [inline] |
Definition at line 61 of file G4tgrRotationMatrix.hh.
Referenced by G4tgbRotationMatrix::BuildG4RotMatrix().
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4tgrRotationMatrix & | obj | |||
) | [friend] |
Definition at line 109 of file G4tgrRotationMatrix.cc.
00110 { 00111 os << "G4tgrRotationMatrix= " << obj.theName 00112 << " InputTyep = " << obj.theInputType << " VALUES= "; 00113 00114 for( size_t ii = 0; ii < obj.theValues.size(); ii++ ) 00115 { 00116 os << obj.theValues[ii] << " "; 00117 } 00118 00119 os << G4endl; 00120 00121 return os; 00122 }