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

#include <G4HadronicEPTestMessenger.hh>

Inheritance diagram for G4HadronicEPTestMessenger:
Collaboration diagram for G4HadronicEPTestMessenger:

Public Member Functions

 G4HadronicEPTestMessenger (G4HadronicProcessStore *theProcessStore)
 
 ~G4HadronicEPTestMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
- 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
 

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 50 of file G4HadronicEPTestMessenger.hh.

Constructor & Destructor Documentation

G4HadronicEPTestMessenger::G4HadronicEPTestMessenger ( G4HadronicProcessStore theProcessStore)

Definition at line 34 of file G4HadronicEPTestMessenger.cc.

35  :theProcessStore(theStore)
36 {
37  // Main directory for control of the e/p test
38  heptstDirectory = new G4UIdirectory("/heptst/");
39  heptstDirectory->SetGuidance("Controls for the hadronic energy/momentum test");
40 
41  // Command to set level of detail reported upon e/p non-conservation
42  reportLvlCmd = new G4UIcmdWithAnInteger("/heptst/reportLevel",this);
43  reportLvlCmd->SetGuidance("Set level of detail reported upon E/p non-conservation");
44  reportLvlCmd->SetGuidance(" 0 - (default) no reporting ");
45  reportLvlCmd->SetGuidance(" 1 - report only when E/p not conserved ");
46  reportLvlCmd->SetGuidance(" 2 - report regardless of E/p conservation ");
47  reportLvlCmd->SetGuidance(" 3 - report only when E/p not conserved, with names, limits ");
48  reportLvlCmd->SetGuidance(" 4 - report regardless of E/p conservation, with names, limits ");
49  reportLvlCmd->SetParameterName("ReportLevel",true);
50  reportLvlCmd->SetDefaultValue(0);
51  reportLvlCmd->SetRange("ReportLevel >= 0 && ReportLevel < 5");
52 
53  // Set the absolute energy non-conservation level for the process
54  procAbsLvlCmd = new G4UIcmdWithADoubleAndUnit("/heptst/processAbsLevel",this);
55  procAbsLvlCmd->SetGuidance("Set absolute energy level (with unit) of allowed energy non-conservation");
56  procAbsLvlCmd->SetParameterName("ProcessAbsLevel",true);
57  procAbsLvlCmd->SetDefaultValue(-1.0);
58  procAbsLvlCmd->SetUnitCategory("Energy");
59 
60  // Set the relative energy non-conservation level for the process
61  procRelLvlCmd = new G4UIcmdWithADouble("/heptst/processRelLevel",this);
62  procRelLvlCmd->SetGuidance("Set relative level of allowed energy non-conservation");
63  procRelLvlCmd->SetParameterName("ProcessRelLevel",true);
64  procRelLvlCmd->SetDefaultValue(-1.0);
65 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4double defVal)
void SetDefaultValue(G4int defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

G4HadronicEPTestMessenger::~G4HadronicEPTestMessenger ( )

Definition at line 68 of file G4HadronicEPTestMessenger.cc.

69 {
70  delete heptstDirectory;
71  delete reportLvlCmd;
72  delete procAbsLvlCmd;
73  delete procRelLvlCmd;
74 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 77 of file G4HadronicEPTestMessenger.cc.

78 {
79  if (command==reportLvlCmd) {
80  theProcessStore->SetEpReportLevel(reportLvlCmd->GetNewIntValue(newValue) );
81 
82  } else if(command==procRelLvlCmd) {
83  // G4double absval = theHadronicProcess->GetEnergyMomentumCheckLevels().second;
84  theProcessStore->SetProcessRelLevel(procRelLvlCmd->GetNewDoubleValue(newValue) );
85  } else if(command==procAbsLvlCmd) {
86  // G4double relval = theHadronicProcess->GetEnergyMomentumCheckLevels().first;
87  theProcessStore->SetProcessAbsLevel(procAbsLvlCmd->GetNewDoubleValue(newValue) );
88  }
89 }
void SetProcessAbsLevel(G4double absoluteLevel)
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetProcessRelLevel(G4double relativeLevel)
void SetEpReportLevel(G4int level)

Here is the call graph for this function:


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