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

#include <HadrontherapyGeometryController.hh>

Public Member Functions

 HadrontherapyGeometryController ()
 
 ~HadrontherapyGeometryController ()
 
void SetGeometry (G4String)
 

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 49 of file HadrontherapyGeometryController.hh.

Constructor & Destructor Documentation

HadrontherapyGeometryController::HadrontherapyGeometryController ( )

Definition at line 46 of file HadrontherapyGeometryController.cc.

47 {}
HadrontherapyGeometryController::~HadrontherapyGeometryController ( )

Definition at line 50 of file HadrontherapyGeometryController.cc.

51 {}

Member Function Documentation

void HadrontherapyGeometryController::SetGeometry ( G4String  name)

Select a geometry by name.

Definition at line 54 of file HadrontherapyGeometryController.cc.

References G4cout, and G4endl.

Referenced by main().

55 {
56  G4cout <<"Activating geometry " << name << G4endl;
57 
58 
59  if(name == "default")
60  {
61 
62  registerGeometry(new PassiveProtonBeamLine());
63 
64 
65  }
66 
67  else if(name == "Carbon")
68  {
69 
70  registerGeometry(new PassiveCarbonBeamLine());
71  }
72 
73  else
74  {
75  G4cout <<"Unknown geometry: " << name << ". Geometry not changed." << G4endl;
76  }
77 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

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