Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends
G4tgrRotationMatrix Class Reference

#include <G4tgrRotationMatrix.hh>

Public Member Functions

 G4tgrRotationMatrix ()
 
 ~G4tgrRotationMatrix ()
 
 G4tgrRotationMatrix (const std::vector< G4String > &wl)
 
const G4StringGetName ()
 
std::vector< G4double > & GetValues ()
 

Friends

std::ostream & operator<< (std::ostream &os, const G4tgrRotationMatrix &obj)
 

Detailed Description

Definition at line 49 of file G4tgrRotationMatrix.hh.

Constructor & Destructor Documentation

G4tgrRotationMatrix::G4tgrRotationMatrix ( )

Definition at line 44 of file G4tgrRotationMatrix.cc.

45  : theName("Rotation-Matrix"), theInputType(rm9)
46 {
47 }
G4tgrRotationMatrix::~G4tgrRotationMatrix ( )

Definition at line 51 of file G4tgrRotationMatrix.cc.

52 {
53 }
G4tgrRotationMatrix::G4tgrRotationMatrix ( const std::vector< G4String > &  wl)

Definition at line 57 of file G4tgrRotationMatrix.cc.

References python.hepunit::deg, FatalException, G4cout, G4endl, G4Exception(), G4tgrUtils::GetDouble(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), rm3, rm6, and rm9.

58  : theInputType(rm9)
59 {
60  theName = G4tgrUtils::GetString( wl[1] );
61 
62  switch( wl.size() )
63  {
64  case 5:
65  theInputType = rm3;
66  break;
67  case 8:
68  theInputType = rm6;
69  break;
70  case 11:
71  theInputType = rm9;
72  break;
73  default:
74  G4Exception("G4tgrRotationMatrix::G4tgrRotationMatrix()",
75  "InvalidMatrix", FatalException,
76  "Input line must have 5, 8 or 11 words.");
77  break;
78  }
79 
80  //-------- Fill matrix values
81  size_t siz = wl.size() - 2;
82  for( size_t ii = 0; ii < siz; ii++)
83  {
84  if( siz == 9 )
85  {
86  theValues.push_back( G4tgrUtils::GetDouble( wl[ii+2] ) );
87  }
88  else
89  {
90  theValues.push_back( G4tgrUtils::GetDouble( wl[ii+2] , deg ) );
91  }
92  }
93 #ifdef G4VERBOSE
95  {
96  G4cout << " G4tgrRotationMatrix::G4tgrRotationMatrix() - Created: "
97  << theName << G4endl;
98  for( size_t ii = 0; ii < siz; ii++)
99  {
100  G4cout << " " << theValues[ii];
101  }
102  G4cout << G4endl;
103  }
104 #endif
105 }
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:205
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:180
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

const G4String& G4tgrRotationMatrix::GetName ( void  )
inline

Definition at line 60 of file G4tgrRotationMatrix.hh.

Referenced by G4tgrRotationMatrixFactory::AddRotMatrix(), and G4tgbRotationMatrix::GetName().

60 { return theName; }
std::vector<G4double>& G4tgrRotationMatrix::GetValues ( )
inline

Definition at line 61 of file G4tgrRotationMatrix.hh.

Referenced by G4tgbRotationMatrix::BuildG4RotMatrix().

61 { return theValues; }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4tgrRotationMatrix obj 
)
friend

Definition at line 109 of file G4tgrRotationMatrix.cc.

110 {
111  os << "G4tgrRotationMatrix= " << obj.theName
112  << " InputTyep = " << obj.theInputType << " VALUES= ";
113 
114  for( size_t ii = 0; ii < obj.theValues.size(); ii++ )
115  {
116  os << obj.theValues[ii] << " ";
117  }
118 
119  os << G4endl;
120 
121  return os;
122 }
#define G4endl
Definition: G4ios.hh:61

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