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

#include <GFlashShowerModelMessenger.hh>

Inheritance diagram for GFlashShowerModelMessenger:
Collaboration diagram for GFlashShowerModelMessenger:

Public Member Functions

 GFlashShowerModelMessenger (GFlashShowerModel *myModel)
 
 ~GFlashShowerModelMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
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 56 of file GFlashShowerModelMessenger.hh.

Constructor & Destructor Documentation

GFlashShowerModelMessenger::GFlashShowerModelMessenger ( GFlashShowerModel myModel)

Definition at line 54 of file GFlashShowerModelMessenger.cc.

55 {
56  myParaDir = new G4UIdirectory("/GFlash/");
57  myParaDir->SetGuidance("Parametrisation control.");
58  myModel= aModel;
59 
60  FlagCmd = new G4UIcmdWithAnInteger("/GFlash/flag",this);
61  FlagCmd->SetGuidance("Defines if GFlash is activated");
62  FlagCmd->SetParameterName("flag",false,false);
63 
64  ContCmd = new G4UIcmdWithAnInteger("/GFlash/containment ",this);
65  ContCmd->SetGuidance("Defines if Containment is checked");
66  ContCmd->SetParameterName("flag",false,false);
67 
68  StepInX0Cmd = new G4UIcmdWithADouble("/GFlash/stepXo",this);
69  StepInX0Cmd->SetGuidance("Defines step lenghts");
70  StepInX0Cmd->SetParameterName("flag",false,false);
71 
72  EminCmd = new G4UIcmdWithADoubleAndUnit("/GFlash/Emin",this);
73  EminCmd->SetGuidance("Set minimum kinetic energy to trigger parametrisation");
74  EminCmd->SetParameterName("Emin",false,false);
75  EminCmd->SetDefaultUnit("GeV");
76  EminCmd->SetUnitCategory("Energy");
78 
79  EmaxCmd = new G4UIcmdWithADoubleAndUnit("/GFlash/Emax",this);
80  EmaxCmd->SetGuidance("Set maximum kinetic energy to trigger parametrisation");
81  EmaxCmd->SetParameterName("Emax",false,false);
82  EmaxCmd->SetDefaultUnit("GeV");
83  EmaxCmd->SetUnitCategory("Energy");
85 
86  EkillCmd = new G4UIcmdWithADoubleAndUnit("/GFlash/Ekill",this);
87  EkillCmd->SetGuidance("Set maximum kinetic energy for electrons to be killed");
88  EkillCmd->SetParameterName("Ekill",false,false);
89  EkillCmd->SetDefaultUnit("GeV");
90  EkillCmd->SetUnitCategory("Energy");
92 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

GFlashShowerModelMessenger::~GFlashShowerModelMessenger ( )

Definition at line 95 of file GFlashShowerModelMessenger.cc.

96 {
97  delete ContCmd;
98  delete FlagCmd;
99  delete StepInX0Cmd;
100  delete EminCmd;
101  delete EmaxCmd;
102  delete EkillCmd;
103 }

Member Function Documentation

G4String GFlashShowerModelMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 144 of file GFlashShowerModelMessenger.cc.

145 {
146  G4String returnValue('\0');
147  std::ostringstream os;
148 
149  if( command == FlagCmd ) {
150  os << "/GFlash/flag " << myModel->GetFlagParamType() << '\0';
151  returnValue = G4String(os.str());
152  }
153 
154  else if( command == EkillCmd ) {
155  os << "/GFlash/Ekill "
157  << " GeV" << '\0';
158  returnValue = G4String(os.str());
159  }
160 
161  else if( command == EminCmd ) {
162  os << "/GFlash/Emin "
164  << " GeV" << '\0';
165  returnValue = G4String(os.str());
166  }
167 
168  else if( command == EmaxCmd ) {
169  os << "/GFlash/Emax "
171  << " GeV" << '\0';
172  returnValue = G4String(os.str());
173  }
174 
175  return returnValue;
176 }
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
GFlashParticleBounds * PBound
G4double GetMaxEneToParametrise(G4ParticleDefinition &particleType)
G4double GetMinEneToParametrise(G4ParticleDefinition &particleType)
G4double GetEneToKill(G4ParticleDefinition &particleType)
static constexpr double GeV
Definition: G4SIunits.hh:217

Here is the call graph for this function:

Here is the caller graph for this function:

void GFlashShowerModelMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 107 of file GFlashShowerModelMessenger.cc.

108 {
109 
110  if( command == FlagCmd ) {
111  myModel->SetFlagParamType(FlagCmd->GetNewIntValue(newValues));
112  this->GetCurrentValue(command);
113  }
114  if( command == ContCmd ) {
115  myModel->SetFlagParticleContainment(ContCmd->GetNewIntValue(newValues));
116  this->GetCurrentValue(command);
117  }
118  if( command == StepInX0Cmd ) {
119  myModel->SetStepInX0(StepInX0Cmd->GetNewDoubleValue(newValues));
120  this->GetCurrentValue(command);
121  }
122 
123  else if( command == EminCmd ) {
125  EminCmd->GetNewDoubleValue(newValues));
126  this->GetCurrentValue(command);
127  }
128 
129  else if( command == EmaxCmd ) {
131  EmaxCmd->GetNewDoubleValue(newValues));
132  this->GetCurrentValue(command);
133  }
134 
135  else if( command == EkillCmd ) {
137  EkillCmd->GetNewDoubleValue(newValues));
138  this->GetCurrentValue(command);
139  }
140 
141 }
G4String GetCurrentValue(G4UIcommand *command)
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
void SetEneToKill(G4ParticleDefinition &particleType, G4double enekill)
static G4int GetNewIntValue(const char *paramString)
GFlashParticleBounds * PBound
static G4double GetNewDoubleValue(const char *paramString)
void SetFlagParamType(G4int I)
static G4double GetNewDoubleValue(const char *paramString)
void SetMinEneToParametrise(G4ParticleDefinition &particleType, G4double enemin)
void SetFlagParticleContainment(G4int I)
void SetMaxEneToParametrise(G4ParticleDefinition &particleType, G4double enemax)
void SetStepInX0(G4double Lenght)

Here is the call graph for this function:


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