Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4tgrPlaceDivRep Class Reference

#include <G4tgrPlaceDivRep.hh>

Inheritance diagram for G4tgrPlaceDivRep:
Collaboration 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)
 
- Public Member Functions inherited from G4tgrPlace
 G4tgrPlace ()
 
virtual ~G4tgrPlace ()
 
const G4StringGetParentName () const
 
G4tgrVolumeGetVolume () const
 
unsigned int GetCopyNo () const
 
const G4StringGetType () const
 
void SetVolume (G4tgrVolume *vol)
 
void SetType (const G4String &typ)
 
virtual G4ThreeVector GetPlacement () const
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from G4tgrPlace
G4tgrVolumetheVolume
 
G4String theParentName
 
unsigned int theCopyNo
 
G4String theType
 

Detailed Description

Definition at line 53 of file G4tgrPlaceDivRep.hh.

Constructor & Destructor Documentation

G4tgrPlaceDivRep::G4tgrPlaceDivRep ( )

Definition at line 44 of file G4tgrPlaceDivRep.cc.

45  : theNDiv(0), theWidth(0.), theAxis(kUndefined),
46  theOffset(0.), theDivType(DivByNdivAndWidth)
47 {
48 }
G4tgrPlaceDivRep::~G4tgrPlaceDivRep ( )

Definition at line 52 of file G4tgrPlaceDivRep.cc.

53 {
54 }
G4tgrPlaceDivRep::G4tgrPlaceDivRep ( const std::vector< G4String > &  wl)

Definition at line 57 of file G4tgrPlaceDivRep.cc.

58 {
59  theDivType = DivByNdivAndWidth;
60 
61  // Name parent axis nrep width offset
63  "G4tgrPlaceDivRep::G4tgrPlaceDivRep" );
65  "G4tgrPlaceDivRep::G4tgrPlaceDivRep" );
66 
68  theAxis = BuildAxis( G4tgrUtils::GetString(wl[3]) );
69  theNDiv = G4tgrUtils::GetInt( wl[4] );
70  theWidth = G4tgrUtils::GetDouble(wl[5])*mm; // check if it is deg
71  if( wl.size() == 7 )
72  {
73  theOffset = G4tgrUtils::GetDouble(wl[6])*mm; // check if it is deg
74  }
75  else
76  {
77  theOffset = 0.;
78  }
79 
80 #ifdef G4VERBOSE
82  {
83  G4cout << " Created " << *this << G4endl;
84  }
85 #endif
86 
87 }
EAxis BuildAxis(const G4String &axisName)
static constexpr double mm
Definition: G4SIunits.hh:115
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:475
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:430
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:205
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:180
G4String theParentName
Definition: G4tgrPlace.hh:72
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Member Function Documentation

EAxis G4tgrPlaceDivRep::BuildAxis ( const G4String axisName)

Definition at line 91 of file G4tgrPlaceDivRep.cc.

92 {
93  if( axisName == "X" ) {
94  return kXAxis;
95  } else if( axisName == "Y" ) {
96  return kYAxis;
97  } else if( axisName == "Z" ) {
98  return kZAxis;
99  } else if( axisName == "R" ) {
100  return kRho;
101  } else if( axisName == "PHI" ) {
102  return kPhi;
103  }
104  else
105  {
106  G4String ErrMessage = "Axis type not found: " + axisName
107  + ". Only valid axis are: X, Y, Z, R, PHI !";
108  G4Exception("G4tgrVolumeDivision::GetReplicaAxis()",
109  "InvalidAxis", FatalException, ErrMessage);
110  }
111  return kXAxis; // to avoid warning errors
112 }
Definition: geomdefs.hh:54
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
Definition: geomdefs.hh:54

Here is the call graph for this function:

Here is the caller graph for this function:

EAxis G4tgrPlaceDivRep::GetAxis ( ) const
inline

Definition at line 69 of file G4tgrPlaceDivRep.hh.

69 { return theAxis; }

Here is the caller graph for this function:

G4DivType G4tgrPlaceDivRep::GetDivType ( ) const
inline

Definition at line 73 of file G4tgrPlaceDivRep.hh.

73 { return theDivType; }

Here is the caller graph for this function:

G4int G4tgrPlaceDivRep::GetNDiv ( ) const
inline

Definition at line 70 of file G4tgrPlaceDivRep.hh.

70 { return theNDiv; }

Here is the caller graph for this function:

G4double G4tgrPlaceDivRep::GetOffset ( ) const
inline

Definition at line 72 of file G4tgrPlaceDivRep.hh.

72 { return theOffset; }

Here is the caller graph for this function:

G4double G4tgrPlaceDivRep::GetWidth ( ) const
inline

Definition at line 71 of file G4tgrPlaceDivRep.hh.

71 { return theWidth; }

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetAxis ( EAxis  axis)
inline

Definition at line 78 of file G4tgrPlaceDivRep.hh.

78 { theAxis = axis; }

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetDivType ( G4DivType  typ)
inline

Definition at line 80 of file G4tgrPlaceDivRep.hh.

80 { theDivType = typ; }
G4ProcessVectorTypeIndex typ

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetNDiv ( G4int  ndiv)
inline

Definition at line 76 of file G4tgrPlaceDivRep.hh.

76 { theNDiv = ndiv; }

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetOffset ( G4double  offset)
inline

Definition at line 79 of file G4tgrPlaceDivRep.hh.

79 { theOffset = offset; }

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetParentName ( const G4String parentName)
inline

Definition at line 75 of file G4tgrPlaceDivRep.hh.

75 { theParentName=parentName; }
G4String theParentName
Definition: G4tgrPlace.hh:72

Here is the caller graph for this function:

void G4tgrPlaceDivRep::SetWidth ( G4double  width)
inline

Definition at line 77 of file G4tgrPlaceDivRep.hh.

77 { theWidth = width; }
#define width

Here is the caller graph for this function:

Friends And Related Function Documentation

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

Definition at line 116 of file G4tgrPlaceDivRep.cc.

117 {
118  os << "G4tgrPlaceDivRep= in " << obj.theParentName
119  << " NDiv= " << obj.theNDiv << " Width= " << obj.theWidth
120  << " Axis= " << obj.theAxis << " Offset= " << obj.theOffset
121  << " DivType= " << obj.theDivType << G4endl;
122 
123  return os;
124 }
G4String theParentName
Definition: G4tgrPlace.hh:72
#define G4endl
Definition: G4ios.hh:61

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