Geant4  10.02.p03
G4ProductionCutsTableMessenger Class Reference

#include <G4ProductionCutsTableMessenger.hh>

Inheritance diagram for G4ProductionCutsTableMessenger:
Collaboration diagram for G4ProductionCutsTableMessenger:

Public Member Functions

 G4ProductionCutsTableMessenger (G4ProductionCutsTable *pTable)
 
virtual ~G4ProductionCutsTableMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
virtual 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
 

Protected Attributes

G4ProductionCutsTabletheCutsTable
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Private Member Functions

 G4ProductionCutsTableMessenger ()
 

Private Attributes

G4UIdirectorytheDirectory
 
G4UIcmdWithAnIntegerverboseCmd
 
G4UIcmdWithADoubleAndUnitsetLowEdgeCmd
 
G4UIcmdWithADoubleAndUnitsetHighEdgeCmd
 
G4UIcmdWithADoubleAndUnitsetMaxEnergyCutCmd
 
G4UIcmdWithoutParameterdumpCmd
 

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)
 

Detailed Description

Definition at line 65 of file G4ProductionCutsTableMessenger.hh.

Constructor & Destructor Documentation

◆ G4ProductionCutsTableMessenger() [1/2]

G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger ( )
inlineprivate

Definition at line 69 of file G4ProductionCutsTableMessenger.hh.

69 {}
Here is the call graph for this function:

◆ G4ProductionCutsTableMessenger() [2/2]

G4ProductionCutsTableMessenger::G4ProductionCutsTableMessenger ( G4ProductionCutsTable pTable)

Definition at line 51 of file G4ProductionCutsTableMessenger.cc.

52  :theCutsTable(pTable)
53 {
54  // /cuts/ directory
55  theDirectory = new G4UIdirectory("/cuts/");
56  theDirectory->SetGuidance("Commands for G4VUserPhysicsList.");
57 
58  // /cuts/verbose command
59  verboseCmd = new G4UIcmdWithAnInteger("/cuts/verbose",this);
60  verboseCmd->SetGuidance("Set the Verbose level of G4ProductionCutsTable.");
61  verboseCmd->SetGuidance(" 0 : Silent (default)");
62  verboseCmd->SetGuidance(" 1 : Display warning messages");
63  verboseCmd->SetGuidance(" 2 : Display more info");
64  verboseCmd->SetGuidance(" 2 : Display debug info");
65  verboseCmd->SetParameterName("level",true);
67  verboseCmd->SetRange("level >=0 && level <=3");
68 
69  // /cuts/setLowEdge command
70  setLowEdgeCmd = new G4UIcmdWithADoubleAndUnit("/cuts/setLowEdge",this);
71  setLowEdgeCmd->SetGuidance("Set low edge energy value ");
72  setLowEdgeCmd->SetParameterName("edge",false);
74  setLowEdgeCmd->SetRange("edge >0.0");
77 
78  // /cuts/setHighEdge command
79  setHighEdgeCmd = new G4UIcmdWithADoubleAndUnit("/cuts/setHighEdge",this);
80  setHighEdgeCmd->SetGuidance("Set high edge energy value ");
81  setHighEdgeCmd->SetParameterName("edge",false);
83  setHighEdgeCmd->SetRange("edge >0.0");
86 
87  // /cuts/setMaxCutEnergy command
88  setMaxEnergyCutCmd = new G4UIcmdWithADoubleAndUnit("/cuts/setMaxCutEnergy",this);
89  setMaxEnergyCutCmd->SetGuidance("Set maximum of cut energy value ");
92  setMaxEnergyCutCmd->SetRange("cut >0.0");
95 
96  // /cuts/dump command
97  dumpCmd = new G4UIcmdWithoutParameter("/cuts/dump",this);
98  dumpCmd->SetGuidance("Dump cuplues in ProductuinCutsTable. ");
99 
100 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * setMaxEnergyCutCmd
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
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4int defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~G4ProductionCutsTableMessenger()

G4ProductionCutsTableMessenger::~G4ProductionCutsTableMessenger ( )
virtual

Definition at line 102 of file G4ProductionCutsTableMessenger.cc.

103 {
104  delete dumpCmd;
105  delete setMaxEnergyCutCmd;
106  delete setHighEdgeCmd;
107  delete setLowEdgeCmd;
108  delete verboseCmd;
109  delete theDirectory;
110 }
G4UIcmdWithADoubleAndUnit * setMaxEnergyCutCmd
Here is the caller graph for this function:

Member Function Documentation

◆ GetCurrentValue()

G4String G4ProductionCutsTableMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 138 of file G4ProductionCutsTableMessenger.cc.

139 {
140  G4String cv;
141 
142  if( command==verboseCmd ){
144 
145  } else if( command==setLowEdgeCmd ){
147  cv = setLowEdgeCmd->ConvertToString( lowEdge, "keV" );
148 
149  } else if( command==setHighEdgeCmd ){
151  cv = setHighEdgeCmd->ConvertToString( highEdge, "TeV" );
152 
153  } else if( command==setMaxEnergyCutCmd ){
155  cv = setMaxEnergyCutCmd->ConvertToString( cut, "GeV" );
156  }
157 
158 
159  return cv;
160 
161 }
G4UIcmdWithADoubleAndUnit * setMaxEnergyCutCmd
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
G4double GetHighEdgeEnergy() const
G4double GetLowEdgeEnergy() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 112 of file G4ProductionCutsTableMessenger.cc.

114 {
115  if( command==verboseCmd ) {
117 
118  } else if( command==dumpCmd ){
119  theCutsTable-> DumpCouples();
120 
121  } else if( command==setLowEdgeCmd ){
122  G4double lowEdge = setLowEdgeCmd->GetNewDoubleValue(newValue);
124  theCutsTable->SetEnergyRange(lowEdge, highEdge);
125 
126  } else if( command==setHighEdgeCmd ){
127  G4double highEdge = setHighEdgeCmd->GetNewDoubleValue(newValue);
129  theCutsTable->SetEnergyRange(lowEdge, highEdge);
130 
131  } else if( command==setMaxEnergyCutCmd ){
132  G4double cut = setHighEdgeCmd->GetNewDoubleValue(newValue);
134 
135  }
136 }
void SetEnergyRange(G4double lowedge, G4double highedge)
G4UIcmdWithADoubleAndUnit * setMaxEnergyCutCmd
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetVerboseLevel(G4int value)
G4double GetHighEdgeEnergy() const
G4double GetLowEdgeEnergy() const
double G4double
Definition: G4Types.hh:76
void SetMaxEnergyCut(G4double value)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dumpCmd

G4UIcmdWithoutParameter* G4ProductionCutsTableMessenger::dumpCmd
private

Definition at line 88 of file G4ProductionCutsTableMessenger.hh.

◆ setHighEdgeCmd

G4UIcmdWithADoubleAndUnit* G4ProductionCutsTableMessenger::setHighEdgeCmd
private

Definition at line 86 of file G4ProductionCutsTableMessenger.hh.

◆ setLowEdgeCmd

G4UIcmdWithADoubleAndUnit* G4ProductionCutsTableMessenger::setLowEdgeCmd
private

Definition at line 85 of file G4ProductionCutsTableMessenger.hh.

◆ setMaxEnergyCutCmd

G4UIcmdWithADoubleAndUnit* G4ProductionCutsTableMessenger::setMaxEnergyCutCmd
private

Definition at line 87 of file G4ProductionCutsTableMessenger.hh.

◆ theCutsTable

G4ProductionCutsTable* G4ProductionCutsTableMessenger::theCutsTable
protected

Definition at line 80 of file G4ProductionCutsTableMessenger.hh.

◆ theDirectory

G4UIdirectory* G4ProductionCutsTableMessenger::theDirectory
private

Definition at line 83 of file G4ProductionCutsTableMessenger.hh.

◆ verboseCmd

G4UIcmdWithAnInteger* G4ProductionCutsTableMessenger::verboseCmd
private

Definition at line 84 of file G4ProductionCutsTableMessenger.hh.


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