Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -21,8 +21,18 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.2 2002/06/18 22:30:31 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * BrachyDetectorMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.5 2002/12/06 16:32:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -30,7 +40,8 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "BrachyDetectorMessenger.hh"
|
||||
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
@@ -40,8 +51,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det)
|
||||
:Detector(Det)
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det):
|
||||
Detector(Det)
|
||||
{
|
||||
detDir = new G4UIdirectory("/detector/");
|
||||
detDir->SetGuidance(" detector control.");
|
||||
@@ -49,9 +60,32 @@ BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* De
|
||||
AbsMaterCmd = new G4UIcmdWithAString("/detector/setMaterial",this);
|
||||
AbsMaterCmd->SetGuidance("Select Material of the detector.");
|
||||
AbsMaterCmd->SetParameterName("choice",false);
|
||||
AbsMaterCmd->AvailableForStates(Idle);
|
||||
|
||||
}
|
||||
AbsMaterCmd->AvailableForStates(G4State_Idle);
|
||||
selDetCmd = new G4UIcmdWithAString("/geom/select",this);
|
||||
|
||||
mydetDir = new G4UIdirectory("/geom/");
|
||||
mydetDir->SetGuidance("Geometry setup commands.");
|
||||
|
||||
selDetCmd->SetGuidance("Select the way detector geometry is built.");
|
||||
selDetCmd->SetGuidance(" Iodium: Iodium Source ");
|
||||
selDetCmd->SetGuidance(" Iridium: Iridium Source " );
|
||||
selDetCmd->SetGuidance(" Leipzig: Leipzig Source " );
|
||||
selDetCmd->SetParameterName("choice",true);
|
||||
selDetCmd->SetDefaultValue("Iridium");
|
||||
selDetCmd->SetCandidates("Iridium / Iodium / Leipzig");
|
||||
selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
switchCmd = new G4UIcmdWithAString("/geom/switch",this);
|
||||
switchCmd->SetGuidance("Assign the selected geometry to G4RunManager.");
|
||||
switchCmd->SetGuidance("In case the choice is present to this command,");
|
||||
switchCmd->SetGuidance("\"/geom/select\" will be invoked and then switched.");
|
||||
switchCmd->SetParameterName("choice",true);
|
||||
switchCmd->SetDefaultValue(" ");
|
||||
switchCmd->SetCandidates("Iridium Iodium Leipzig ");
|
||||
switchCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -59,7 +93,7 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
{
|
||||
|
||||
delete AbsMaterCmd;
|
||||
delete UpdateCmd;
|
||||
delete mydetDir;
|
||||
delete detDir;
|
||||
}
|
||||
|
||||
@@ -68,11 +102,20 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
void BrachyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == AbsMaterCmd )
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == selDetCmd )
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
}
|
||||
if( command == switchCmd )
|
||||
{
|
||||
if(newValue=="Iodium" || newValue=="Iridium"|| newValue=="Leipzig")
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
Detector->SwitchDetector();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user