#include <G4tgrPlaceDivRep.hh>
Inheritance diagram for G4tgrPlaceDivRep:
Public Member Functions | |
G4tgrPlaceDivRep () | |
~G4tgrPlaceDivRep () | |
G4tgrPlaceDivRep (const std::vector< G4String > &wl) | |
EAxis | BuildAxis (const G4String &axisName) |
EAxis | GetAxis () const |
G4int | GetNDiv () const |
G4double | GetWidth () const |
G4double | GetOffset () const |
G4DivType | GetDivType () const |
void | SetParentName (const G4String &parentName) |
void | SetNDiv (G4int ndiv) |
void | SetWidth (G4double width) |
void | SetAxis (EAxis axis) |
void | SetOffset (G4double offset) |
void | SetDivType (G4DivType typ) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const G4tgrPlaceDivRep &obj) |
Definition at line 53 of file G4tgrPlaceDivRep.hh.
G4tgrPlaceDivRep::G4tgrPlaceDivRep | ( | ) |
Definition at line 44 of file G4tgrPlaceDivRep.cc.
00045 : theNDiv(0), theWidth(0.), theAxis(kUndefined), 00046 theOffset(0.), theDivType(DivByNdivAndWidth) 00047 { 00048 }
G4tgrPlaceDivRep::~G4tgrPlaceDivRep | ( | ) |
G4tgrPlaceDivRep::G4tgrPlaceDivRep | ( | const std::vector< G4String > & | wl | ) |
Definition at line 57 of file G4tgrPlaceDivRep.cc.
References BuildAxis(), G4tgrUtils::CheckWLsize(), DivByNdivAndWidth, G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetInt(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), G4tgrPlace::theParentName, WLSIZE_GE, and WLSIZE_LE.
00058 { 00059 theDivType = DivByNdivAndWidth; 00060 00061 // Name parent axis nrep width offset 00062 G4tgrUtils::CheckWLsize( wl, 6, WLSIZE_GE, 00063 "G4tgrPlaceDivRep::G4tgrPlaceDivRep" ); 00064 G4tgrUtils::CheckWLsize( wl, 7, WLSIZE_LE, 00065 "G4tgrPlaceDivRep::G4tgrPlaceDivRep" ); 00066 00067 theParentName = G4tgrUtils::GetString(wl[2]); 00068 theAxis = BuildAxis( G4tgrUtils::GetString(wl[3]) ); 00069 theNDiv = G4tgrUtils::GetInt( wl[4] ); 00070 theWidth = G4tgrUtils::GetDouble(wl[5])*mm; // check if it is deg 00071 if( wl.size() == 7 ) 00072 { 00073 theOffset = G4tgrUtils::GetDouble(wl[6])*mm; // check if it is deg 00074 } 00075 else 00076 { 00077 theOffset = 0.; 00078 } 00079 00080 #ifdef G4VERBOSE 00081 if( G4tgrMessenger::GetVerboseLevel() >= 1 ) 00082 { 00083 G4cout << " Created " << *this << G4endl; 00084 } 00085 #endif 00086 00087 }
Definition at line 91 of file G4tgrPlaceDivRep.cc.
References FatalException, G4Exception(), kPhi, kRho, kXAxis, kYAxis, and kZAxis.
Referenced by G4tgrPlaceDivRep(), and G4tgrVolumeDivision::G4tgrVolumeDivision().
00092 { 00093 if( axisName == "X" ) { 00094 return kXAxis; 00095 } else if( axisName == "Y" ) { 00096 return kYAxis; 00097 } else if( axisName == "Z" ) { 00098 return kZAxis; 00099 } else if( axisName == "R" ) { 00100 return kRho; 00101 } else if( axisName == "PHI" ) { 00102 return kPhi; 00103 } 00104 else 00105 { 00106 G4String ErrMessage = "Axis type not found: " + axisName 00107 + ". Only valid axis are: X, Y, Z, R, PHI !"; 00108 G4Exception("G4tgrVolumeDivision::GetReplicaAxis()", 00109 "InvalidAxis", FatalException, ErrMessage); 00110 } 00111 return kXAxis; // to avoid warning errors 00112 }
EAxis G4tgrPlaceDivRep::GetAxis | ( | ) | const [inline] |
G4DivType G4tgrPlaceDivRep::GetDivType | ( | ) | const [inline] |
G4int G4tgrPlaceDivRep::GetNDiv | ( | ) | const [inline] |
G4double G4tgrPlaceDivRep::GetOffset | ( | ) | const [inline] |
G4double G4tgrPlaceDivRep::GetWidth | ( | ) | const [inline] |
void G4tgrPlaceDivRep::SetAxis | ( | EAxis | axis | ) | [inline] |
Definition at line 78 of file G4tgrPlaceDivRep.hh.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
void G4tgrPlaceDivRep::SetDivType | ( | G4DivType | typ | ) | [inline] |
Definition at line 80 of file G4tgrPlaceDivRep.hh.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
void G4tgrPlaceDivRep::SetNDiv | ( | G4int | ndiv | ) | [inline] |
Definition at line 76 of file G4tgrPlaceDivRep.hh.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
void G4tgrPlaceDivRep::SetOffset | ( | G4double | offset | ) | [inline] |
Definition at line 79 of file G4tgrPlaceDivRep.hh.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
void G4tgrPlaceDivRep::SetParentName | ( | const G4String & | parentName | ) | [inline] |
Definition at line 75 of file G4tgrPlaceDivRep.hh.
References G4tgrPlace::theParentName.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
00075 { theParentName=parentName; }
void G4tgrPlaceDivRep::SetWidth | ( | G4double | width | ) | [inline] |
Definition at line 77 of file G4tgrPlaceDivRep.hh.
Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4tgrPlaceDivRep & | obj | |||
) | [friend] |
Definition at line 116 of file G4tgrPlaceDivRep.cc.
00117 { 00118 os << "G4tgrPlaceDivRep= in " << obj.theParentName 00119 << " NDiv= " << obj.theNDiv << " Width= " << obj.theWidth 00120 << " Axis= " << obj.theAxis << " Offset= " << obj.theOffset 00121 << " DivType= " << obj.theDivType << G4endl; 00122 00123 return os; 00124 }