#include <G4HadronicEPTestMessenger.hh>
Inheritance diagram for G4HadronicEPTestMessenger:
Public Member Functions | |
G4HadronicEPTestMessenger (G4HadronicProcessStore *theProcessStore) | |
~G4HadronicEPTestMessenger () | |
void | SetNewValue (G4UIcommand *command, G4String newValues) |
Definition at line 50 of file G4HadronicEPTestMessenger.hh.
G4HadronicEPTestMessenger::G4HadronicEPTestMessenger | ( | G4HadronicProcessStore * | theProcessStore | ) |
Definition at line 34 of file G4HadronicEPTestMessenger.cc.
References G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcommand::SetRange(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().
00035 :theProcessStore(theStore) 00036 { 00037 // Main directory for control of the e/p test 00038 heptstDirectory = new G4UIdirectory("/heptst/"); 00039 heptstDirectory->SetGuidance("Controls for the hadronic energy/momentum test"); 00040 00041 // Command to set level of detail reported upon e/p non-conservation 00042 reportLvlCmd = new G4UIcmdWithAnInteger("/heptst/reportLevel",this); 00043 reportLvlCmd->SetGuidance("Set level of detail reported upon E/p non-conservation"); 00044 reportLvlCmd->SetGuidance(" 0 - (default) no reporting "); 00045 reportLvlCmd->SetGuidance(" 1 - report only when E/p not conserved "); 00046 reportLvlCmd->SetGuidance(" 2 - report regardless of E/p conservation "); 00047 reportLvlCmd->SetGuidance(" 3 - report only when E/p not conserved, with names, limits "); 00048 reportLvlCmd->SetGuidance(" 4 - report regardless of E/p conservation, with names, limits "); 00049 reportLvlCmd->SetParameterName("ReportLevel",true); 00050 reportLvlCmd->SetDefaultValue(0); 00051 reportLvlCmd->SetRange("ReportLevel >= 0 && ReportLevel < 5"); 00052 00053 // Set the absolute energy non-conservation level for the process 00054 procAbsLvlCmd = new G4UIcmdWithADoubleAndUnit("/heptst/processAbsLevel",this); 00055 procAbsLvlCmd->SetGuidance("Set absolute energy level (with unit) of allowed energy non-conservation"); 00056 procAbsLvlCmd->SetParameterName("ProcessAbsLevel",true); 00057 procAbsLvlCmd->SetDefaultValue(-1.0); 00058 procAbsLvlCmd->SetUnitCategory("Energy"); 00059 00060 // Set the relative energy non-conservation level for the process 00061 procRelLvlCmd = new G4UIcmdWithADouble("/heptst/processRelLevel",this); 00062 procRelLvlCmd->SetGuidance("Set relative level of allowed energy non-conservation"); 00063 procRelLvlCmd->SetParameterName("ProcessRelLevel",true); 00064 procRelLvlCmd->SetDefaultValue(-1.0); 00065 }
G4HadronicEPTestMessenger::~G4HadronicEPTestMessenger | ( | ) |
Definition at line 68 of file G4HadronicEPTestMessenger.cc.
00069 { 00070 delete heptstDirectory; 00071 delete reportLvlCmd; 00072 delete procAbsLvlCmd; 00073 delete procRelLvlCmd; 00074 }
void G4HadronicEPTestMessenger::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValues | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 77 of file G4HadronicEPTestMessenger.cc.
References G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), G4HadronicProcessStore::SetEpReportLevel(), G4HadronicProcessStore::SetProcessAbsLevel(), and G4HadronicProcessStore::SetProcessRelLevel().
00078 { 00079 if (command==reportLvlCmd) { 00080 theProcessStore->SetEpReportLevel(reportLvlCmd->GetNewIntValue(newValue) ); 00081 00082 } else if(command==procRelLvlCmd) { 00083 // G4double absval = theHadronicProcess->GetEnergyMomentumCheckLevels().second; 00084 theProcessStore->SetProcessRelLevel(procRelLvlCmd->GetNewDoubleValue(newValue) ); 00085 } else if(command==procAbsLvlCmd) { 00086 // G4double relval = theHadronicProcess->GetEnergyMomentumCheckLevels().first; 00087 theProcessStore->SetProcessAbsLevel(procAbsLvlCmd->GetNewDoubleValue(newValue) ); 00088 } 00089 }