Geant4  10.02.p03
DMXEventActionMessenger Class Reference

#include <DMXEventActionMessenger.hh>

Inheritance diagram for DMXEventActionMessenger:
Collaboration diagram for DMXEventActionMessenger:

Public Member Functions

 DMXEventActionMessenger (DMXEventAction *)
 
 ~DMXEventActionMessenger ()
 
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
 

Private Attributes

DMXEventActioneventAction
 
G4UIdirectorydmxDirectory
 
G4UIdirectorydrawDirectory
 
G4UIcmdWithAStringDrawTrksCmd
 
G4UIcmdWithAStringDrawColsCmd
 
G4UIcmdWithABoolDrawHitsCmd
 
G4UIcmdWithABoolSavePmtCmd
 
G4UIcmdWithABoolSaveHitsCmd
 
G4UIcmdWithAnIntegerPrintCmd
 

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 55 of file DMXEventActionMessenger.hh.

Constructor & Destructor Documentation

◆ DMXEventActionMessenger()

DMXEventActionMessenger::DMXEventActionMessenger ( DMXEventAction EvAct)

Definition at line 56 of file DMXEventActionMessenger.cc.

57 :eventAction(EvAct){
58 
59  // saving event information
60  dmxDirectory = new G4UIdirectory("/dmx/");
61  dmxDirectory->SetGuidance("DM Example commands.");
62 
63  SavePmtCmd = new G4UIcmdWithABool("/dmx/savePmt",this);
64  SavePmtCmd->SetGuidance("Set flag to save (x,y,z) of hits in PMT");
65  SavePmtCmd->SetGuidance("into file 'pmt.out'");
66  SavePmtCmd->SetGuidance("Default = false");
67  SavePmtCmd->SetParameterName("savePmtFlag", false);
68 
69  SaveHitsCmd = new G4UIcmdWithABool("/dmx/saveHits",this);
70  SaveHitsCmd->SetGuidance("Set flag to save hits in each run");
71  SaveHitsCmd->SetGuidance("into file 'hits.out'");
72  SaveHitsCmd->SetGuidance("Default = true");
73  SaveHitsCmd->SetParameterName("saveHitsFlag", false);
74 
75 
76  // drawing event
77  drawDirectory = new G4UIdirectory("/dmx/draw/");
78  drawDirectory->SetGuidance("DM Example draw commands.");
79 
80  DrawColsCmd = new G4UIcmdWithAString("/dmx/draw/drawColours",this);
81  DrawColsCmd->SetGuidance("Tracks drawn by Event (standard colours) or by Step (custom colours)");
82  DrawColsCmd->SetGuidance(" Choice : custom, standard(default)");
83  DrawColsCmd->SetParameterName("drawColsFlag", false);
84  DrawColsCmd->SetCandidates("custom standard");
86 
87  DrawTrksCmd = new G4UIcmdWithAString("/dmx/draw/drawTracks",this);
88  DrawTrksCmd->SetGuidance("Draw the tracks in the event");
89  DrawTrksCmd->SetGuidance(" Choice : none, charged, noscint, all(default)");
90  DrawTrksCmd->SetParameterName("drawTrksFlag", false);
91  DrawTrksCmd->SetCandidates("none charged noscint all");
93 
94  DrawHitsCmd = new G4UIcmdWithABool("/dmx/draw/drawHits",this);
95  DrawHitsCmd->SetGuidance("Set flag to draw hits in PMT.");
96  DrawHitsCmd->SetGuidance("Default = true");
97  DrawHitsCmd->SetParameterName("drawHitsFlag", false);
99 
100  PrintCmd = new G4UIcmdWithAnInteger("/dmx/printModulo",this);
101  PrintCmd->SetGuidance("Print events modulo n");
102  PrintCmd->SetParameterName("EventNb",false);
103  PrintCmd->SetRange("EventNb>0");
105 
106 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAnInteger * PrintCmd
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * DrawTrksCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithAString * DrawColsCmd
void SetCandidates(const char *candidateList)
Here is the call graph for this function:

◆ ~DMXEventActionMessenger()

DMXEventActionMessenger::~DMXEventActionMessenger ( )

Definition at line 109 of file DMXEventActionMessenger.cc.

109  {
110 
111  delete SavePmtCmd;
112  delete SaveHitsCmd;
113  delete dmxDirectory;
114  delete DrawColsCmd;
115  delete DrawTrksCmd;
116  delete DrawHitsCmd;
117  delete drawDirectory;
118  delete PrintCmd;
119 
120 }
G4UIcmdWithAnInteger * PrintCmd
G4UIcmdWithAString * DrawTrksCmd
G4UIcmdWithAString * DrawColsCmd
Here is the call graph for this function:

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 123 of file DMXEventActionMessenger.cc.

123  {
124 
125  if(command == DrawColsCmd)
126  eventAction->SetDrawColsFlag(newValue);
127 
128  if(command == DrawTrksCmd)
129  eventAction->SetDrawTrksFlag(newValue);
130 
131  if(command == DrawHitsCmd) {
132  G4int vl;
133  const char* t = newValue;
134  std::istringstream is(t);
135  is >> vl;
137  }
138 
139  if(command == SavePmtCmd) {
140  G4int vl;
141  const char* t = newValue;
142  std::istringstream is(t);
143  is >> vl;
144  eventAction->SetSavePmtFlag(vl!=0);
145  }
146 
147  if(command == SaveHitsCmd) {
148  G4int vl;
149  const char* t = newValue;
150  std::istringstream is(t);
151  is >> vl;
153  }
154 
155  if(command == PrintCmd)
157 
158 
159 }
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAnInteger * PrintCmd
void SetSaveHitsFlag(G4int val)
void SetDrawColsFlag(G4String val)
int G4int
Definition: G4Types.hh:78
G4UIcmdWithAString * DrawTrksCmd
void SetPrintModulo(G4int val)
G4UIcmdWithAString * DrawColsCmd
void SetDrawHitsFlag(G4int val)
void SetSavePmtFlag(G4int val)
void SetDrawTrksFlag(G4String val)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dmxDirectory

G4UIdirectory* DMXEventActionMessenger::dmxDirectory
private

Definition at line 66 of file DMXEventActionMessenger.hh.

◆ DrawColsCmd

G4UIcmdWithAString* DMXEventActionMessenger::DrawColsCmd
private

Definition at line 69 of file DMXEventActionMessenger.hh.

◆ drawDirectory

G4UIdirectory* DMXEventActionMessenger::drawDirectory
private

Definition at line 67 of file DMXEventActionMessenger.hh.

◆ DrawHitsCmd

G4UIcmdWithABool* DMXEventActionMessenger::DrawHitsCmd
private

Definition at line 70 of file DMXEventActionMessenger.hh.

◆ DrawTrksCmd

G4UIcmdWithAString* DMXEventActionMessenger::DrawTrksCmd
private

Definition at line 68 of file DMXEventActionMessenger.hh.

◆ eventAction

DMXEventAction* DMXEventActionMessenger::eventAction
private

Definition at line 64 of file DMXEventActionMessenger.hh.

◆ PrintCmd

G4UIcmdWithAnInteger* DMXEventActionMessenger::PrintCmd
private

Definition at line 73 of file DMXEventActionMessenger.hh.

◆ SaveHitsCmd

G4UIcmdWithABool* DMXEventActionMessenger::SaveHitsCmd
private

Definition at line 72 of file DMXEventActionMessenger.hh.

◆ SavePmtCmd

G4UIcmdWithABool* DMXEventActionMessenger::SavePmtCmd
private

Definition at line 71 of file DMXEventActionMessenger.hh.


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