Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
Em10EventActionMessenger Class Reference

#include <Em10EventActionMessenger.hh>

Inheritance diagram for Em10EventActionMessenger:
G4UImessenger

Public Member Functions

 Em10EventActionMessenger (Em10EventAction *)
 
 ~Em10EventActionMessenger ()
 
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
 

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
 

Detailed Description

Definition at line 50 of file Em10EventActionMessenger.hh.

Constructor & Destructor Documentation

Em10EventActionMessenger::Em10EventActionMessenger ( Em10EventAction EvAct)

Definition at line 47 of file Em10EventActionMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), and G4UIcommand::SetRange().

48 :G4UImessenger(),eventAction(EvAct)
49 {
50  setVerboseCmd = new G4UIcmdWithAnInteger("/event/setverbose",this);
51  setVerboseCmd->SetGuidance("Set verbose level ." );
52  setVerboseCmd->SetParameterName("level",true);
53  setVerboseCmd->SetDefaultValue(0);
54 
55  DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
56  DrawCmd->SetGuidance("Draw the tracks in the event");
57  DrawCmd->SetGuidance(" Choice : none,charged, all");
58  DrawCmd->SetParameterName("choice",true);
59  DrawCmd->SetDefaultValue("all");
60  DrawCmd->SetCandidates("none charged all");
62 
63  PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
64  PrintCmd->SetGuidance("Print events modulo n");
65  PrintCmd->SetParameterName("EventNb",false);
66  PrintCmd->SetRange("EventNb>0");
67  PrintCmd->AvailableForStates(G4State_Idle);
68 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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:225
void SetDefaultValue(const char *defVal)
void SetCandidates(const char *candidateList)
void SetDefaultValue(G4int defVal)
Em10EventActionMessenger::~Em10EventActionMessenger ( )

Definition at line 72 of file Em10EventActionMessenger.cc.

73 {
74  delete setVerboseCmd;
75  delete DrawCmd;
76  delete PrintCmd;
77 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 81 of file Em10EventActionMessenger.cc.

References G4UIcmdWithAnInteger::GetNewIntValue(), Em10EventAction::SetDrawFlag(), Em10EventAction::setEventVerbose(), and Em10EventAction::SetPrintModulo().

82 {
83  if(command == setVerboseCmd)
84  {eventAction->setEventVerbose(setVerboseCmd->GetNewIntValue(newValue));}
85 
86  if(command == DrawCmd)
87  {eventAction->SetDrawFlag(newValue);}
88 
89  if(command == PrintCmd)
90  {eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
91 }
static G4int GetNewIntValue(const char *paramString)
void setEventVerbose(G4int level)
void SetDrawFlag(G4String val)
void SetPrintModulo(G4int val)

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