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

#include <GammaRayTelPhysicsListMessenger.hh>

Inheritance diagram for GammaRayTelPhysicsListMessenger:
Collaboration diagram for GammaRayTelPhysicsListMessenger:

Public Member Functions

 GammaRayTelPhysicsListMessenger (GammaRayTelPhysicsList *)
 
 ~GammaRayTelPhysicsListMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
- 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 45 of file GammaRayTelPhysicsListMessenger.hh.

Constructor & Destructor Documentation

GammaRayTelPhysicsListMessenger::GammaRayTelPhysicsListMessenger ( GammaRayTelPhysicsList pPhys)

Definition at line 39 of file GammaRayTelPhysicsListMessenger.cc.

40 :pPhysicsList(pPhys)
41 {
42  physDir = new G4UIdirectory("/physics/");
43  physDir->SetGuidance("Commands to activate physics models and set cuts");
44 
45  gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/physics/setGCut",this);
46  gammaCutCmd->SetGuidance("Set gamma cut.");
47  gammaCutCmd->SetParameterName("Gcut",false);
48  gammaCutCmd->SetUnitCategory("Length");
49  gammaCutCmd->SetRange("Gcut>0.0");
51 
52  electCutCmd = new G4UIcmdWithADoubleAndUnit("/physics/setECut",this);
53  electCutCmd->SetGuidance("Set electron cut.");
54  electCutCmd->SetParameterName("Ecut",false);
55  electCutCmd->SetUnitCategory("Length");
56  electCutCmd->SetRange("Ecut>0.0");
58 
59  protoCutCmd = new G4UIcmdWithADoubleAndUnit("/physics/setPCut",this);
60  protoCutCmd->SetGuidance("Set positron cut.");
61  protoCutCmd->SetParameterName("Pcut",false);
62  protoCutCmd->SetUnitCategory("Length");
63  protoCutCmd->SetRange("Pcut>0.0");
65 
66  allCutCmd = new G4UIcmdWithADoubleAndUnit("/physics/setCuts",this);
67  allCutCmd->SetGuidance("Set cut for all.");
68  allCutCmd->SetParameterName("cut",false);
69  allCutCmd->SetUnitCategory("Length");
70  allCutCmd->SetRange("cut>0.0");
72 
73  pListCmd = new G4UIcmdWithAString("/physics/addPhysics",this);
74  pListCmd->SetGuidance("Add physics list.");
75  pListCmd->SetParameterName("PList",false);
77 
78  packageListCmd = new G4UIcmdWithAString("/physics/addPackage",this);
79  packageListCmd->SetGuidance("Add physics package.");
80  packageListCmd->SetParameterName("package",false);
81  packageListCmd->AvailableForStates(G4State_PreInit);
82 }
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 AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

GammaRayTelPhysicsListMessenger::~GammaRayTelPhysicsListMessenger ( )

Definition at line 84 of file GammaRayTelPhysicsListMessenger.cc.

85 {
86  delete gammaCutCmd;
87  delete electCutCmd;
88  delete protoCutCmd;
89  delete allCutCmd;
90  delete pListCmd;
91  delete physDir;
92  delete packageListCmd;
93 }

Member Function Documentation

void GammaRayTelPhysicsListMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 95 of file GammaRayTelPhysicsListMessenger.cc.

97 {
98  if( command == gammaCutCmd )
99  { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
100 
101  if( command == electCutCmd )
102  { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
103 
104  if( command == protoCutCmd )
105  { pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
106 
107  if( command == allCutCmd )
108  {
109  G4double cut = allCutCmd->GetNewDoubleValue(newValue);
110  pPhysicsList->SetCutForGamma(cut);
111  pPhysicsList->SetCutForElectron(cut);
112  pPhysicsList->SetCutForPositron(cut);
113  }
114 
115  if( command == pListCmd )
116  { pPhysicsList->AddPhysicsList(newValue);}
117 
118 
119  if( command == packageListCmd )
120  { pPhysicsList->AddPackage(newValue);}
121 }
static G4double GetNewDoubleValue(const char *paramString)
void AddPhysicsList(const G4String &name)
void AddPackage(const G4String &name)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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