68 lines
2.8 KiB
C++
68 lines
2.8 KiB
C++
//
|
|
// ********************************************************************
|
|
// * DISCLAIMER *
|
|
// * *
|
|
// * The following disclaimer summarizes all the specific disclaimers *
|
|
// * of contributors to this software. The specific disclaimers,which *
|
|
// * govern, are listed with their locations in: *
|
|
// * http://cern.ch/geant4/license *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. *
|
|
// * *
|
|
// * This code implementation is the intellectual property of the *
|
|
// * GEANT4 collaboration. *
|
|
// * By copying, distributing or modifying the Program (or any work *
|
|
// * based on the Program) you indicate your acceptance of this *
|
|
// * statement, and all its terms. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
|
|
// GEANT4 tag $Name: $
|
|
//
|
|
//
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
#include "AnaEx01PrimaryGeneratorMessenger.hh"
|
|
|
|
#include "AnaEx01PrimaryGeneratorAction.hh"
|
|
#include "G4UIcmdWithAString.hh"
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
AnaEx01PrimaryGeneratorMessenger::AnaEx01PrimaryGeneratorMessenger(AnaEx01PrimaryGeneratorAction* AnaEx01Gun)
|
|
:AnaEx01Action(AnaEx01Gun)
|
|
{
|
|
RndmCmd = new G4UIcmdWithAString("/gun/random",this);
|
|
RndmCmd->SetGuidance("Shoot randomly the incident particle.");
|
|
RndmCmd->SetGuidance(" Choice : on(default), off");
|
|
RndmCmd->SetParameterName("choice",true);
|
|
RndmCmd->SetDefaultValue("on");
|
|
RndmCmd->SetCandidates("on off");
|
|
RndmCmd->AvailableForStates(PreInit,Idle);
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
AnaEx01PrimaryGeneratorMessenger::~AnaEx01PrimaryGeneratorMessenger()
|
|
{
|
|
delete RndmCmd;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
void AnaEx01PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
|
{
|
|
if( command == RndmCmd )
|
|
{ AnaEx01Action->SetRndmFlag(newValue);}
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|