GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSLostEnergyMessenger Class Reference

A control messenger for GGSLostEnergyAction. More...

#include <GGSLostEnergyMessenger.h>

Inheritance diagram for GGSLostEnergyMessenger:
Inheritance graph
[legend]
Collaboration diagram for GGSLostEnergyMessenger:
Collaboration graph
[legend]

Public Member Functions

 GGSLostEnergyMessenger (GGSLostEnergyAction *action)
 Constructor.
 
 ~GGSLostEnergyMessenger ()
 Destructor.
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 Override of SetNewValue method. More...
 

Detailed Description

A control messenger for GGSLostEnergyAction.

This messenger controls the GGSLostEnergyAction action. The construction and destruction of this messenger is handled by GGSLostEnergyAction itself, so messenger's commands will be available as the action is built. Currently, the available commands are:

/GGS/userActions/lostEnergyAction/fileBase: sets the output file base name. /GGS/userActions/lostEnergyAction/treeName: sets the output tree name.

See Also
GGSLostEnergyAction

Definition at line 31 of file GGSLostEnergyMessenger.h.

Member Function Documentation

void GGSLostEnergyMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Override of SetNewValue method.

Parameters
commandThe UI command.
newValueThe new value to be set.

Definition at line 51 of file GGSLostEnergyMessenger.cpp.

51  {
52 
53  if (command == _outBaseCmd)
54  _action->SetOutputFileBase(newValue);
55 
56  if (command == _outTreeCmd)
57  _action->SetOutputTreeName(newValue);
58 
59  if (command == _energyTypeCmd) {
60  if (newValue == "kinetic")
61  _action->SetKineticAsLostEnergy();
62  if (newValue == "total")
63  _action->SetTotalAsLostEnergy();
64  }
65 }
void SetKineticAsLostEnergy()
Sets the kinetic energy as lost energy.
void SetOutputFileBase(const std::string &outFileBase)
Sets the output file base name.
void SetOutputTreeName(const std::string &outTreeName)
Sets the output tree name.
void SetTotalAsLostEnergy()
Sets the total energy as lost energy.

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