source: trunk/examples/novice/gemc/src/MDetectorMessenger.cc @ 893

Last change on this file since 893 was 807, checked in by garnier, 16 years ago

update

File size: 822 bytes
Line 
1// %%%%%%%%%%%%%
2// gemc headers
3// %%%%%%%%%%%%%
4#include "MDetectorMessenger.h"
5
6
7MDetectorMessenger::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
19MDetectorMessenger::~MDetectorMessenger()
20{
21 delete gemcDir;
22 delete UpdateGeoCmd;
23}
24
25
26void 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.