Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
EventActionMessenger.cc
Go to the documentation of this file.
00001 #include "EventActionMessenger.hh"
00002 
00003 EventActionMessenger::EventActionMessenger(EventAction* EvAct)
00004 :eventAction(EvAct)
00005 {
00006   eventDir = new G4UIdirectory("/PIBIDS/event/");
00007   eventDir->SetGuidance("event control");
00008    
00009   PrintCmd = new G4UIcmdWithAnInteger("/PIBIDS/event/printModulo",this);
00010   PrintCmd->SetGuidance("Print events modulo n");
00011   PrintCmd->SetParameterName("EventNb",false);
00012   PrintCmd->SetRange("EventNb>0");
00013   
00014 }
00015 
00016 EventActionMessenger::~EventActionMessenger()
00017 {
00018   delete PrintCmd;
00019   delete eventDir;
00020 }
00021 
00022 void EventActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
00023 { 
00024   if(command == PrintCmd)
00025     {eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
00026 }
 All Classes Files Functions Variables Defines

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

Created by Rikard Lundmark