Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronicEPTestMessenger Class Reference

#include <G4HadronicEPTestMessenger.hh>

Inheritance diagram for G4HadronicEPTestMessenger:

Public Member Functions

 G4HadronicEPTestMessenger (G4HadronicProcessStore *theProcessStore)
 ~G4HadronicEPTestMessenger ()
void SetNewValue (G4UIcommand *command, G4String newValues)
Public Member Functions inherited from G4UImessenger
 G4UImessenger ()=default
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
virtual ~G4UImessenger ()
virtual G4String GetCurrentValue (G4UIcommand *command)
G4bool CommandsShouldBeInMaster () const

Additional Inherited Members

Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
G4String LtoS (G4long l)
G4String DtoS (G4double a)
G4String BtoS (G4bool b)
G4int StoI (const G4String &s)
G4long StoL (const G4String &s)
G4double StoD (const G4String &s)
G4bool StoB (const 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 = nullptr
G4String baseDirName = ""
G4bool commandsShouldBeInMaster = false

Detailed Description

Definition at line 50 of file G4HadronicEPTestMessenger.hh.

Constructor & Destructor Documentation

◆ G4HadronicEPTestMessenger()

G4HadronicEPTestMessenger::G4HadronicEPTestMessenger ( G4HadronicProcessStore * theProcessStore)

Definition at line 35 of file G4HadronicEPTestMessenger.cc.

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

◆ ~G4HadronicEPTestMessenger()

G4HadronicEPTestMessenger::~G4HadronicEPTestMessenger ( )

Definition at line 69 of file G4HadronicEPTestMessenger.cc.

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

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 78 of file G4HadronicEPTestMessenger.cc.

79{
80 if ( command == reportLvlCmd ) {
81 theProcessStore->SetEpReportLevel( reportLvlCmd->GetNewIntValue( newValue ) );
82 } else if ( command == procRelLvlCmd ) {
83 theProcessStore->SetProcessRelLevel( procRelLvlCmd->GetNewDoubleValue( newValue ) );
84 } else if ( command == procAbsLvlCmd ) {
85 theProcessStore->SetProcessAbsLevel( procAbsLvlCmd->GetNewDoubleValue( newValue ) );
86 }
87}

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