Warning, file /geant4/examples/advanced/underground_physics/src/DMXSteppingActionMessenger.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #include "DMXSteppingActionMessenger.hh"
0043
0044 #include "DMXSteppingAction.hh"
0045 #include "DMXEventActionMessenger.hh"
0046
0047 #include "globals.hh"
0048 #include "G4UIdirectory.hh"
0049 #include "G4UIcmdWithAString.hh"
0050
0051 DMXSteppingActionMessenger::DMXSteppingActionMessenger
0052 (DMXSteppingAction* SA):steppingAction(SA) {
0053
0054 colourNeutronCmd = new G4UIcmdWithAString("/dmx/draw/neutronColour",this);
0055 colourNeutronCmd->SetGuidance("Colour of neutron in the event");
0056 colourNeutronCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue, cyan, magenta(default), yellow, lgreen, lblue");
0057 colourNeutronCmd->SetParameterName("colourNeutronFlag", false);
0058 colourNeutronCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
0059 colourNeutronCmd->AvailableForStates(G4State_Idle);
0060
0061 colourGammaCmd = new G4UIcmdWithAString("/dmx/draw/gammaColour",this);
0062 colourGammaCmd->SetGuidance("Colour of gamma in the event");
0063 colourGammaCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue, cyan(default), magenta, yellow, lgreen, lblue");
0064 colourGammaCmd->SetParameterName("colourGammaFlag", false);
0065 colourGammaCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
0066 colourGammaCmd->AvailableForStates(G4State_Idle);
0067
0068 colourOpticalCmd = new G4UIcmdWithAString("/dmx/draw/opticalColour",this);
0069 colourOpticalCmd->SetGuidance("Colour of gamma in the event");
0070 colourOpticalCmd->SetGuidance(" Choice : white(default), grey, lgrey, black, red, green, blue, cyan, magenta, yellow, lgreen, lblue");
0071 colourOpticalCmd->SetParameterName("colourOpticalFlag", false);
0072 colourOpticalCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
0073 colourOpticalCmd->AvailableForStates(G4State_Idle);
0074
0075 colourChargedPlusCmd = new G4UIcmdWithAString("/dmx/draw/chargedplusColour",this);
0076 colourChargedPlusCmd->SetGuidance("colour of chargedplus in the event");
0077 colourChargedPlusCmd->SetGuidance(" Choice : white, grey, lgrey, black, red (default), green, blue, cyan, magenta, yellow, lgreen, lblue");
0078 colourChargedPlusCmd->SetParameterName("ColourChargedPlusFlag", false);
0079 colourChargedPlusCmd->SetCandidates("white grey lgrey black red(default) green blue cyan magenta yellow lgreen lblue");
0080 colourChargedPlusCmd->AvailableForStates(G4State_Idle);
0081
0082 colourChargedMinusCmd = new G4UIcmdWithAString("/dmx/draw/chargedminusColour",this);
0083 colourChargedMinusCmd->SetGuidance("colour of chargedminus in the event");
0084 colourChargedMinusCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue(default), cyan, magenta, yellow, lgreen, lblue");
0085 colourChargedMinusCmd->SetParameterName("colourChargedMinusFlag", false);
0086 colourChargedMinusCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
0087 colourChargedMinusCmd->AvailableForStates(G4State_Idle);
0088
0089 }
0090
0091
0092
0093 DMXSteppingActionMessenger::~DMXSteppingActionMessenger() {
0094
0095 delete colourNeutronCmd;
0096 delete colourGammaCmd;
0097 delete colourOpticalCmd;
0098 delete colourChargedPlusCmd;
0099 delete colourChargedMinusCmd;
0100 }
0101
0102
0103
0104 void DMXSteppingActionMessenger::SetNewValue(G4UIcommand* command,
0105 G4String newValue) {
0106
0107 if(command == colourNeutronCmd)
0108 steppingAction->SetColourNeutronFlag(newValue);
0109
0110 if(command == colourGammaCmd)
0111 steppingAction->SetColourGammaFlag(newValue);
0112
0113 if(command == colourOpticalCmd)
0114 steppingAction->SetColourOpticalFlag(newValue);
0115
0116 if(command == colourChargedPlusCmd)
0117 steppingAction->SetColourChargedPlusFlag(newValue);
0118
0119 if(command == colourChargedMinusCmd)
0120 steppingAction->SetColourChargedMinusFlag(newValue);
0121
0122 }
0123
0124
0125