Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMXSteppingActionMessenger Class Reference

#include <DMXSteppingActionMessenger.hh>

Inheritance diagram for DMXSteppingActionMessenger:
Collaboration diagram for DMXSteppingActionMessenger:

Public Member Functions

 DMXSteppingActionMessenger (DMXSteppingAction *)
 
 ~DMXSteppingActionMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 53 of file DMXSteppingActionMessenger.hh.

Constructor & Destructor Documentation

DMXSteppingActionMessenger::DMXSteppingActionMessenger ( DMXSteppingAction SA)

Definition at line 52 of file DMXSteppingActionMessenger.cc.

52  :steppingAction(SA) {
53 
54  colourNeutronCmd = new G4UIcmdWithAString("/dmx/draw/neutronColour",this);
55  colourNeutronCmd->SetGuidance("Colour of neutron in the event");
56  colourNeutronCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue, cyan, magenta(default), yellow, lgreen, lblue");
57  colourNeutronCmd->SetParameterName("colourNeutronFlag", false);
58  colourNeutronCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
59  colourNeutronCmd->AvailableForStates(G4State_Idle);
60 
61  colourGammaCmd = new G4UIcmdWithAString("/dmx/draw/gammaColour",this);
62  colourGammaCmd->SetGuidance("Colour of gamma in the event");
63  colourGammaCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue, cyan(default), magenta, yellow, lgreen, lblue");
64  colourGammaCmd->SetParameterName("colourGammaFlag", false);
65  colourGammaCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
66  colourGammaCmd->AvailableForStates(G4State_Idle);
67 
68  colourOpticalCmd = new G4UIcmdWithAString("/dmx/draw/opticalColour",this);
69  colourOpticalCmd->SetGuidance("Colour of gamma in the event");
70  colourOpticalCmd->SetGuidance(" Choice : white(default), grey, lgrey, black, red, green, blue, cyan, magenta, yellow, lgreen, lblue");
71  colourOpticalCmd->SetParameterName("colourOpticalFlag", false);
72  colourOpticalCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
73  colourOpticalCmd->AvailableForStates(G4State_Idle);
74 
75  colourChargedPlusCmd = new G4UIcmdWithAString("/dmx/draw/chargedplusColour",this);
76  colourChargedPlusCmd->SetGuidance("colour of chargedplus in the event");
77  colourChargedPlusCmd->SetGuidance(" Choice : white, grey, lgrey, black, red (default), green, blue, cyan, magenta, yellow, lgreen, lblue");
78  colourChargedPlusCmd->SetParameterName("ColourChargedPlusFlag", false);
79  colourChargedPlusCmd->SetCandidates("white grey lgrey black red(default) green blue cyan magenta yellow lgreen lblue");
80  colourChargedPlusCmd->AvailableForStates(G4State_Idle);
81 
82  colourChargedMinusCmd = new G4UIcmdWithAString("/dmx/draw/chargedminusColour",this);
83  colourChargedMinusCmd->SetGuidance("colour of chargedminus in the event");
84  colourChargedMinusCmd->SetGuidance(" Choice : white, grey, lgrey, black, red, green, blue(default), cyan, magenta, yellow, lgreen, lblue");
85  colourChargedMinusCmd->SetParameterName("colourChargedMinusFlag", false);
86  colourChargedMinusCmd->SetCandidates("white grey lgrey black red green blue cyan magenta yellow lgreen lblue");
87  colourChargedMinusCmd->AvailableForStates(G4State_Idle);
88 
89 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetCandidates(const char *candidateList)
DMXSteppingActionMessenger::~DMXSteppingActionMessenger ( )

Definition at line 93 of file DMXSteppingActionMessenger.cc.

93  {
94 
95  delete colourNeutronCmd;
96  delete colourGammaCmd;
97  delete colourOpticalCmd;
98  delete colourChargedPlusCmd;
99  delete colourChargedMinusCmd;
100 }

Member Function Documentation

void DMXSteppingActionMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 104 of file DMXSteppingActionMessenger.cc.

105  {
106 
107  if(command == colourNeutronCmd)
108  steppingAction->SetColourNeutronFlag(newValue);
109 
110  if(command == colourGammaCmd)
111  steppingAction->SetColourGammaFlag(newValue);
112 
113  if(command == colourOpticalCmd)
114  steppingAction->SetColourOpticalFlag(newValue);
115 
116  if(command == colourChargedPlusCmd)
117  steppingAction->SetColourChargedPlusFlag(newValue);
118 
119  if(command == colourChargedMinusCmd)
120  steppingAction->SetColourChargedMinusFlag(newValue);
121 
122 }
void SetColourOpticalFlag(G4String val)
void SetColourNeutronFlag(G4String val)
void SetColourGammaFlag(G4String val)
void SetColourChargedPlusFlag(G4String val)
void SetColourChargedMinusFlag(G4String val)

Here is the call graph for this function:


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