MyStackingActionMessenger Class Reference

#include <MyStackingActionMessenger.hh>

List of all members.

Public Member Functions

 MyStackingActionMessenger (MyStackingAction *)
 ~MyStackingActionMessenger ()
void SetNewValue (G4UIcommand *, G4String)

Private Attributes

MyStackingActionfStackingAction
G4UIdirectory * fDir
G4UIcmdWithADoubleAndUnit * fEleCmd
G4UIcmdWithADoubleAndUnit * fPosCmd
G4UIcmdWithADoubleAndUnit * fGamCmd
G4UIcmdWithAnInteger * fset_no_secCmd
G4UIcmdWithAnInteger * fset_no_MCCmd
G4UIcmdWithAnInteger * fset_no_PCCmd
G4UIcmdWithAnInteger * fadd_whiteCmd
G4UIcmdWithAnInteger * fadd_blackCmd
G4UIcmdWithoutParameter * fclear_whiteCmd
G4UIcmdWithoutParameter * fclear_blackCmd

Detailed Description

Definition at line 20 of file MyStackingActionMessenger.hh.


Constructor & Destructor Documentation

MyStackingActionMessenger::MyStackingActionMessenger ( MyStackingAction aStack  ) 

Definition at line 17 of file MyStackingActionMessenger.cc.

References fadd_blackCmd, fadd_whiteCmd, fclear_blackCmd, fclear_whiteCmd, fDir, fEleCmd, fGamCmd, fPosCmd, fset_no_MCCmd, fset_no_PCCmd, and fset_no_secCmd.

00018 : fStackingAction(aStack) {
00019     fDir = new G4UIdirectory("/stacking/");
00020     fDir->SetGuidance("My stacking action control.");
00021 
00022     fEleCmd = new G4UIcmdWithADoubleAndUnit("/stacking/setEleCut",this);
00023     fEleCmd->SetGuidance("Set the minimum energy of electron to be stacked.");
00024     fEleCmd->SetParameterName("eleCut",false);
00025     fEleCmd->SetUnitCategory("Energy");
00026     fEleCmd->AvailableForStates(G4State_Idle);
00027 
00028     fPosCmd = new G4UIcmdWithADoubleAndUnit("/stacking/setPosCut",this);
00029     fPosCmd->SetGuidance("Set the minimum energy of positron to be stacked.");
00030     fPosCmd->SetParameterName("posCut",false);
00031     fPosCmd->SetUnitCategory("Energy");
00032     fPosCmd->AvailableForStates(G4State_Idle);
00033 
00034     fGamCmd = new G4UIcmdWithADoubleAndUnit("/stacking/setGamCut",this);
00035     fGamCmd->SetGuidance("Set the minimum energy of gamma to be stacked.");
00036     fGamCmd->SetParameterName("gamCut",false);
00037     fGamCmd->SetUnitCategory("Energy");
00038     fGamCmd->AvailableForStates(G4State_Idle);
00039 
00040         fadd_whiteCmd = new G4UIcmdWithAnInteger("/stacking/add_white_list", this);
00041         fadd_whiteCmd->SetGuidance("Add PDGEncoding to white list.");
00042         fadd_whiteCmd->SetParameterName("PDGEncoding",false);
00043         fadd_whiteCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00044 
00045         fadd_blackCmd = new G4UIcmdWithAnInteger("/stacking/add_black_list", this);
00046         fadd_blackCmd->SetGuidance("Add PDGEncoding to black list.");
00047         fadd_blackCmd->SetParameterName("PDGEncoding",false);
00048         fadd_blackCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00049 
00050         fclear_whiteCmd = new G4UIcmdWithoutParameter("/stacking/clear_white_list",this);
00051         fclear_whiteCmd->SetGuidance("Clear white list.");
00052         fclear_whiteCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00053 
00054         fclear_blackCmd = new G4UIcmdWithoutParameter("/stacking/clear_black_list",this);
00055         fclear_blackCmd->SetGuidance("Clear black list.");
00056         fclear_blackCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00057 
00058         fset_no_secCmd = new G4UIcmdWithAnInteger("/stacking/set_no_sec",this);
00059         fset_no_secCmd->SetGuidance("Set Muon Capture");
00060         fset_no_secCmd->SetParameterName("val",false);
00061         fset_no_secCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00062 
00063         fset_no_MCCmd = new G4UIcmdWithAnInteger("/stacking/set_no_MC",this);
00064         fset_no_MCCmd->SetGuidance("Set Muon Capture");
00065         fset_no_MCCmd->SetParameterName("val",false);
00066         fset_no_MCCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00067 
00068         fset_no_PCCmd = new G4UIcmdWithAnInteger("/stacking/set_no_PC",this);
00069         fset_no_PCCmd->SetGuidance("Set Pion Capture");
00070         fset_no_PCCmd->SetParameterName("val",false);
00071         fset_no_PCCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
00072 }

MyStackingActionMessenger::~MyStackingActionMessenger (  ) 

Definition at line 75 of file MyStackingActionMessenger.cc.

References fadd_blackCmd, fadd_whiteCmd, fclear_blackCmd, fclear_whiteCmd, fDir, fEleCmd, fGamCmd, fPosCmd, fset_no_MCCmd, fset_no_PCCmd, and fset_no_secCmd.

00075                                                       {
00076     delete fDir;
00077     delete fEleCmd;
00078     delete fPosCmd;
00079     delete fGamCmd;
00080     delete fadd_whiteCmd;
00081     delete fadd_blackCmd;
00082     delete fclear_blackCmd;
00083     delete fclear_whiteCmd;
00084     delete fset_no_PCCmd;
00085     delete fset_no_secCmd;
00086     delete fset_no_MCCmd;
00087 }


Member Function Documentation

void MyStackingActionMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 90 of file MyStackingActionMessenger.cc.

References fadd_blackCmd, fadd_whiteCmd, fclear_blackCmd, fclear_whiteCmd, fEleCmd, fGamCmd, fPosCmd, fset_no_MCCmd, fset_no_PCCmd, fset_no_secCmd, and fStackingAction.

00091                    {
00092     if( command == fEleCmd ) {
00093         fStackingAction->
00094             SetEleCut(fEleCmd->GetNewDoubleValue(newValue));
00095     }
00096 
00097     if( command == fPosCmd ) {
00098         fStackingAction->
00099             SetPosCut(fPosCmd->GetNewDoubleValue(newValue));
00100     }
00101 
00102     if( command == fGamCmd ) {
00103         fStackingAction->
00104             SetGamCut(fGamCmd->GetNewDoubleValue(newValue));
00105     }
00106 
00107     if( command == fadd_whiteCmd ) {
00108         fStackingAction->
00109             add_white_list(fadd_whiteCmd->GetNewIntValue(newValue));
00110     }
00111 
00112     if( command == fadd_blackCmd ) {
00113         fStackingAction->
00114             add_black_list(fadd_blackCmd->GetNewIntValue(newValue));
00115     }
00116 
00117     if( command == fclear_whiteCmd ) {
00118         fStackingAction->
00119             clear_white_list();
00120     }
00121 
00122     if( command == fclear_blackCmd ) {
00123         fStackingAction->
00124             clear_black_list();
00125     }
00126 
00127     if( command == fset_no_secCmd ) {
00128         fStackingAction->
00129             set_no_sec(fset_no_secCmd->GetNewIntValue(newValue));
00130     }
00131 
00132     if( command == fset_no_MCCmd ) {
00133         fStackingAction->
00134             set_no_MC(fset_no_MCCmd->GetNewIntValue(newValue));
00135     }
00136 
00137     if( command == fset_no_PCCmd ) {
00138         fStackingAction->
00139             set_no_PC(fset_no_PCCmd->GetNewIntValue(newValue));
00140     }
00141 
00142 }


Member Data Documentation

G4UIcmdWithAnInteger* MyStackingActionMessenger::fadd_blackCmd [private]
G4UIcmdWithAnInteger* MyStackingActionMessenger::fadd_whiteCmd [private]
G4UIcmdWithoutParameter* MyStackingActionMessenger::fclear_blackCmd [private]
G4UIcmdWithoutParameter* MyStackingActionMessenger::fclear_whiteCmd [private]
G4UIdirectory* MyStackingActionMessenger::fDir [private]
G4UIcmdWithADoubleAndUnit* MyStackingActionMessenger::fEleCmd [private]
G4UIcmdWithADoubleAndUnit* MyStackingActionMessenger::fGamCmd [private]
G4UIcmdWithADoubleAndUnit* MyStackingActionMessenger::fPosCmd [private]
G4UIcmdWithAnInteger* MyStackingActionMessenger::fset_no_MCCmd [private]
G4UIcmdWithAnInteger* MyStackingActionMessenger::fset_no_PCCmd [private]
G4UIcmdWithAnInteger* MyStackingActionMessenger::fset_no_secCmd [private]

Definition at line 28 of file MyStackingActionMessenger.hh.

Referenced by SetNewValue().


The documentation for this class was generated from the following files:

Generated on 15 Jun 2016 for g4sim by  doxygen 1.6.1