Geant4.10
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4Pythia6DecayerMessenger Class Reference

#include <G4Pythia6DecayerMessenger.hh>

Inheritance diagram for G4Pythia6DecayerMessenger:
G4UImessenger

Public Member Functions

 G4Pythia6DecayerMessenger (G4Pythia6Decayer *pythia6Decayer)
 
virtual ~G4Pythia6DecayerMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String string)
 
- 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
 

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
 

Detailed Description

Messenger class that defines commands for G4Pythia6Decayer.

Implements command

Definition at line 50 of file G4Pythia6DecayerMessenger.hh.

Constructor & Destructor Documentation

G4Pythia6DecayerMessenger::G4Pythia6DecayerMessenger ( G4Pythia6Decayer pythia6Decayer)

Standard constructor

Definition at line 50 of file G4Pythia6DecayerMessenger.cc.

References G4UIcommand::AvailableForStates(), G4Pythia6DecayerMessenger(), G4State_Idle, kMaxDecay, kSemiElectronic, G4UIcommand::SetGuidance(), G4UIcmdWithAnInteger::SetParameterName(), and G4UIcommand::SetRange().

Referenced by G4Pythia6DecayerMessenger().

52  : G4UImessenger(),
53  fPythia6Decayer(pythia6Decayer),
54  fDirectory(0),
55  fVerboseCmd(0),
56  fDecayTypeCmd(0)
57 {
58 /// Standard constructor
59 
60  fDirectory = new G4UIdirectory("/pythia6Decayer/");
61  fDirectory->SetGuidance("G4Pythia6Decayer control commands.");
62 
63  fVerboseCmd
64  = new G4UIcmdWithAnInteger("/pythia6Decayer/verbose", this);
65  fVerboseCmd->SetGuidance("Set Pythia6Decayer verbose level");
66  fVerboseCmd->SetParameterName("VerboseLevel", false);
67  fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 1");
68  fVerboseCmd->AvailableForStates(G4State_Idle);
69 
70  fDecayTypeCmd
71  = new G4UIcmdWithAnInteger("/pythia6Decayer/forceDecayType", this);
72  fDecayTypeCmd->SetGuidance("Force the specified decay type");
73  fDecayTypeCmd->SetParameterName("DecayType", false);
74  std::ostringstream os;
75  os << "DecayType >= " << kSemiElectronic
76  << " && DecayType <= " << kMaxDecay;
77  fDecayTypeCmd->SetRange(os.str().c_str());
78  fDecayTypeCmd->AvailableForStates(G4State_Idle);
79 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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:225
G4Pythia6DecayerMessenger::~G4Pythia6DecayerMessenger ( )
virtual

Destructor

Definition at line 83 of file G4Pythia6DecayerMessenger.cc.

84 {
85 /// Destructor
86 
87  delete fDirectory;
88  delete fVerboseCmd;
89  delete fDecayTypeCmd;
90 }

Member Function Documentation

void G4Pythia6DecayerMessenger::SetNewValue ( G4UIcommand command,
G4String  string 
)
virtual

Apply command to the associated object.

Reimplemented from G4UImessenger.

Definition at line 98 of file G4Pythia6DecayerMessenger.cc.

References G4Pythia6Decayer::ForceDecayType(), G4UIcmdWithAnInteger::GetNewIntValue(), and G4Pythia6Decayer::SetVerboseLevel().

100 {
101 /// Apply command to the associated object.
102 
103  if(command == fVerboseCmd) {
104  fPythia6Decayer
105  ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));
106  }
107  else if(command == fDecayTypeCmd) {
108  fPythia6Decayer
109  ->ForceDecayType(EDecayType(fDecayTypeCmd->GetNewIntValue(newValue)));
110  }
111 }
static G4int GetNewIntValue(const char *paramString)
void SetVerboseLevel(G4int verboseLevel)
EDecayType
Definition: EDecayType.hh:41
void ForceDecayType(EDecayType decayType)

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