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

#include <IORTGeometryController.hh>

Public Member Functions

 IORTGeometryController ()
 
 ~IORTGeometryController ()
 
void SetGeometry (G4String)
 
void UpdateGeometry ()
 

Detailed Description

Controller for geometry selection

This controller is called by the geometry messenger and used to select the geometry. Each available geometry must have unique name and it must be known by the geometry controller.

Definition at line 54 of file IORTGeometryController.hh.

Constructor & Destructor Documentation

IORTGeometryController::IORTGeometryController ( )

Definition at line 54 of file IORTGeometryController.cc.

55 {}
IORTGeometryController::~IORTGeometryController ( )

Definition at line 58 of file IORTGeometryController.cc.

59 {}

Member Function Documentation

void IORTGeometryController::SetGeometry ( G4String  name)

Select a geometry by name.

Definition at line 62 of file IORTGeometryController.cc.

References G4cout, and G4endl.

Referenced by main().

63 {
64 
65  if (name == "coll100")
66  {
67  registerGeometry(new Collimator100BeamLine());
68  G4cout <<"Collimator 100 geometry activated" << G4endl;
69 
70  }
71  else if (name == "coll80")
72  {
73  registerGeometry(new Collimator80BeamLine());
74  G4cout <<"Collimator 80 geometry activated" << G4endl;
75 
76  }
77 
78  else if (name == "coll70")
79  {
80  registerGeometry(new Collimator70BeamLine());
81  G4cout <<"Collimator 70 geometry activated" << G4endl;
82 
83  }
84  else if (name == "coll50")
85  {
86  registerGeometry(new Collimator50BeamLine());
87  G4cout <<"Collimator 50 geometry activated" << G4endl;
88 
89  }
90  else if (name == "coll40")
91  {
92  registerGeometry(new Collimator40BeamLine());
93  G4cout <<"Collimator 40 geometry activated" << G4endl;
94 
95  }
96  else if(name == "default")
97 
98  {
99  registerGeometry(new Collimator60BeamLine());
100  }
101  else
102  {
103  G4cout <<"Unknown geometry: " << name << ". Geometry not changed." << G4endl;
104  }
105 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void IORTGeometryController::UpdateGeometry ( )

Definition at line 116 of file IORTGeometryController.cc.

References G4RunManager::GetRunManager().

117 {
118  G4RunManager::GetRunManager() -> GeometryHasBeenModified();
119 
120 }
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74

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