Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
Public Member Functions | Private Attributes
EventActionMessenger Class Reference

Creates commands that can be used to control the EventActions via the command line. More...

#include <EventActionMessenger.hh>

List of all members.

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

EventActioneventAction
 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.

Detailed Description

Creates commands that can be used to control the EventActions via the command line.

Definition at line 33 of file EventActionMessenger.hh.


Constructor & Destructor Documentation

EventActionMessenger::EventActionMessenger ( EventAction EvAct)

Constructor, constructs the object.

Parameters:
EvActThe 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");
  
}

Member Function Documentation

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

This method is invoked when a command that alters EventAction is typed in via the command line.

Parameters:
commandThe G4UIcommand which we want to change value in.
newValueThe 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));}
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines

Back to the main page of the Precalibrated Ion Beam Identification Detector project

Created by Rikard Lundmark