GEMC  2.3
Geant4 Monte-Carlo Framework
MDetectorMessenger.cc
Go to the documentation of this file.
1 // gemc headers
2 #include "MDetectorMessenger.h"
3 
4 
6 {
7  gemcDir = new G4UIdirectory("/gemc/");
8  gemcDir->SetGuidance("UI commands of gemc");
9 
10  UpdateGeoCmd = new G4UIcmdWithoutParameter("/gemc/updateGeo",this);
11  UpdateGeoCmd->SetGuidance("Update detector geometry.");
12  UpdateGeoCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
13  UpdateGeoCmd->SetGuidance("if you changed geometrical value(s).");
14  UpdateGeoCmd->AvailableForStates(G4State_Idle);
15 }
16 
18 {
19  delete gemcDir;
20  delete UpdateGeoCmd;
21 }
22 
23 
24 void MDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
25 {
26  if( command == UpdateGeoCmd )
27  {
28  MDetector->updateGeometry();
29  }
30 }
31 
void SetNewValue(G4UIcommand *, G4String)
MDetectorMessenger(MDetectorConstruction *)