Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

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
static constexpr double deg
Definition: G4SIunits.hh:152

Here is the call graph for this function:

Member Function Documentation

const G4String& G4tgrRotationMatrix::GetName ( void  )
inline

Definition at line 60 of file G4tgrRotationMatrix.hh.

60 { return theName; }

Here is the caller graph for this function:

std::vector<G4double>& G4tgrRotationMatrix::GetValues ( )
inline

Definition at line 61 of file G4tgrRotationMatrix.hh.

61 { return theValues; }

Here is the caller graph for this function:

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: