| Line | |
|---|
| 1 | // %%%%%%%%%%%%%
|
|---|
| 2 | // gemc headers
|
|---|
| 3 | // %%%%%%%%%%%%%
|
|---|
| 4 | #include "MDetectorMessenger.h"
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 | MDetectorMessenger::MDetectorMessenger(MDetectorConstruction* Det) : MDetector(Det)
|
|---|
| 8 | {
|
|---|
| 9 | gemcDir = new G4UIdirectory("/gemc/");
|
|---|
| 10 | gemcDir->SetGuidance("UI commands of gemc");
|
|---|
| 11 |
|
|---|
| 12 | UpdateGeoCmd = new G4UIcmdWithoutParameter("/gemc/updateGeo",this);
|
|---|
| 13 | UpdateGeoCmd->SetGuidance("Update detector geometry.");
|
|---|
| 14 | UpdateGeoCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
|
|---|
| 15 | UpdateGeoCmd->SetGuidance("if you changed geometrical value(s).");
|
|---|
| 16 | UpdateGeoCmd->AvailableForStates(G4State_Idle);
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | MDetectorMessenger::~MDetectorMessenger()
|
|---|
| 20 | {
|
|---|
| 21 | delete gemcDir;
|
|---|
| 22 | delete UpdateGeoCmd;
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | void MDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
|---|
| 27 | {
|
|---|
| 28 | if( command == UpdateGeoCmd )
|
|---|
| 29 | {
|
|---|
| 30 | MDetector->UpdateGeometry();
|
|---|
| 31 | }
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.