GEMC  1.8
Geant4 Monte-Carlo Framework
MDetectorMessenger.cc
Go to the documentation of this file.
1 // %%%%%%%%%%%%%
2 // gemc headers
3 // %%%%%%%%%%%%%
4 #include "MDetectorMessenger.h"
5 
6 
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 
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 
void SetNewValue(G4UIcommand *, G4String)
MDetectorMessenger(MDetectorConstruction *)