![]() |
Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
|
Creates commands that can be used to control the EventActions via the command line. More...
#include <EventActionMessenger.hh>
Public Member Functions | |
EventActionMessenger (EventAction *) | |
Constructor, constructs the object. | |
virtual | ~EventActionMessenger () |
Destructor, destroys the object. | |
void | SetNewValue (G4UIcommand *, G4String) |
This method is invoked when a command that alters EventAction is typed in via the command line. | |
Private Attributes | |
EventAction * | eventAction |
The EventAction associated with this EventActionMessenger. | |
G4UIdirectory * | eventDir |
The directory in which the command will be contained. | |
G4UIcmdWithAnInteger * | PrintCmd |
The command itself, in this case, print events modulo a number. |
Creates commands that can be used to control the EventActions via the command line.
Definition at line 33 of file EventActionMessenger.hh.
EventActionMessenger::EventActionMessenger | ( | EventAction * | EvAct | ) |
Constructor, constructs the object.
EvAct | The EventAction to associate with this EventActionMessenger. |
Definition at line 3 of file EventActionMessenger.cc.
References eventDir, and PrintCmd.
:eventAction(EvAct) { eventDir = new G4UIdirectory("/PIBIDS/event/"); eventDir->SetGuidance("event control"); PrintCmd = new G4UIcmdWithAnInteger("/PIBIDS/event/printModulo",this); PrintCmd->SetGuidance("Print events modulo n"); PrintCmd->SetParameterName("EventNb",false); PrintCmd->SetRange("EventNb>0"); }
void EventActionMessenger::SetNewValue | ( | G4UIcommand * | command, |
G4String | newValue | ||
) |
This method is invoked when a command that alters EventAction is typed in via the command line.
command | The G4UIcommand which we want to change value in. |
newValue | The string containing the new value. |
Definition at line 22 of file EventActionMessenger.cc.
References eventAction, PrintCmd, and EventAction::SetPrintModulo().
{ if(command == PrintCmd) {eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));} }