/[PAMELA software]/PamG4/src/PrimaryGeneratorMessenger.cc
ViewVC logotype

Annotation of /PamG4/src/PrimaryGeneratorMessenger.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Tue Dec 13 16:20:39 2005 UTC (19 years ago) by cafagna
Branch: start, MAIN
CVS Tags: v1r0, bogo, HEAD
Changes since 1.1: +0 -0 lines
Geant4 code for ND and Calorimeter

1 cafagna 1.1
2     #include "PrimaryGeneratorMessenger.hh"
3    
4     #include "PrimaryGeneratorAction.hh"
5     #include "G4UIcmdWithAString.hh"
6    
7    
8    
9     PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(PrimaryGeneratorAction* Gun)
10     :Action(Gun)
11     {
12     RndmCmd = new G4UIcmdWithAString("/gun/random",this);
13     RndmCmd->SetGuidance("Shoot randomly the incident particle.");
14     RndmCmd->SetGuidance(" Choice : on(default), off");
15     RndmCmd->SetParameterName("choice",true);
16     RndmCmd->SetDefaultValue("on");
17     RndmCmd->SetCandidates("on off");
18     RndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
19     }
20    
21    
22    
23     PrimaryGeneratorMessenger::~PrimaryGeneratorMessenger()
24     {
25     delete RndmCmd;
26     }
27    
28    
29    
30     void PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
31     {
32     if( command == RndmCmd )
33     { Action->SetRndmFlag(newValue);}
34     }
35    
36     // 2005 by G.I.Vasilyev

  ViewVC Help
Powered by ViewVC 1.1.23